0

We had a Windows VM in our proxmox server with one accounting program and suddenly, it crashed at night.

When we connected to check what's wrong and we noticed a blue screen with the Windows error 0xc0000225 so we tried a few things but never formatted the drive. I tried to do a list partition but they are missing.

Is there any way to recover data from the vm disk image? I tried recovering windows but now is missing.

1 Answer 1

0

First, make a copy of the disk. Use dd for that.

dd if=/var/lib/libvirt/images/guest1.img of=/var/lib/libvirt/images/guest1_copy.img

After you made a copy, try to mount the disk on the proxmox host. Before the actual mounting, one needs information about the partition layout. Use kpartx to display the partition table. (Note, that kpartx may need to get installed before.)

kpartx -l /var/lib/libvirt/images/guest1_copy.img

and then map the partitions

kpartx -a /var/lib/libvirt/images/guest1_copy.img

After that, check if the mapping worked.

ls /dev/mapper/loop*

Every partition should be available as loop device. If that worked, the disk can be mounted - fs driver presence assumed - with the normal mount command. For example

mount /dev/mapper/loop0p2 /mnt -o loop,ro

if the desired partition is partition 2.

See here for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .