• 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.

    [3.3] Step 3. Provision XEN-Storage Host in OpenQRM as Resource

    Login to OpenQRM webUI, and go to:

    OpenQRM > Base > Data Center > Appliances > List

    You will now see the new resource type Physical System, which was created using the Local-Server plugin CLI command; it has a really nice green checkmark next to it. At this point, you’ll want to click on Edit. Locate, “Resource Type”, and select “XEN-Storage Host”. Create an optional comment; this is a very nice option you should take advantage of. Leave everything alone and click Save.

    Should look like this:
    Xen OpenQRM Integration

    [3.4] Step 4. Verify XEN LVM VM on Remote/Local XEN Host Server

    Create Storage Name

    In order for OpenQRM to show us the LVM storage we created in Xen Host, we have to give this storage a ‘reference’ name. So this step doesn’t actually create a storage, as it’s only to reference the storage so you can view, create, and manage storage.

    OpenQRM > Base > Data Center > Components > Create > Storage

    • Pay Attention, on the Deployment drop down, select XEN LVM Storage.
    • Select x01 Server (Xen host), Physical System on Res. 1, radio button, and click on select.
    • Give the new storage a name, x01-lc1-cloud1-lvm, click save.

    Should look like this:
    Xen OpenQRM Xen-Storage Plugin

    Verify Logical Volume Storage on XEN Host (x01-lc1-cloud1-lvm)

    In the step we’ll verify the LVM we created in previous Chapter 2.

    OpenQRM >Plugins > Plugin Manager > Virtualization > XEN-Storage > XEN Volumes

    • Select Xen LVM Storage type (x01-lc1-cloud1-lvm) radio button, and click on select.
    • Select ‘vol’ radio button, and click on select-vg
    • You’ll notice you will have options like, snap, clone, and resize of the lvm ;)
    • You’ll also notice (verify) our vmx01cms01 LV, which we created in chapter 2.

    Should look like this:
    Xen OpenQRM LVM Clone Snap Resize

    Verify XEN VM on XEN Host

    In this step, we’ll verify the the Xen VM we created in chapter 2.

    OpenQRM >Plugins > Plugin Manager > Virtualization > XEN-Storage > XEN VMs

    • Select x01 radio button, and click Select.
    • You’ll notice (verify) our vmx01cms01, VM we created in chapter 2.
    • If you get an X mark on the status of vmx01cms01 VM, you can safely disregard, as this VM cfg file will be recreated, in the latter step.

    Should look like this:
    Xen OpenQRM Verify VM Guest domU

    [3.5] Step 5. (Optional) PXE Boot

    Allow OpenQRM to start Xen Host

    • Access bios, and enable PXE Boot for Xen Host.

     

    [3.6] Step 6. (Optional) Import Xen Host Kernel to OpenQRM

    This Step 6 is optional. When you first integrate a Xen host, like in our ongoing tutorial, OpenQRM will auto create a Kernel, named “resource1″ (see ‘kernel list’ image below). The following is for reference only.

    Copy XEN Host Kernel to OpenQRM Server

    To take advantage of OpenQRM’s resources, it’s best to import Xen Host’s kernel. Once you have done this, you won’t have to do it again for this Xen Host server, and probably for this kernel.

    On the XEN host server

    • Create directory on Xen host server
      prompt>mkdir /export
    • Tar the Xen host root file system /. Don’t worry about the errors, “socket ignored”, “file changed as we read it”, etc… (also, the single quotes below are double quotes)
      prompt>tar czf /export/root-fs.tar.gz / –exclude ‘/proc’ –exclude ‘/sys’
    • Make directory on OpenQRM server, via ssh
      prompt>ssh root@10.1.11.10 mkdir -p /import/root-fs/x01.lc1.cloud1
    • Copy the root-fs.tar.gz to OpenQRM, via ssh
      prompt>scp /export/root-fs.tar.gz 10.1.11.10:/import/root-fs/x01.lc1.cloud1

      It will copy approx. 901mb, for a Xen host with no Gnome, or GUI.

    Register the Kernel with OpenQRM; optional.

    On the OpenQRM Server

    • Import the root-fs.tar.gz, to OpenQRM
      prompt>cd /import/root-fs/x01.lc1.cloud1 && tar -xvvzf root-fs.tar.gz
    • Now add the kernel files to OpenQRM. More about this can be found at OpenQRM > Base > Components > Create > Kernel
      prompt>/usr/share/OpenQRM/bin/OpenQRM kernel add -n x01.lc1.cloud1.2.6.26-2-xen-amd64 -v 2.6.26-2-xen-amd64 -u OpenQRMWEBUIUSERNAME -p OpenQRMWEBUIPASSWORD -i initramfs -l /import/root-fs/x01.lc1.cloud1 -t /usr/share/OpenQRM/etc/templates/OpenQRM-initrd-template.debian.x86_64.tgz

      If the above command doesn’t work, try the following command. The error is OpenQRM’s fault, due to changing the way they package their files, i.e. openqrm instead of OpenQRM.

      prompt>/usr/share/openqrm/bin/openqrm kernel add -n x01.lc1.cloud1.2.6.26-2-xen-amd64 -v 2.6.26-2-xen-amd64 -u OpenQRMWEBUIUSERNAME -p OpenQRMWEBUIPASSWORD -i initramfs -l /import/root-fs/x01.lc1.cloud1 -t /usr/share/openqrm/etc/templates/openqrm-initrd-template.debian.x86_64.tgz

    Go to OpenQRM > Base > Components > Kernel, and view the kernel named x01.lc1.cloud1.2.6.26-2-xen-amd64

    Should look like this:
    Import Xen Host Kernel to OpenQRM

    If you messed up, go to OpenQRM>Base>Components>Kernel, select Kernel you messed up and delete it. Start over with, Copy XEN Host Kernel to OpenQRM Server.

    Delete root-fs.tar.gz

    • If you wish, you can safely delete the approx 900mb, root-fs.tar.gz file and extraction.
      prompt>rm -R /import/root-fs/x01.lc1.cloud1

    [3.7] Step 7. Remove and Recreate VM (vmx01cms01.cfg) cfg file

    In order to successfully create an appliance (our ultimate goal) in OpenQRM, OpenQRM needs to recreate the VM (vmx01cms01.cfg) cfg file. This is done, by clicking on the +VM, but before we do this let’s make a backup copy of the existing vmx01cms01.cfg file

    We will configure OpenQRM to manage the existing VM we created in chapter 2.

    On Xen Host

    • Backup VM (vmx01cms01.cfg) cfg file - If you haven’t already made a backup copy of the VM Xen cfg file, do so now.

      prompt>cp /etc/xen/vmx01cms01.cfg /bak/vm/

      Delete or Rename the file, as OpenQRM will create this file for us.

      Delete:

      prompt>rm /etc/xen/vmx01cms01.cfg

      Rename:

      prompt>mv /etc/xen/vmx01cms01.cfg /etc/xen/vmx01cms01.cfg.bak

      Unplug the VM

      prompt>xm destroy vmx01cms01

    On OpenQRM

    • Recreate VM (vmx01cms01.cfg) cfg file

      The following process will simply recreate the same Xen VM cfg file (vmx01cms01.cfg).

      OpenQRM >Plugins > Plugin Manager > Virtualization > XEN-Storage > XEN VMs

      • Select x01 radio button, and click Select
      • You’ll notice our vmx01cms01 cfg file is gone.
      • Click on +VM (Create VM).
      • Configure with the following settings:
        Add new VM to Xen Host id 1
        VM name: vmx01cms01
        Virtual Hardware : CPUs - 2 CPUs (Your choice)
        Memory (MB) - 2048 (Your choice)
        Network: Mac address - 00:79:F9:AC:AA:98 (make sure to use the same mac address)
        Boot from: Local Disk
      • Click on, New (Creates Xen VM cfg file).

    Screen will look like this:
    Xen VM Guest Created and Integrated with OpenQRM

    [3.8] Step 8. Configure VM Image

    At this point the VM is created, now we have to tell OpenQRM we’re the VM OS (VM Image) is located.

    OpenQRM > Base > Data Center > Components > Create > Image

    • Select x01-lc1-cloud1-lvm (Xen LVM Storage), radio button, click select.
    • Give the image a name, img_vmx01cms01. Select, vmx01cms01, on the root-device drop down. Leave everything alone, and click on Save.

    Screen will look like this:
    Xen Image Created for OpenQRM

    [3.9] Step 9. Configure Appliance

    When ever you create a VM, with Xen-storage plugin, (like we did above) it will autocreate an Idle Appliance.

    OpenQRM > Base > Data Center > Appliances > Create

    • Select vmx01cms01, radio button, and click on select.
    • Configure with the following settings:
      Appliance a name: ap_vmx01cms01
      Kernel: x01.lc1.cloud1.2.6.26-2-xen-amd64 or resource1
      Resource: img_vmx01cms01
      For Requirements Section, fill out appropriately to your specifications, and make sure Resource ‘drop down’ reads, Xen-storage VM.

    Screen will look similar to this:
    Xen Appliance Config Example

    After you click save

    Screen will look like this:
    Xen Image Appliance for OpenQRM

    Notice the grey dot, which means the VM is idle.

    [3.10] Step 10. Start the Appliance

    OpenQRM > Base > Data Center > Appliances > List

    • Select ap_vmx01cms01, radio button, and click on start.
    • The grey Idle icon will turn to a pretty green check mark, if it doesn’t, simply click on refresh.

    Done

    [3.11] Step 11. Have Fun with VM

    View and interact with your new VM via VNC Client at the newly created port, 1.

    prompt>vncviewer 10.1.11.11:1

    Congratulations
    Congratulations!
    you finished the tutorial. Thank you for following this tutorial.

    I created this step by step; cli; copy and paste; tutorial for the open source community, in an attempt to attract a larger OpenQRM userbase, so that OpenQRM and their community keep evolving the future of Cloud technology. Also, so I, MEE, can have more fun with their technology; truly revolutionary turning point in IT history.

    Although it sounds like I am marketing for OpenQRM, I am not affiliated with OpenQRM or any of their partners, whatsoever. I want to especially thank the OpenQRM community; the OpenQRM team; Matt, the project manager; and the OpenQRM sponsor, OpenQRM Enterprise, for bringing these invaluable tools to the open source community. Great job, please keep it up.

    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: