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
PRELIMINARY
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


Short
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
using libguestfs.org

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: https://mywindowshub.com/what-are-catroot-and-catroot2-folders-how-to-reset-the-folder/ 
4. Run Windows Disk Manegement see: https://www.youtube.com/watch?v=X-0R7Q_vhmw
Back
Sources
Virt P2V: https://www.youtube.com/watch?v=2DrHDtdpmcQ
P2V Tools: http://libguestfs.org
P2V Other: https://www.youtube.com/watch?v=Hl7Dkb6Ajvo
P2V DD Command: https://www.youtube.com/watch?v=XjDBcFx7b-4
Virtio Drivers: kvm links to fedoraproject
Privacy Policy © MELDCO APS | skovsgaardsparken 6 | 8362 hoerning | E-mail: info@meldco.dk | VAT ID: 34576149 451562