I want to convert a Windows 7 C:\ Drive from my previous laptop into a qcow2 image which I wan to use to create a KVM virtual machine from on a new (linux based) computer.
I guess the simplest way would be some sort of dd plus a qemu-img convertoperation.
1.) Boot the old W7 laptop from a live system and run:
dd if=/dev/sda1 of=/path/to/W7.img
(would I need to add any dd options to make that bootable? any other options [for blocksize i.e.]) recommended?)
2.) On the new machine say something like
qemu-img convert -f raw -O qcow2 /path/to/W7.img /path/to/W7.qcow2
that should give me a pretty exact copy with the same size of the C:\ drive I guess.
Now the original C:drive is quite large and half empty, so I'd like to have a dynamically expanding qcow2 image as an end result and likewise reduce it's size.
Is there any option I can add to the qemu-img convert operation which would help to achieve that?