Migrating a VMWare Server 2 Windows 2003 guest to Oracle VM

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.

Stopping VMWare tools

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 running in VMWare Server 2 and copied the files shown right to my local Windows workstation.
  • I had VMWare Workstation 6 installed which allowed me to power up the server. I switched the networking to host only mode so that it didn't clash with the other server which I had powered back up. Once booted I logged in and stopped some services (SQL Server, a monitoring tool and such), moved files around so that my machine only required one virtual hard disk.
  • I had two disks associated with this image after moving around some files I detached the second data disk from the image so that only one remained.

VM-OVM01.gif


  • 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.

VM-OVM02.gif

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 server

Nearly 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.

VM-OVM03.jpg

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

VM-OVM04.gif
VM-OVM05.gif
VM-OVM06.gif

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...

Useful references for migrating from VMWare to Xen based virtual machines.
http://www.virtualbox.org/wiki/Migrate_Windows
http://ian.blenke.com/vmware/vmdk/xen/hvm/qemu

Comments:

Another tip: before converting a VMware image, it is strongly recommended to completely uninstall the VMware Tools package first. Otherwise, you may find driver conflicts when booting or installing the PV Drivers.

Posted by Avi Miller on July 20, 2009 at 02:16 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Simon Thorpe, senior consultant at Oracle, blogs about simple and useful tips when working with Oracle technology.

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today