Retrieving a failed VM after Fangtooth upgrade

I did plenty of research before upgrading and 99% worked first time, well done all involved!

I just have one VM that for whatever reason is failing. I run KVM/QEMU on my desktop so would like to try and extract a few bits of data from it before retiring it and recreating in the TrueNAS recommended fashion.

How would I go about copying the .raw file? I can see the old .ix-virt contents but can’t work out how to mount them and make a copy of the raw image.

truenas% /usr/sbin/zfs list | grep ix-virt
Storage/.ix-virt                                                                                 202G  13.3T   140K  legacy
Storage/.ix-virt/buckets                                                                         140K  13.3T   140K  legacy
Storage/.ix-virt/containers                                                                      140K  13.3T   140K  legacy
Storage/.ix-virt/custom                                                                          200G  13.3T   140K  legacy
Storage/.ix-virt/custom/default_Windows10_Office                                                 112G  13.3T  30.5G  -

I’d be grateful for any pointers.

Making some progress.

I can see the volumes with:

sudo /usr/sbin/zfs list -t volume

It seems like I should be able to dd to a file, copy it and then convert it with qemu-image convert.

Here goes!

Noting progress here for my own benefit :slight_smile:

I didn’t have luck with dd but zfs send seems like it’s working, as per a conversation I found on the old forums but am not allowed to link to.

sudo /usr/sbin/zfs send Storage/.ix-virt/custom/default_Windows10_Office | gzip -c >/mnt/Storage/Home/Backups/win10-office.img

The above leaves me with a ZFS snapshot on my other machine, not the contents of the zvol

$ file win10-office.img

win10-office.img: ZFS snapshot (little-endian machine), version 1, type: ZVOL,

Everything suggests I need to dd if=/dev/zvol/xyz of=... but /dev/zvol doesn’t exist.

Not sure why the volumes are listed in zfs list but nothing’s visible in /dev :thinking:

Ok, I got to the bottom if it.

The reason my volume wasn’t showing in /dev/zvol was because the block had a volmode of none. It needs to be dev to show up as a device.

sudo /usr/sbin/zfs set volmode=dev Storage/.ix-virt/custom/default_Windows10_Office

Now I can see it and dd.

The virtual machine booted immediately on my desktop and I could retrieve the things I needed.

This evening has been a learning experience :slight_smile:

2 Likes

Also, when I was done copying I set things back to how they were so it hopefully won’t cause future trouble.

sudo /usr/sbin/zfs set volmode=none Storage/.ix-virt/custom/default_Windows10_Office