Recovery MV Proxmox 6

POL CRIOLLO

New Member
Feb 4, 2020
17
0
1
49
My greetings,
I have a problem, I hope any of you can help me.
Add a node to a cluster with proxmox 6, by mistake the virtual machines were not saved, I want to recover those machines, in the storage local-zfs are the disks of these machines.
What would be the most effective method to recover those machines.
Best regards.
Paul Crioll
Peru

oot@two:/dev/zvol/rpool/data# pvesm list local-zfs
local-zfs:vm-100-disk-0 raw 536870912000 100
local-zfs:vm-101-disk-0 raw 536870912000 101
local-zfs:vm-102-disk-0 raw 536870912000 102
local-zfs:vm-2001-disk-0 raw 536870912000 2001
local-zfs:vm-2002-disk-0 raw 536870912000 2002
local-zfs:vm-2003-disk-0 raw 536870912000 2003
local-zfs:vm-2004-disk-0 raw 536870912000 2004
root@two:/dev/zvol/rpool/data# qemu-img info local-zfs:vm-102-disk-0
qemu-img: Could not open 'local-zfs:vm-102-disk-0': Unknown protocol 'local-zfs'
root@two:/dev/zvol/rpool/data# pvesm path local-zfs:101/vm-101-disk-0.raw
unable to parse zfs volume name '101/vm-101-disk-0.raw'
root@two:/dev/zvol/rpool/data# pvesm path local-zfs:vm-102-disk-0
/dev/zvol/rpool/data/vm-102-disk-0
root@two:/dev/zvol/rpool/data#
 
Last edited:
You should be able to use
Code:
qemu-img info $(pvesm path local-zfs:vm-2004-disk-0)
to get the info you want.

You could create new VMs and import your existing disks into them see using
Code:
qm importdisk
There is a man page with an example.
 
You should be able to use
Code:
qemu-img info $(pvesm path local-zfs:vm-2004-disk-0)
to get the info you want.

You could create new VMs and import your existing disks into them see using
Code:
qm importdisk
There is a man page with an example.

Thank you for your contribution.
The import procedure if I know it.
The problem is how to use the simple raw disk file to be able to impose it, where those raw images are stored.
 
hi,

they're not stored as raw images if you use ZFS.
you will need to convert them.

you can do the following (do this for each disk):
Code:
dd if=$(pvesm path local-zfs:vm-1000-disk-0) of=vm1000.raw status=progress

change the local-zfs:vm-1000-disk-0 according to the storage/VMID/disk
 
  • Like
Reactions: Dominic