LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   P2V using dd and qemu-img (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/p2v-using-dd-and-qemu-img-4175637857/)

Sum1 09-05-2018 03:42 PM

P2V using dd and qemu-img
 
I need to work with vlans and vm's on my current workstation and wanted to see if anyone has successfully converted a physical windows installation to vm doing the following:

<</dev/sda2 is the partition holding the windows installation>>

Code:

[root@local~]$dd if=/dev/sda2 of=/mnt/storage/win-os.img bs=4K conv=noerror,sync
Code:

[root@local~]$qemu-img convert -f raw -O qcow2 /mnt/storage/win-os.img win-os.qcow2
Will this make a usable windows vm with kvm?

Thanks for your guidance.

jefro 09-05-2018 04:45 PM

No it won't work.

A P2V program takes a proper install usually and converts both the loader and the OS area. It also converts the HAL so that it can work on the new hardware. Remember windows doesn't like to be moved.

One might do a full backup with systems state and then restore it one top of a clean install to new VM may work. Your agreement with MS will tell how or if you can move this install.

If are simply testing then get an Offical MS VM image maybe or any of the MS products should work for a short time on a VM.

Sum1 09-05-2018 05:15 PM

Quote:

Originally Posted by jefro (Post 5900270)
No it won't work.

Remember windows doesn't like to be moved.
If are simply testing then get an Offical MS VM image maybe or any of the MS products should work for a short time on a VM.

As always, thanks for the guidance, Jefro! :-)
Unfortunately, as I suspected.
I'll see what's possible with an official MS VM image.


All times are GMT -5. The time now is 01:27 PM.