Convert Virtualbox image: VMDK to RAW
Posted: Fri Dec 04, 2015 2:38 am
1) Quick-quick command list for converting a VMDK image file to RAW and then compressing it:
Using pigz instead of gzip, because it's multithreading (=faster)
2) Restore image to physical disk:
pigz arguments:
The command "pv" is optional, to show the transfer progress (MB/s).
If you don't have "pv", just remove it
Code: Select all
$ qemu-img convert input.vmdk -O raw output.img
$ pigz -9 output.img
2) Restore image to physical disk:
Code: Select all
$ pigz -dc output.img.gz | pv | dd of=/dev/sdX bs=4096
- -d: decompress
- -c output to stdout (to allow piping)
The command "pv" is optional, to show the transfer progress (MB/s).
If you don't have "pv", just remove it