[Solved] Need help recovering disk of a VM

surfrock66

Active Member
Feb 10, 2020
43
9
28
41
I have a VM in a hardlocked condition. This VM had 2 disks on NAS storage, and was set to migrate in HA. As a short term fix, I moved one of those 2 disks to the local ZFS storage on the node, but I did NOT configure a replication job (oversight). A power event caused the node to drop, and the VM's migrated. Now, the VM can't start because it doesn't have access to a disk, I can't migrate/replicate the disk, and when I try to migrate the VM back, it errors with the command output "No volume specified"

Code:
root@sr66-prox-01:~# /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=sr66-prox-02' -o 'UserKnownHostsFile=/etc/pve/nodes/sr66-prox-02/ssh_known_hosts' -o 'GlobalKnownHostsFile=none' root@10.10.2.10 -- pvesr prepare-local-job 101-0 --last_sync 0
no volumes specified

I either need to get the VM to migrate back to node 2 so the disk shows back up, or I need to replicate the disk from node 2 to node 1 with some sort of ZFS send, but I'm not sure the best way to do that. Ultimately, I do have backups, but I would prefer not to revert to that if I can recover the disk; I can see the disk looking at the ZFS LUN on node 2.

1736960704491.png
 
Here's what I ended up doing:

1) Took a snapshot of the vm disk @now.
2) ZFS Sent the disk to the other host
3) Did a rescan of resources

So:

Code:
Host 1:
zfs snapshot prox-zpool-01/vm-101-disk-1@now
zfs send -Rpv prox-zpool-01/vm-101-disk-1@now | ssh -o BatchMode=yes root@10.2.10.30 zfs recv -Fv prox-zpool-01/vm-101-disk-1

Host 2:
qm rescan --vmid 101

Host 1:
zfs destroy prox-zpool-01/vm-101-disk-1@now

The disk then showed up as "Unused" and I was able to add it and be back in business.
 
  • Like
Reactions: waltar

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!