Bhyve VM not working - how to recover data from ZVOL?

Status
Not open for further replies.

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
I previously setup a Bhyve instance that is currently not working.

I am currently on FreeNAS 11.2 RC2.

From the WebUI I am able to boot the VM - however, VNC output isn't working, Serial output shows nothing, and the machine doesn't seem to be grabbing a DHCP lease either.
M.
The VM is using a Zvol as it's disk - "vmstorage/qbittorrent-vm-disk" - which is backed by a 512 GB M.2 SSD.

Is there some easy way of reading this data disk directly from FreeNAS itself, so I can recover the data off it?
 

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Based on this old thread I thought I'd try dd. (This page also mentions using dd with a zvol):

Code:
root@freenas-naulty-place[/mnt/datastore-naulty-place/documents]# dd if=/dev/zvol/vmstorage/qbittorrent-vm-disk of=./qbittorrent.img bs=1m
460800+0 records in
460800+0 records out
483183820800 bytes transferred in 1217.121099 secs (396989109 bytes/sec)


If I run file on it:
Code:
root@freenas-naulty-place[/mnt/datastore-naulty-place/documents]# file qbittorrent.img
qbittorrent.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 943718399 sectors, extended partition table (last)

Now the question is how to read it back - fdisk -l <img> doesn't seem to work on FreeNAS/FreeBSD.

Should I create a new Bhyve VM, and add the disk somehow?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
basically mount the file as a block device with mdconfig and then mount the partitions as normal. If FreeBSD cannot mount the partitions, move the file to a system that can.
 
Status
Not open for further replies.
Top