XEN PV VM on VMware ESX

Seems like a total waste of time without practical use? Well, it is — unless you need to test drive an idea that will be rolled out in your production data center running XEN PV but you have only VMware ESX as a playground.

Since I spent a little time putting the pieces together I will share my experience based on CentOS 5.5. Basically it all went es expected, I only had some trouble to get the XEN PV VMs into the regular network via bridging versus the NAT which is the default that comes with CentOS.

Basic Setup:
  • Configure your VMware VM to allow promiscuous networking:
    • Allow promiscuous networking on the vSwitch
    • Add this line of manual configuration to the Extended Configuration of the VM:
      ethernet0.noPromisc=“FALSE”
  • Install regular CentOS and add the group "Virtualization":
    yum groupinstall Virtualization
  • Make sure that there is enough free disk space in /var/lib/xen/images to store your virtual disk images.
Network Setup: 
  •  Edit /etc/libvirt/qemu/networks/default.xml to look like this:
    <network>
       <name>default</name>
       <uuid>b8d5fcff-599b-48ce-a8fc-fdcf34506711</uuid>
       <bridge name='lan' stp='on' forwardDelay='0' />
    </network>
    lan is the name of our virtual bridge, keep your original UUID in place.
  • Edit /etc/xen/xend-config.sxp:
    • change the network-script line to look like this:
      (network-script /bin/true)
      this disables the network setup by XEN because we let CentOS do it instead.
    • change the vif-script line to look like this:
      (vif-script 'vif-bridge bridge=arc_int')
      this configures XEN to also use our virtual bridge
  • Edit the CentOS network-scripts for bridging:
    • Create /etc/sysconfig/network-scripts/ifcfg-lan like this:
      DEVICE=lan
      TYPE=Bridge
      BOOTPROTO=dhcp
      ONBOOT=yes
      DELAY=0
      NM_CONTROLLED=no
    • Edit /etc/sysconfig/network-scripts/ifcfg-eth0 like this:
      DEVICE=eth0
      HWADDR=00:50:56:93:00:02
      BRIDGE=lan
      ONBOOT=yes
      Leave the MAC address as it was to match your NIC.
  • Reboot system to test if network configuration is correct
Basically that was all I had to do to use XEN PV VMs on VMware ESX. You can manage the VMs as usual with virt-manager, virsh and xm.

The only drawback of this setup is the the low performance of the XEN VM, but for testing purposes and to develop scripts and automation this does not matter and I was happy to skip ordering and setting up a hardware server just to test a few scripts.

    Comments

    Like this content? You could send me something from my Amazon Wishlist. Need commercial support? Contact me for Consulting Services.

    Popular posts from this blog

    Overriding / Patching Linux System Serial Number

    A Login Security Architecture Without Passwords

    Fixing Chrome Color Printing on Linux with HP Color LaserJet M880