• How To

    OpenQRM and XEN LVM based HVM VM.

    Posted on November 21st, 2010

    Written by CJ

    Tags

    This page is part of my webdevster.com tutorial, see index to OpenQRM and XEN LVM based HVM VM.

    [2.2] Step 2. Install XEN and configure

    Installing the XEN hypervisor, is easy and pretty straight forward, as there are many tutorials online on how to install Xen on many different distributions. However, I suggest you read on, because there are stages in this section which describe how to prepare for integrating Xen VM with OpenQRM.

    prompt>apt-get install libvirt-bin virtinst bridge-utils

    See what Kernels are available for this distribution. Of course you can run the same command to find out what Xen kernel are available on other Debian like distributions, i.e. Ubuntu.

    prompt>apt-get update prompt>apt-cache search xen | grep image
    linux-image-2.6-xen-amd64 - Linux 2.6 image on AMD64, oldstyle Xen support
    linux-image-xen-amd64 - Linux image on AMD64, oldstyle Xen support
    linux-image-2.6.26-1-xen-amd64 - Linux 2.6.26 image on AMD64, oldstyle Xen support
    linux-image-2.6.26-2-xen-amd64 - Linux 2.6.26 image on AMD64, oldstyle Xen support
    xen-linux-system-2.6.26-1-xen-amd64 - XEN system with Linux 2.6.26 image on AMD64
    xen-linux-system-2.6.26-2-xen-amd64 - XEN system with Linux 2.6.26 image on AMD64

    Check out which kernel you have:

    prompt>uname -r
    2.6.26-2-amd64

    So we’ll install XEN with matching kernels. This will also install other XEN packages related for you, i.e. linux-image-2.6.26-2-xen-amd64 linux-modules-2.6.26-2-xen-amd64 xen-hypervisor-3.2-1-amd64 xen-utils-3.2-1 xen-utils-common xenstore-utils

    prompt>apt-get install xen-linux-system-2.6.26-2-xen-amd64 xen-tools

     

    Verify XEN kernel is in the GRUB loader

    Verify Kernel

    prompt>uname -r

    Verify Grub

    prompt>cat /boot/grub/menu.lst

     

      title           Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64
      root            (hd0,0)
      kernel          /boot/xen-3.2-1-amd64.gz
      module          /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/sdb1 ro console=tty0
      module          /boot/initrd.img-2.6.26-2-xen-amd64

    NOTE:
    In my case the Xen installer overwrote all my entries in the grub loader, as noted above :< So I had to change all the boot devices from sdb to sda, this is a bug in Xen, debian, or IBM (don't know); IBM blades are not supported by Debian and vise versa, therefore until IBM decides to support Debian, I have to make changes as they come. You might need to do similar changes, also depending on your server hardware vendor, i.e. dell. In my experience most of Dell's server rated hardware, have less compatibility issues with Debian. Anyways here is the updated correct file, nano /boot/grub/menu.lst. Also don’t forget the nano /etc/fstab.

    Configure XEN Loop

    prompt>nano /etc/modules

    Verify and add if not there:

    loop max_loop=64

    Edit XEN config file, reboot, and verify Xen Kernel running.

    prompt>cp /etc/xen/xend-config.sxp /etc/xen/xend-config.sxp.bak prompt>nano /etc/xen/xend-config.sxp

    Change this:

    #(xend-http-server no)

    to this:

    (xend-http-server yes)

    Change this:

    #(xend-unix-server no)

    to this:

    (xend-http-server yes)

    Change this:

    #(network-script network-bridge)

    to this:

    (network-script network-bridge)

    Change this:

    (network-script network-dummy)

    to this:

    #(network-script network-dummy)

    Verify:

    (vif-script vif-bridge)

    is uncommented

    Change this:

    #(vnc-listen '127.0.0.1')

    to this:

    (vnc-listen '0.0.0.0')

    Change this:

    (vncpasswd '')

    to this:

    (vncpasswd 'SOMEVNCPASSWORD')

    Save it, and reboot.

    prompt>reboot

    Now check your shiny Xen kernel

    prompt>uname -r
    2.6.26-2-xen-amd64

     

    NOTE:
    If you get error on startup:
    Waiting for root filesystem, after installing.
    Once your Grub Menu shows on boot, press E on selected following line:
    Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64
    See Image:
    Then press E on selected following line:
    /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/sdb1 ro console=tty0
    Remove:
    console=tty0
    Press Enter
    Press B on selected following line:
    Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64

    Once it boots into system, make sure to fix this permanently by

    prompt>nano /boot/grub/menu.lst

    Another solution might be to disable the CDROM attached to system, via bios, before boot.

    Now that we have finished the Xen Host Installation, we can move on to installing VNC Server, in the next page 7, Step 3. Install VNC and configure.

    Pages: 1 2 3 4 5 6 7 8 9 10 11

    This entry was posted on Sunday, November 21st, 2010 at 6:51 pm and is filed under How To. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
  • 7 Comments

    Take a look at some of the responses we've had to this article.

    1. " OpenQRM and XEN LVM based HVM VM. "

      Joe
      Posted on November 30th

      I loved this example of how to OpenQRM and XEN servers. It is a truly a complete installation guide. Incredible artcile.

    2. " OpenQRM and XEN LVM based HVM VM. "

      Gert
      Posted on January 21st

      Thanks for the effort you took in writing this article. It really helped me with my first OpenQRM setup!
      Loved it!

    3. " OpenQRM and XEN LVM based HVM VM. "

      Colin
      Posted on January 28th

      Hi,

      A really cool how to about Openqrm, especially when it is pretty hard to find a similar article related Openqrm on the Internet.

      We are testing this product at the moment. Just want to know if you have the experience of integrating Openqrm with a iSCSI storage application, like Openfiler or similar applications.

      Thanks for this excellent contribution.

    4. " OpenQRM and XEN LVM based HVM VM. "

      Posted on February 3rd

      Thanks a ton for This post! Very Informative. Got Exactly what i was looking for. keep it up.

    5. " OpenQRM and XEN LVM based HVM VM. "

      CJ
      Posted on February 11th

      @Colin

      Thanks for your kind words, and great sentence structure; you must be an English major.

      You asked about, “Openqrm with a iSCSI storage application, like Openfiler”, well it’s like netapp filer (cha-ching) and openQRM, but you and the whole world already new that. OpenQRM targets iSCSI model apps, after all it’s a cloud right, and you need a lot of space. I am by no means an expert on Openfiler, netapp, or other iSCSI storage apps. But I hope soon I’ll own some, because that means I’m doing pretty good, ay.

      I can tell you, openQRM is pluggable into almost every environment. So you can merry along with any virtual environment backed by almost any storage app, and openQRM will plug right in and manage it. And if you rather use their proprietary applications to manage, you can also do that as well without interference. Well I hope this all made sense, because it made no sense to me, JK.

      Also here is good read on iSCSI.

    6. " OpenQRM and XEN LVM based HVM VM. "

      Mr Bow
      Posted on August 3rd

      I don’t see “Vol” on this Step “Verify Logical Volume Storage on XEN Host (x01-lc1-cloud1-lvm)”

      Error during selecting volume group ! Please check the Event-Log

    7. " OpenQRM and XEN LVM based HVM VM. "

      rjbutler
      Posted on August 9th

      Thank you for this great howto, this made it so much easier to setup a POC for a project I was hoping to do. I have run into one annoying glitch. OpenQRM rewrites the vm config files in /etc/xen. So any xen config file options that I enter, like usbdevice=’tablet’, just gets erased. I was told to enter them in the xen_generate_vm_config function in /usr/share/openqrm/plugins/xen/bin/openqrm-xen, but I have tried, and this does not work. This seems like such a small thing, but until I can add options to the xen config file when the vm is generated, this program just misses the mark. Have any of you solved this. Your suggestions would be appreciated.

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email:

    Website:

    Message: