[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] P2V challenge that demands some creativity

Here is a P2V challenge I could use some advice with.


I have a source Windows 2003 physical machine that was upgraded several years ago from Windows 2000.  So its system is at C:\WINNT instead of C:\Windows.  The target is a RHEV VM. 


Booting the source machine from the virt-p2v CD and trying virt-p2v-server fails apparently because the Windows directory is c:\WINNT. 


What about the old-fashioned way – provision a new VM and use Microsoft ntbackup to backup the system drive and system state on the physical and restore to bare virtual metal on the newly provisioned VM?  Well , that also blows up because Windows 2003 installs into C:\Windows and doesn’t give an option to put it anywhere else.  So the target VM has an existing installation in C:\Windows while the source physical machine uses C:\WINNT.  So then the system state restore doesn’t work right and the resulting VM ends up a horrible mess. 


OK, so how do you build a new Windows 2003 system using C:\WINNT instead of C:\Windows?  Microsoft has a KB article with some suggestions.  The 2003 setup program will prompt for an alternate directory if it sees another installation on the target disk.  So the trick is, format the target disk with NTFS, create a \Windows directory on the target disk, then run the 2003 setup program.  It will find the \Windows directory and then prompt for an alternate directory.  Build a fresh install into C:\WINNT and then the system state restore should work properly.


Wonderful, how to create that \Windows directory?  Microsoft documents several suggestions including using an automated answer file on a floppy, or booting an old DOS flopppy or Windows 98 CD and formatting and creating the directory on the target disk by hand before doing the 2003 installation.  None of these work.  DOS and Windows 98 have no clue about virtio disks.  I’m not sure how to go about making a floppy image with the answer file we need.


If this were all physical, the easiest way would take the target disk, plug it into a Windows system, format it and create the directory, then put the disk back in the target server, do the build into \WINNT, and then ntbackup restore.  But I don’t see any option for RHEV to allow the virtual equivalent.  RHEV seems to go to lots of trouble to marry virtual disks to the VMs that create them and doesn’t allow the flexibility to move those virtual disks around.   This is a bummer.


I see a few options:

1 – Modify virt-p2v-server to also allow migrations with C:\WINNT – or even better, to parse boot.ini on the source physical machine to find the right Windows directory.


2 – A hack; Build a 2003 VM in the standard way in \Windows.  Now build Windows 2003 again on the same virtual disk, this time into \WINNT.  Boot the \WINNT copy, edit boot.ini to remove references to \Windows if present, delete the \Windows tree by hand.  Reboot, test, and now ntbackup-restore. 


3 – Preload the virtio block driver into the source physical machine.  Grab a reputable disk image copier with the ability to store disk images on a network share someplace.  Boot the source machine from CD and make an image of its C drive.  Make an ISO file out of that CD, boot the target VM from the ISO and copy the image onto the target virtual disk.


4 – I wonder if a Fedora live CD/ISO has the ability to format and write to NTFS partitions?  BTW, for any Fedora people reading this, I’m  **BEGGING** you – get rid of the elaborate Gnome graphics background pictures!  Do you have any idea how long that fancy background picture takes to paint when looking at the console of a Fedora VM inside RHEV Manager, inside a Windows RDP session, across a slow Internet link???


-          Greg Scott

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]