Convert ZVol(s) to Raw

Cup 'O Joe

Member
Oct 22, 2017
11
0
6
32
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).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!