Convert ZVol(s) to Raw

Cup 'O Joe

Member
Oct 22, 2017
11
0
6
33
I tried the below command to convert a VM's zvol to a .raw file, however when trying to boot using that .raw file, the system says there are no bootable devices.

dd if=/dev/zvol/flashpool/vm-101-disk-1 of=/flashpool/vm-101-disk-1.raw bs=1M

Upon further inspection, I have discovered more than one entry in /dev/zvol/flashpool for the single VM zvol, those being:

vm-101-disk-1
vm-101-disk-1-part1
vm-101-disk-1-part2
vm-101-disk-2

I'm confused because I never added a second disk to this vm, and I don't know what the "part1" and "part2" files are doing there. Are the possibly different partitions within the VM's virtual hard drive? If so, how can I include all of them in the dd command to create the .raw file I'm after?
 
And again, I figured it out.

The dd and resulting .raw image was fine, all that was needed extra was to set the cache mode as "write-through" or "write-back" for the VM's hard disk file in the VM's configuration (something that was not needed when using a zvol).