How to Upgrade to VMware vCenter 4.1 from vCenter 4.0 32 bit Using the Data Migration Tool

Here is a very useful KB article on migrating an existing vCenter Server database to 4.1 using the Data Migration Tool:

Also, here’s a great blog post on VMware’s blog showing how to upgrade vCenter 4.0 32 bit to vCenter 4.1 64 bit by using the VMware Data Migration Tool.
Copied below for reference.

Our first video covering vSphere 4.1 is now live. The video compliments KB article 1022137 vSphere 4.1 upgrade pre-installation requirements and considerations. and describes the process for using our Data Migration tool to upgrade VMware vCenter Server 4.1

VMware vCenter 4.1 is part of the VMware vSphere 4.1 product suite and the Data Migration tool allows you to migrate your vCenter Server 4.0 configuration, since VMware has now entirely gone to a 64-bit platform. 64-bit brings significant performance benefits, but it also introduces some challenges that need to be considered before upgrading.

Sit back, grab that cup of java and take in a little KBTV.

How to upgrade to VMware vCenter Server 4.1 using the Data Migration tool


The Data Migration tool is provided with your vCenter Server 4.1 installation media.

Heads up Citrix users

Heads up if you use XenDesktop 5 or XenApp 6.

If you get the error “An error occurred while making the requested connection” when trying to connect through web interface running Xendesktop 5 or XenApp 6 the issue could be a Microsoft patch.  We just ran into this issue with XenDesktop 5.

This is the patch that wreaks havoc.

Here is a forum article related to the issue

You will also get the following errors or similar in the event log

Log Name:      Application

Source:        Citrix Web Interface
Date:          9/30/2010 8:49:17 AM
Event ID:      30024
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ftlvxa5x86.adolfolab.ctx
Site path: C:inetpubwwwrootCitrixAG5.

The XML document sent by the Citrix servers could not be processed because it contains invalid XML. This message was reported from the XML Service at addresshttp://localhost:80/scripts/wpnbr.dll [com.citrix.xml.NFuseProtocol.RequestLaunchRef]. The specified Citrix XML Service could not be contacted and has been temporarily removed from the list of active services. [Unique Log ID: e28daedd]

P2V Conversion of Linux Virtual Machine (for XenServer)

With XenServer 5.6 Citrix removed the old Linux P2V tool which was included in earlier versions of XenServer. The old version 5.5 tool will not work with XenServer 5.6, and only supported older distributions.

For this reason is may be desirable to manually convert a Linux physical machine to a XenServer VM. This document attempts to provide a general guide to completing this process.

Move system image to VM

There are several ways to do this. Any tool which can copy the blocks or the filesystem from one “bare metal” machine to another will work. You can use a live CD like Knoppix, or the “System Rescue CD” or commercial utilities like Ghost or even PortLock storage Manager. Most linux distributions also have a “recovery” mode from the install media which can also be used for this. If your machine is a VM from another platform you can convert the disk to a VHD or an OVF and simply import that.

In this example we’re going to use a basic live CD, and the DD utility to move the block image intact to the new VM. As always there is more than one way to skin this particular cat.


Once you’ve booted your live CD, Verify where your fileystems are at. In this particular case our root filesystem is at /dev/sda3 and the /boot filesystem is at /dev/sda1

Make sure that these are the real fileystems of the machine you’re wanting to convert. The example above might not match your environment!

Knowing where these are at is critical. Depending on the live CD and your particular partitoining/LVM layout your configuration may be different.


We want to capture our current partition information, and the size of the source disk. Our target disk will need to be as large or larger than the source.


Get yourself some space to work with. Above we created a mount point /mnt/nfs and attached to some handy NFS storage, but you could also use a CIFS based fileshare, or with a little creativity the need for the disk space can be mitigated through use of an SSH tunnel.


Use dd to copy the harddisk to an image on the NFS server. Note that dd does not produce any output until the job is complete. Sending a hup signal to the process will give you some progress information however.

If possible, it’s always cleanest to dismount or make sure the fileystems are not mounted before you start the dd process. Failure to do so can result in corrupted filesystems on the target.


When the dd is complete, we can shutdown the source system.

Create target virtual machine and restore the image


Use the other install media to create a HVM mode virtual machine which we’ll transfer your image into. Complete the wizard configuring RAM, CPU, and Networking to your needs. Make sure you configure the storage to match the size of the original machine’s disk.


Make sure your storage is correct. Mount your live CD on to the VM.


Boot the VM from the live CD and confirm that you see the VM’s hard disk and that it’s the correct size.


mount the file share, and reverse the dd command to write the image onto the virtual machine’s hard disk.


When dd completes, reboot the VM and eject the CD.


Ok, so far so good, the VM booted the transplanted OS. Now we just need to convert the HVM to a PVM and enable the XenServer tools.

Converting the HVM into a PVM mode virtual machine.

HVM based virtual machines work by emulating physical hardware and allow unmodified guests to run on top of XenServer. Such machines allow operating systems like Windows which cannot be modified to boot and run on XenServer.

PVM based virtual machine work by way of sharing physical devices in an intelligent manner made possible by the virtual machine’s awareness that it is a VM. This requires modification of the system’s kernel and device drivers. PVM mode guests are almost exclusively Linux based.


Start by checking the virtual machine’s filesystems – note that we are currently booting from /dev/hda# indicating emulated hardware.

Knowing that we’re on emulated hardware, and now knowing where our volumes live we can start modifying the operating system to run on paravirtualized hardware.


modify /etc/modprobe.conf (or your distribution’s equivalent) to include the xen modules for storage and networking. You can also probably remove the old hardware modules if present.

vi /etc/modprobe.conf
alias scsi_hostadapter xenblk
alias eth0 xennet


Install the Xen-aware kernel for your distribution. This will be something similar to “yum install kernel-xen”

Make not of the kernel version which is installed.

Update the bootloader configuration so that the new kernel is the default, and that the bootloader is configured properly for Xen. Note the before and after screenshots below.




After – the changes are highlighted above.


Rebuild the initrd including directives to preload the xen driver modules. Note that you MUST build this appropriately to the kernel version you just installed.

One the initrd has been rebuilt, shut down the os cleanly.


Activity now moves to the console of the Xen Host. You can do this within the console provided by XenCenter, or from a ssh session.

Use the xe vm-list command to determine the uuid of the virtual machine you’re working on. We want to modify this VM to be a PVM mode guest rather than a HVM mode one.


Update VM Parameters to enable PVM mode
xe vm-param-set uuid=<vm uuid> HVM-boot-policy=””
xe vm-param-set uuid=<vm uuid> PV-bootloader=pygrub
xe vm-param-set uuid=<vm uuid> PV-bootloader-args=”–kernel <path to kernel> –ramdisk <path to xen initrd>”
xe vm=param-set uuid=<vm uuid> PV-args=”root=/dev/xvda#”


Obtain the UUID of the virtual machine’s boot disk using the xe vm-disk-list command. The UUID supplied is the UUID of the virtual machine.

You now want the VBD UUID for the boot disk.


Mark the VBD as bootable using the xe vbd-param-set uuid= command as shown above.

Restart XenCenter

For unknown reasons it is necessary that XenCenter be restarted at this point. Exit and restart XenCenter.

Failure to do so will prevent you from seeing the console of the VM when it’s powered on.


Check the properties of the VM, and make sure that the HD is set as the only boot device for the VM. Then power on the virtual machine.

This is the point where we will find what mistakes have been made – if the system panics, double check your boot device/paths/etc.


The system is up on the Xen Kernel


The fileystems are up on the paravirtual devices as well.


However XenCenter does not yet report that we are running fully paravirtualized, and features such as live migration will not yet be available.


Mount the xs-tools.iso to the virtual machine, and then mount the cdrom within the vm.


Install the XenServer tools


The tools are now installed.


Now XenCenter will report the system as being optimized, and live migration is available.

Reboot the virtual machine and eject the CDROM.



One last issue may exist depending upon the configuration of the network adapter. Shown above eth0 is down.

You will need to ‘fix’ the networking config for your distribution. For RHEL/CentOS the relevant configuration lives under /etc/sysconfig/network-scripts in a file named ifcfg-eth0

This file must exist, it may have been renamed (.bak) if so copy it back then modify the copy.


Remove or comment the HWADDR line and save the file.


Restart the network to bring the interface online.


This completes the conversion. Your linux system is now a XenServer paravirtualized virtual machine.

Summary cheat sheet

Remove any attached CDs

Boot the imported VM
vi /etc/modprobe.conf adding
alias scsi_hostadapter xenblk
alias eth0 xennet

yum install kernel-xen

Update /boot/grub/grub.conf
Make the Xen Kernel the default for boot
Make note of the kernel and initrd file names
Modify grub.conf to be similar to the below
title CentOS (2.6.18-128.2.1.el5xen)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-128.2.1.el5xen ro root=LABEL=/
initrd /boot/initrd-2.6.18-128.2.1.el5xen.img

Make new Xen initrd
mkinitrd -v -f –preload=xennet –preload=xenblk /boot/initrd-2.6.18-128.el5xen.img 2.6.18-128.el5xen

shutdown the VM

Find uuid of the VM (b6ebbe09-2bcb-5c40-0f98-f33426487142)
xe vm-list

Update VM Parameters
xe vm-param-set uuid=<vm uuid> HVM-boot-policy=””
xe vm-param-set uuid=<vm uuid> PV-bootloader=pygrub
xe vm-param-set uuid=<vm uuid> PV-bootloader-args=”–kernel <path to kernel> –ramdisk <path to xen initrd>”
xe vm=param-set uuid=<vm uuid> PV-args=”root=/dev/xvda#”

Find UUID of boot disk
xe vm-disk-list uuid <vm uuid>
… looking for the vBD UUID of disk0

Set the disk VBD to bootable
xe vbd-param-set uuid=<vbd uuid> bootable=true

exit and restart XenCenter console (odd bug)

Check the boot settings for the VM, make sure only hard-disk (HD) is selected.

Start the VM

install XenServer tools & reboot.

First few hours on the Motorola Xoom

Just spend my first few hours on the Motorola Xoom that we have acquired for our Desktop Virtualization showroom!

The list of hardware and software continues to climb.  Any vendors want to get on the list?

  • Citrix XenApp/XenDesktop
  • VMware View
  • VMware vSphere
  • AppSense
  • Wyse Xenith
  • HP Thin Clients (various)
  • HP 8440p laptop (Citrix XenClient capable)
  • Streamed VHD delivery to HP All-in-one PC
  • Motorola Xoom
  • iPad 2
  • Dell Equallogic storage
  • HP P4000 (older Lefthand units running latest SANiQ)
  • NetApp
  • Dell m600 and m610 blades (thank you VERY much Dell for the additional memory!!!!

Soon to be added… Fusion-io card…wurd!

Thanks for attending April 2011 Lewan Tech Review

Thank you to those who came to our Lewan Tech Review, I hope you found it informative and hopefully I didn’t talk to fast…tough after needing lots of coffee to wake up in the AM!  Please vote for our next Tech Review and be sure to signup for the AppSense training we are doing on April 13th and May 4th!

Here is the presentation from today…click the link below:

Lewan Tech Review April 7, 2011