Meld Homepage , Electronic PCB PCBA , Software .NET AVR PLM BOM , Network TCP UDP MQTT , Microcontrollers AVR ARM , Powersupplys Switchmode , Nursecall MC5000 CD2000

Date: 2020-03-13
Updated: 2021-02-05
Author: Erik Leth Danielsen
Virt P2V Move Windows To Linux

Virt P2V Move Windows To Linux

usb key in video: sudo virt-p2v-make-disk -o /dev/sda ubuntu-16.04

Move existing Windows 7 physical pc to qcow2 file on linux server for running in Virt Manager
virt-p2v, copy physical pc to linux server over ssh connection

Install libguestfs tools On Debian 10
1.First install Virt Manager
Read: virt-manager-qemu-kvm

2.Install libguestfs-tools
sudo apt-get install libguestfs-tools

3.Install VirtIO Drivers, if they exist the tool will inject them into windows when doing the conversion.
Virtio Drivers: fedoraproject
Download: virtio-win iso
copy it to /usr/share/virtio-win/

4.make a link:
sudo ln -s /usr/share/ /share

Make bootable usb key with linux and p2v libguestfs tools for moving physical pc to linux server
Usb key 16gb:
sudo virt-p2v-make-disk -o /dev/sda

Or iso file:
sudo virt-p2v-make-disk -o /home/boot.iso

On my old pc, ubuntu-16.04 was the only there could boot on it, see: virt-builder --list
sudo virt-p2v-make-disk -o /dev/sda ubuntu-16.04

Move Windows 7 physical pc to eldwin7.qcow2 file on my linux server
Important the image will be compressed, my 250Gb Hard Disk had 60Gb Data, the qcow2 file was 40Gb.
1. Boot on the usb key on the phycical pc
2. Window1 virt-p2v libguestfs conversion tool login appears

3. Set the ip to the linux server, SSH username and password
4. Press "Test connection", if Connected to conversion server.
5. Press Next 
Window2 appears

6. Set the file name "eldwin7" and Output format "qcow2"
7. If more Fixed hard disks, select the primary c:
8. Press "Start convertion" This will take some time.

9. Now you can find your pc in /var/tmp/eldwin7.qcow2 on your linux server ready for use in Virt Manager

10. Scrap your old physical pc, Now it can run under linux for the next 10000 yers :-)
Additional Windows 7 Shrink Disk Partition before Move
1. Disable paging file ' this will remove Pagefile.sys
2. Control Panel, Program and Features, Turm Windows features on or off, Disable MSMQ
3. Reset Catroot2 see: 
4. Run Windows Disk Manegement
Virt P2V:
P2V Tools:
P2V Other:
Virtio Drivers: kvm links to fedoraproject
Privacy Policy © MELDCO APS | skovsgaardsparken 6 | 8362 hoerning | E-mail: | VAT ID: 34576149 256652