I was faced with a challenge of moving virtuals off a XenServer host onto a VMWare 7 host without access to all the nice automated tools that come when you stack enough money on the table for the licenses.
XenCenter has an option to output an OVA file, VMWare can import them. Sounds like a piece of cake, until the point where the format just isn't compatible and VMWare's import just dies. The cost-effective solution was just to dump the VHD files out of XenServer, convert them to VMDK and them upload them onto the freshly installed ESXi installation.
I downloaded the VHD images to a Linux desktop through XenOrchestra. The export option was under the virtual machien's page, Disks then Export VDI content button at the end.
The VHD needed to be converted into VMDK for ESXi to accept it. The qemu-img utility from qemu-utils package did that nicely.
qemu-img -p -O VMDK input.vhd output.vmdk
The file was then ready to be uploaded to the ESXi host with SFTP. SFTP needs SSH to be enabled, had to enable it from ESXi's web GUI.
I created a directory for the new image under the /vmfs/volumes/datastore1 which was the default location and then uploaded the new .vmdk file. Last step in image handling was to turn the .vmdk file into thin provisioned. ESXi comes with the vmkfstools utility to do just that.
vmkfstools -i input.vmdk final-name.vmdk -d thin
The old vmdk file could now be removed and the image was ready for use. I created a new virtual and instead of creating a new harddisk, I selected to use an existing image, then chose this freshly copied one.
For Windows hosts I copied the network adapters' MAC addresses so they stay activated.
Windows hosts will take a bit longer on the first boot, as they first try to search for the XenServer's devices before giving up and finding the VMWare's virtual disk controller.
As a finishing touch, I removed the XenServer guest tools and installed VMWare's offering.
No comments:
Post a Comment