Migrating a VMWare Server 2 Windows 2003 guest to Oracle VM
By Simon Thorpe on Jul 16, 2009
Currently I have my dual core, 8GB RAM, 3TB RAID 5 array, server running Windows Server 2003 Enterprise and VMWare Server 2 with a Windows 2003 guest. I'm in the process of converting this to Oracle VM and I need to migrate the guest server to running in my existing OVM server pool.
Pre migration tasks
Stopping VMWare tools
There is a good whitepaper on converting physical and VMWare images which mentions that if you have the VMWare tools installed on the guest, disable that service and then completely remove the tools post migration.
Enabling IDE drivers
Reading advice on migrating VMWare images to Xen (Oracle VM uses Xen) I found that my VMWare Server image used a SCSI virtual disk and not IDE. Therefore I needed to install the IDE drivers for Xen use. So I followed the instructions to import the registry data and extract/copy the files in this Microsoft support kb314082. I rebooted the machine just to ensure this change didn't affect the running of the server before I moved it.
Installing PV drivers
In the past I tried running guest servers as pure HVM and found the performance a bit painful. Therefore I want my VMWare image to use Paravirtualisation where possible. Oracle VM provides a set of drivers, "Paravirtualized Drivers for Windows Guests (XP/2003/2008/Vista) 1.0.8 - 32bit/64bit" on edelivery. When installing these drivers answer yes to all the questions about the drivers being uncertified. After these are installed, again I rebooted the machine to verify everything still worked as expected.
Converting VMWare virtual disk from multiple 2GB files to one and preparing for OVM import
|This is where it got a little tricky. VMWare server had created my virtual disk as a bunch of 2GB files and I need to create one single image before I convert to the Xen format. Also VMWare Server 2 had often had problems when I tried to do a snapshot, so I had a lot of messy files in the VM directory. To the right is the list of the files and they needed a good cleanup, this is what I did to create a much simpler set of files.|
- Powered down the server and ran the following command to create one single large virtual disk. Note that you need to do this on an NTFS partition due to a 2GB file limit in FAT32.
D:\VM\ControlVM>vmware-vdiskmanager -r "Windows Server 2003 Hard Disk-000001-cl1.vmdk" -t 0 win2k3.vmdk
Creating disk 'win2k3.vmdk'
Convert: 100% done.
Virtual disk conversion successful.
- Edited the VM image to use this new single disk as you can see below.
At this point I once again fired up the server to double check everything was running as expected.
Migrating server to Oracle VM
Importing the image to the OVM serverNearly there! Next task is to copy the files over to the OVM server and import them. This process will convert the VMWare image to a Xen based file and create a config file so you can boot the machine in Oracle VM. Note that you must have at least twice as much space as the size of the importing VM free on the /OVS/ partition. Because OVM is going to create a new .img file based on the VMWare files, therefore roughly doubling space. Once again you should refer to the good whitepaper from Oracle which contains information on migrating physical and virtual machines to OVM.
- Create a directory in /OVS/running_pool/ on the OVM server and copy the VMWare files into it.
- Login to Oracle VM Manager and switch to the Resources tab and select Virtual Machine Images from the sub tab.
- Hit the import button and choose Select from Server Pool (Discover and register)
- You should now be able to choose your server pool and this will allow you to select the VM template. Note the name will be the same as the directory you created.
- You can then continue to import the new image, this is going to take a while !
- Finally you should be able to switch to the Virtual Machines tab and see that the VM is now listed. Select Power On and fingers crossed the image will start and power up.
Installing drivers for the new Xen hardware
Hoping that your image boots, mine did first time, you should be able to login either via VNC provided by OVM or direct to the server using RDP. Because the paravirtual driver software has been installed, Windows will now be able to actually install and load the drivers for the devices that OVM has made available to Windows. You will start seeing a set of dialogs like the ones below. The following list of devices were detected and installed.
- Xen PCI Device Driver
- Xen Stub Device Driver
- Xen Block Device Driver
- Xen Enum Device Driver
One final reboot then after these devices have all installed and I was up and running! Now I have finally moved all the dependancies from my VMWare Server 2 environment and it is time to rebuild that server as another OVM server...