[SOLVED] Volume does not exist error after VM migration

emk

New Member
May 7, 2023
4
0
1
Hi
I created a cluster of two nodes by installing PVE 7.4-1 on an old thinkpad t61 I had lying around. I then shut down and migrated a vm from the first node, lets call it n1 to the thinkpad, lets call it n2. The migration went OK. However the vms disk was not moved over to n2. The vm fails to start on n2 with the error
Error: Volume 'Drive-2:102/vm-102-disk-1.qcow2' does not exist
The vm disk is still showing up on n1 in the web interface. THe same storage was created in n2 when I clustered the machines, however it does'nt show the vm disk.When I first migrated the vm it had a cloud init disk attached and this disk was moved over just fine. I've since removed the cloud init disk but I still can't get the vm to migrate with its disk.
I feel like I'm missing some simple configuration any help is much appreciated.
 
I copied over the vm disk from node 1 to node 2 and this enable the vm to start. However, Im not sure that this is what is supposed to happen. I thought that when you hit migrate for the vm, all configuration including its disk was moved over to the new node. So I will not mark this as solved for a while just in case someone more knowledgeable in Proxmox wants to chip in an answer.
 
can you post your storage config? did you mark the storage as 'shared' even though it isn't ?
 
can you post your storage config? did you mark the storage as 'shared' even though it isn't ?
Thanks for replying. Not sure what storage config to post. On the web interface under Datacenter->Storage all my storage except "local" and "local-lvm" is shared and enabled. The same storage also shows up on the new node.
 
Not sure what storage config to post.
best would be the vm config (qm config ID) and the complete storage config (/etc/pve/storage.cfg)

On the web interface under Datacenter->Storage all my storage except "local" and "local-lvm" is shared and enabled. The same storage also shows up on the new node.
and which of these storages does the vm use ?
 
did you mark the storage as 'shared' even though it isn't ?
Thanks for the hint! That seems to have been the problem. I changed the storage drive (the vm uses Drive-2) to not shared and I was able to migrate and run the vm. Just for completeness and in case you can spot anything else wrong, I'm posting the configs you asked for, I've removed some private(?) info in the first one.

-- qm config 102 (this is from the new node since I was able to migrate the vm after marking Drive-2 'not shared':

Code:
agent: 1
boot: order=scsi0;net0
cipassword: <removed>
ciuser: <removed>
cores: 2
description: <removed>
memory: 3600
meta: creation-qemu=6.2.0,ctime=1660956600
name: ZoneMinder
net0: virtio=<removed>,bridge=vmbr0
numa: 0
onboot: 0
ostype: l26
scsi0: Drive-2:102/vm-102-disk-1.qcow2,discard=on,size=40G
scsihw: virtio-scsi-pci
smbios1: uuid=<removed>
sockets: 1
sshkeys: <removed>
vmgenid: 01720031-749a-4dac-a643-f42902d0ff55


-- /etc/pve/storage.cfg

Code:
dir: local
    path /var/lib/vz
    content vztmpl,iso,backup

lvmthin: local-lvm
    thinpool data
    vgname pve
    content images,rootdir

dir: Drive-1
    path /srv/Proxmox-Drives/Drive-1
    content rootdir,iso,backup,vztmpl,snippets,images
    prune-backups keep-all=1
    shared 1

dir: Drive-2
    path /srv/Proxmox-Drives/Drive-2
    content images,iso,rootdir,backup,snippets,vztmpl
    prune-backups keep-all=1
    shared 0

dir: Drive-3
    path /srv/Proxmox-Drives/Drive-3
    content images,backup,iso,rootdir,snippets,vztmpl
    prune-backups keep-all=1
    shared 1

dir: Drive-0
    path /srv/Proxmox-Drives/Drive-0
    content vztmpl,snippets,rootdir,iso,backup,images
    prune-backups keep-all=1
    shared 1

dir: ZoneMinder
    path /srv/vg00/ZoneMinder
    content images,snippets,vztmpl,iso,rootdir,backup
    nodes mtume
    prune-backups keep-all=1
    shared 1

dir: NextCloud
    path /srv/vg01/NextCloud
    content images,backup,iso,rootdir,vztmpl,snippets
    prune-backups keep-all=1
    shared 1

dir: MediaCloud
    path /srv/vg01/MediaCloud
    content iso,backup,rootdir,vztmpl,snippets,images
    prune-backups keep-all=1
    shared 1

dir: Photo
    path /srv/vg01/Photo
    content images,backup,rootdir,iso,snippets,vztmpl
    prune-backups keep-all=1
    shared 1

dir: Misc
    path /srv/vg00/Misc
    content images,snippets,vztmpl,backup,iso,rootdir
    prune-backups keep-all=1
    shared 1

dir: Projects
    path /srv/vg00/Projects
    content snippets,vztmpl,rootdir,iso,backup,images
    prune-backups keep-all=1
    shared 1

dir: Media
    path /srv/vg00/Media
    content images,rootdir,backup,iso,snippets,vztmpl
    prune-backups keep-all=1
    shared 1

So this is solved for me. I do need to read up on how storage works. I thought that marking everything as shared would make migrations work better. Thanks for your help and thanks Proxmox for the great software!
 
Last edited:
I thought that marking everything as shared would make migrations work better.
no, the 'shared' flag tells pve that the storage is shared with an external mechanism across nodes, so it does not need to copy the disks over (and it didn't evidently)

Thanks for your help and thanks Proxmox for the great software!
no problem, great that it works now
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!