How to use TBOSDT Pro with QEMU for P2V

User discussion and information resource forum for the TeraByte OS Deployment Tool Suite.

How to use TBOSDT Pro with QEMU for P2V

Postby P19 » Mon May 12, 2014 3:32 pm

This has been bantered about in here and elsewhere, but I think my guide is superior to the others I have seen because it pulls together some links and simplifies the explanation. Making use of the TBOSDT Pro from here and watching a P2V tutorial also from this site, I used this P2V procedure to create a VM running 64-bit Win7 on Linux host running KVM-QEMU. It worked without any surprises or significant difficulty. I thought I would share it to help a lot of others save their time (and hair):


1. With Windows Disk Cleanup, or your preferred cleaner, trim down the contents of the drive to be copied, removing trash, etc.

2. Download the Spice programs to be used for running Windows guests on Qemu, which includes drivers and a couple of executible programs to be installed on Windows. Put the executables files somewhere in Windows so that they will be available to install immediately once Windows boots up in Qemu VM. These programs and drivers can be obtained conveniently in ISO format here, "http://www.linux-kvm.com/sites/default/files/spice-windows.iso". Alternatively, they can be obtained directly from Spice project here, "http://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-0.74.exe".

3. Use IFW or IFL to create backup of Windows drive onto another disk, having settings for the image data to be uncompressed as much as possible so that it can be accessed and moved more efficiently. This backup image can be reused if something gets botched, etc.

4. Use IFW to create a VHD in VMDK format and restore the backup to it. You can specify that the VM disk should be a sparse SCSI because in Qemu the VM disk will be configured as type of Virtio SCSI.

5. Download the Virtio drivers for Windows guests on QEMU from Fedora site here, "http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/". These too are available in ISO format.

6. It is helpful to extract the drivers from these two ISOs and put them in two separate subfolders in the same folder where the VHD was made with IFL, as they will be needed by TBOSDT. Apparently, the Spice installation routine determines which version is needed during installation because there is no distinction when looking at the files. In the ISO with Virtio drivers, which can be explored and manipulated with 7-zip, there are several folders specifiying different versions of Windows. Find the one corresponding to your version and extract its matching folder, taking care to get the correct bitness (32-bit or 64-bit).

7. Download and study a tutorial for the P2V process from Terabyte Unlimited, which can be obtained here, "http://www.terabyteunlimited.com/videos/ifw/osdtool.wmv". This video describes making use of TBOSDT-Pro for creating a VMware Workstation Machine from a Physical Machine. The video demonstrates removing all Windows XP drivers and replacing them with SCSI drivers needed on the VMware virtual machine. Generally, this very same method can be done with other versions of Windows and other drivers, such as Windows 7 and QEMU Virtio drivers. After applying this procedure to the VMDK image, it would be ready to import into a new VM for use in QEMU.

8. Configure the new VM to utilize Virtio drivers (i.e., networking, storage, video) and Spice QXL graphics display, and configure it to import an existing disk instead of creating a new one. I built the VM on a 64-bit Linux host with Virt-Manager, but you can use whatever means you would use normally for building VMs in QEMU. Once the VM has been configured, start it up and Windows should boot. Windows will begin installing all the drivers right away and prompt you to confirm what it is doing. Windows will eventually end up rebooting a few times before finally being ready to use. I did not find it necessary to boot into Safe Mode. At one point or another, the mouse stopped functioning within Windows although it continued working fine when clicking outside the VM. At another point it seemed to stall after I clicked okay to reboot, and I had to force a reset from Virt-Manager although I waited quite a while before doing so. Just as soon as you possibly can after Windows boots, you should procede with installing the two Spice programs that you previously put into Windows as mentioned earlier.

9. All in all, the procedure was not exceedingly difficult. It is important to have watched the video from Terabyte Unlimited and to understand how to apply its method in a general case with other drivers, which can be downloaded from Spice and Fedora sites, as well as from others. The Virtio drivers for a 64-bit Windows OS were verified and signed validly. It is important to verify the files with hashes and signatures so that you can be sure your VM is not corrupted from the beginning. Since it is a good idea to use as clean an image as possible for the restoration to the vhd, take the time to do a thorough malware check and to remove bloat beforehand, as well as to upgrade any of the programs you have installed in Windows.
P19
 
Posts: 68
Joined: Mon Feb 03, 2014 11:38 am

Return to OSD Tool Suite