Courtesy of the Citrix Project Kensho work over the past 18 months we have spent a good deal of time looking at the interoperability of virtual machines between hypervisors.
If you didn't already know: Kensho uses the still evoloving OVF Standard from the DMTF and has given rise to the Citrix OVF Tool; that can export multi-vm workloads from XenServer and/or Hyper-V, as well as import OVF content from VMware into XenServer or Hyper-V. Kensho has also added the OVF capabilities into XenConvert.
Before we outline the steps below, Hyper-V was chosen for this first example because the publically available tools are Hyper-V specific, and because Citrix is using VHD as its OVF package standard. There will be more later about taking this same VM to ESX.
The Tools:
We need to obtain (download) a few things and a couple need to be installed.
- The Citrix Merchandising Server Virtual Appliance
- The Hyper-V Linux Integration Components ISO(v1, not R2)
- Citrix Project Kensho OVF Tool
- Citrix XenConvert
- Some Linux distribution "Live CD" - Debian Lenny Live
- A Hyper-V Host
Explanation of the Tools:
The Merchandising Server is the appliance used for the example. XenConvert is to convert the XVA (XenServer export format) into an OVF based appliance. The Kensho OVF Tool is to import the OVF into Hyper-V. The Linux distribution "Live CD" is to mount the virtual disk of the appliance to modify the Grub boot loader and copy some files. And the v1 Linux Integration Components have the magic PV kernel shim that is needed.
The process:
- Expand the Merchandising Server bz2 zip archive. (WinRAR can do this, and others as well)
- Use Citrix XenConvert 2.x to convert from "Xen Virtual Appliance" to "Open Virtualization Format (OVF) Package"
- Do not create an OVA, just an OVF.
- Use Citrix Kensho OVF Tool to Import the OVF Package from step 2 to a Hyper-V host.
- Do not boot the VM at this time.
- Attach the Live CD ISO to the VM
- Set the boot order to boot from DVD first
- Remove the default Network Adapter and add a Legacy Network Adapter
- Add a second DVD drive
- attach the Hyper-V (v1) Linux IC ISO to the second DVD drive of the VM
- Boot the VM into the Live CD and log in to its console
- Debian will auto logon as 'user'.
- switch to root: sudo -i
- This command is specific to Debian Live
- Discover the IDE disks:
- cd /dev
- ls hd*
- Mount the virtual disk (the vhd)
- make a mount point folder: mkdir /mnt/mine
- mount the disk to the folder: mount /dev/hda1 /mnt/mine
- explore the volume
- cd /mnt/mine
- ls
- /mine looks like a common Linux /boot volume:

- Mount the Linux IC DVD drive (mine is the second dvd on controller 2):
- mkdir /mnt/cdrom
- mount /dev/hdd /mnt/cdrom
- Copy the kernel shims from the ISO to the virtual disk
- cd /mnt/cdrom/shim
- cp . /mnt/mine
- Edit the device.map
- cd /mnt/mine/grub
- nano device.map


- Edit the GRUB bootloader to load the shim and the kernel.
- nano menu.lst
- Comment the 'hiddenmenu' option and increase the timeout so I can test.

- Create a new entry specific to the shim and the distribution kernel-xen
- Notice that the kernel is the shim file copied from the previous step and the existing kernel and initrd load as modules of the shim.

- Notice that the kernel is the shim file copied from the previous step and the existing kernel and initrd load as modules of the shim.
- Modify the default selection to point to my new entry.
- The default entry begins counting at "0"

- The default entry begins counting at "0"
- Unmount the virtual disk and the cdrom
- cd /
- umount /dev/hda1
- umount /dev/hdd
- Shutdown the virtual machine and remove the ISOs from the DVD drive (also remove the second virtual dvd drive).
- Boot the virtual machine, note the new menu selection that was created - this is the kernel that should boot. Select it if you did not set it as the default.

Comments (5)
Oct 12
Anonymous says:
Great that you guys did this for Hyper-V, but where's the ESX guide that everyon...Great that you guys did this for Hyper-V, but where's the ESX guide that everyone actually wants?
Shawn
Oct 13
Brian Ehlert says:
Shawn: I am glad that you brought that up. Converting the currently provided Me...Shawn:
I am glad that you brought that up.
Converting the currently provided Merchandising Server virtual appliance is a bit more difficult.
I have tried numerous ways (without having direct access to the source, or attempting to create a new appliance) with little success. I have learned quite a bit in the process, but nothing that gave me success.
Addressing this issue with Hyper-V was possible due to the PV kernel shim - which allowed me to keep the origional kernel in place and un-changed. However, the shim will not run on ESX - I am guessing because the hypervisor architecture is too different between the two.
I do know that the very issue you mention is being addressed, but I do not know the timeline.
Nov 06
Daniel Gauthier says:
I have a solution, 1) create a new virtual machine VMware Linux Centos 5 2) In...I have a solution,
1) create a new virtual machine VMware Linux Centos 5
2) In the VMware virtual machine Centos 5 Linux install the patch citrix-merchandising-server-1.1.0-0.i386.rpm
3) attached to the VMware virtual machine Centos Linux 5 the original disc-merchandising citrix-server-1.1.0.xva (converting into .Vhd or .Vmdk)
4) boot and enjoy it
Daniel
Nov 06
Anonymous says:
Hi Daniel This sounds very interesting. In step two where you talk about applyi...Hi Daniel
This sounds very interesting. In step two where you talk about applying a rpm, do you mean you need to install centos 5 first?
Ollie
Nov 09
Daniel Gauthier says:
Yes i've installed centos 5 before in the new vm ! DanielYes i've installed centos 5 before in the new vm !
Daniel
Add Comment