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
4 - I wonder if a Fedora live CD/ISO has the ability to format and write to NTFS partitions?
A variation on this option is promising. Here are the steps: 1 - Download a Fedora 16 Live ISO; use ISO uploader to copy it to your ISO storage. 2 - Make sure you also have a Windows 2003 ISO and virtio-win VFD in your ISO storage. 3 - Provision a VM with system drive the size you want and OS Windows Server 2003. 4 - Select your newly provisioned VM and "Run once". Put the CDROM first in the boot order. Attach the CD to your Windows 2003 ISO. Attach the floppy to your virtio-win VFD. 5 - Press F6 when the Windows setup boots; after it loads, press "S" and load the Red Hat virtio driver. 6 - Start a Windows installation as normal; create a partition do a quick NTFS format. 7 - Abort the install as soon as the format finishes. 8 - Stop your VM. 9 - Do "Run Once", putting the CDROM first in the boot order again. This time attach the CD to the Fedora 16 Live ISO. 10 - Do something else for several minutes later while that Gnome picture slowly paints. 11 - When it finally finishes painting that screen picture, launch a terminal window. 12 - In the terminal window, do the following: ls /dev | grep vda 13 - You should see files named vda{nn}, where {nn} is a number. The one you want is probably vda1. 14 - mkdir /greg mount -t ntfs /dev/vda1 /greg cd /greg mkdir /Windows rm (or rmdir) anything else sitting there. 15 - Stop your VM. Do another "Run once." Attach the Windows 2003 ISO to your CDROM and wirtio-win VFD to your floppy. 16 - Press F6 again to load the Red Hat virtio block driver as before. Do a normal Windows 2003 install; note that this time it will find a /Windows directory and prompt to install into another directory. Here is where you install into /WINNT. 17 - Use ntbackup to backup and restore the C drive and system state from the source server on top of the newly built VM. - Greg
participants (1)
-
Greg Scott