Migrating a Windows 2000 VmWare Virtual Machine to VirtualBox

Filed under: TechNotes, VMWare — lars @ 12:24:55 pm

Today I decided I'd like to play around with the rising force in virtualisation, VirtualBox - particularly because it has that nice seamless windows feature. The problem is that the virtual machines I use for my work were created (some time ago) using VMWare - and the guest OS is Windows 2000. Even though VirtualBox now supports VmWare's open vmdk disk format, this creates a couple of complications:

  • Windows 2000 decides on a HAL (Hardware Abstraction Layer) at install time, making it tricky to move the install from one set of virtual hardware to another.
  • Vmware disk images are created as SCSI by default and VirtualBox only emulates IDE.

I think newer versions of windows (like XP) are a bit better at detecting changes in the hardware after install.

So, as expected, my first attempts at trying to boot my VmWare disk image in VirtualBox resulted in the VM crashing a few seconds boot-up, as soon as the Windows 2000 text progress-bar reaches the right of the screen (before the windows logo is displayed).

Here are the steps I had to go through to get it working. What you need is:

  • Your original Windows 2000 boot CD or ISO image
  • A Windows 2000 CD Key
  • The administrator password for your Windows 2000 install (This may not be required, see below)

Here goes:

  1. First thing was to copy the VM disk image, so I could play with the copy.
  2. Next, I booted the copy in VmWare and uninstalled VmWare tools, as these will not be needed for VirtualBox.
  3. Then I took a look at the Windows migration page on the VirtualBox site:
    http://www.virtualbox.org/wiki/Migrate_Windows
    which had some valuable information. I ran the MergeIDE utility linked to on this page, in an attempt to stop Windows from thinking it must boot off the same device it was installed on to.
  4. I then shut my VM down cleanly (ie - no suspend).
  5. Now I needed to create a new VM in VirtualBox, as similar as possible to the VmWare configuration, using the VmWare .vmdk file as the disk, and adding my Windows 2000 install CD iso as the CD-ROM drive contents.
  6. Next step is to ensure we Windows doesn't attempt to start the AGP service (as VmWare supports AGP emulation but VirtualBox does not).  I booted the new VirtualBox VM from the windows CD, selected 'R' and followed the menu prompts to enter the recovery console. At this point you are prompted to enter the password for the Administrator user of your Vm. Once in, you use the 'listsvc' command to check if you have a service called agp440, and if so the 'disable agp440' command to disable it. See http://support.microsoft.com/kb/324764 for more details.

    (Note that according to the Virtualbox site, you can alternatively just delete C:\Windows\SYSTEM32\drivers\agp440.sys. I have not tried this, but might be a workable option if you don't have your Administrator password.)
  7. Upon exiting the recovery console, the VM reboots.
  8. Next is a repair installation of Windows 2000, to give it an oppurtunity to re-detect VirtualBox's virtual hardware.  I booted off the Windows 2000 install CD again and this time, as soon as you see the prompt 'Press F6 if you need to install a third party SCSI or RAID driver.', pressed F7. (Yes, that's right, F7, not F6). Note - there is no visual feedback to show that you've pressed F7 - you just have to cross your fingers that it worked!
  9. When prompted to select between install or repair, select install (ENTER).
  10. F8 to agree to license.
  11. Select your windows install and select 'R' for repair.
  12. Windows will copy some files, then reboot. Now let your VM boot from the hard-drive (Not the CD-ROM) and an 'Upgrade' install will commence - including completely new hardware detection.
  13. As part of this install, you will need to re-enter your product key!
  14. When the install completes, your VM will reboot. Allow it to boot from the hard-drive again, and everything should work! You will need to install the VirtualBox Guest add-ons (equivalent of VmWare tools).

That's the process that worked for me. This even worked despite my .vmdk image being for a SCSI drive in VmWare. Apparently the disk geometry is different between SCSI and IDE, so I can't guarantee that this will work for everyone - perhaps it does, or perhaps I was just lucky (and having a VM image created probably 3 years ago may have helped).

I also noticed that this upgrade install process replaces your c:\winnt\system32\drivers\hosts file, so if you had any customisations in there, you'll need to restore them.

As for VirtualBox, it seems nice. The seamless windows feature isn't quite 100% seamless (alt-tab will only let you switch between either your guest windows or your host windows, not both at the same time) - it's more like your guest desktop becomes transparent and lets you see your host desktop underneath. But it's certainly a step in the right direction. I look forward to future versions!

Comments

No Comments for this post yet...

    Leave a comment

    Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>


    Options:
    (Line breaks become <br />)
    (Set cookies for name, email & url)




    powered by  b2evolution