Move qcow2 image to physical hard drive

cloningqemustorage

I have a qcow2 image that I use to boot an installation of linux using QEMU; I would like to place the contents of that image directly onto a physical hard drive so that I can boot to that linux installation directly from my desktop. I would like to do something like dd if=my-qcow2.img of=/dev/sdb. However, this will clearly not work since qcow2 does not store the contents of the virtual disk in logical order within the qcow2 file. Any suggestions?

Best Answer

QEMU comes with the qemu-img program to convert between image formats.

qemu-img convert -f qcow2 -O raw my-qcow2.img /dev/sdb
Related Question