Results 1 to 10 of 19

Thread: Running the Filr appliance on SLES Xen or KVM

Threaded View

  1. Running the Filr appliance on SLES Xen or KVM

    ================================================== ===============================================

    DISCLAIMER: This is not a howto guide for setting up or configuring Novell Filr. Novell Filr's online documentation serves that purpose.
    More importantly, this described method has not been discussed with or is supported by Novell (AFAIK).
    Use at your own risk & YMMV.
    ================================================== ===============================================

    The aim of this writeup is to give those of us that don't have (or wish to) run a VMware ESX environment, an option to get the Filr appliance to run on SLES Xen or KVM hypervisor hosts. This method should generally apply to SUSE appliances built with SUSE Studio.

    First step is to convert the appliance system disk from the VMware VMDK format to a RAW or QCOW2 format that can be used for the SLES hypervisors XEN or KVM.
    For this disk conversion we use the option that's available in the qemu toolset.

    Recommended minimal qemu package version: 1.3.0

    TIP: use an openSUSE 12.3 system to convert/prep the disks all in one go. This version of openSUSE also ships with the latest qemu packages, hence it can save you headaches as older versions of the qemu tool might not be able to do the conversion.
    You can grab o LiveCD or DVD installer here : software.opensuse.org: Download openSUSE 12.3

    To install the needed packages for qemu (includes the needed qemu-img binary) on openSUSE 12.3:
    #zypper in qemu

    On to converting:

    Download the zip file(s) containing the Filr appliance(s) from the Novell site & unzip them on the system that will do the disk conversion. We only need the vmdk file.

    To convert the disk to a RAW format:

    #qemu-img convert Filr.x86_64-0.0.459-disk1.vmdk -O raw Filr.x86_64-0.0.459-disk1.raw

    This RAW disk image will be a little over 40 GB's. If you would prefer to use a phy based disk for the virtual appliance, rather than a file based disk, use the dd command to copy the raw image onto a LUN partition or LVM volume. Size this partition or volume at 41GB to make sure it all fits.

    Then run the dd command (optional, and only if you with to run the appliance on a dedicated partition instead of a file based disk):
    #dd if=Filr.x86_64-0.0.459-disk1.raw of=/dev/[destination disk or volume] oflag=noattime bs=512k

    KVM has a nice feature that will enable disk snapshots (like VMware) for easy rollback. As the appliances system disks get replaced during an upgrade, it's a little less relevant. Additionally, the qcow2 format defaults to thin disk format (disk files grows as needed) and will save the space needed to deploy the system disk.
    ! SLES 11 SP2 or later is required to correctly handle the qcow2 format.

    The qemu conversion command is the same with that difference that the output format is set to, you guessed it, qcow2:

    #qemu-img convert Filr.x86_64-0.0.459-disk1.vmdk -O qcow2 Filr.x86_64-0.0.459-disk1.qcow2

    Copy the converted disks over to the Xen or KVM host you are planning to run the appliance on. On the server you can now use virt-manager to create a new virtual machine with the existing disk option, OS type being SLES 11.

    For KVM, it's now quite easy. Just add the converted appliance system disk, and add a new second disk that will contain the configuration/database/file data. Make sure the virtual server has at least 5 GB or RAM and 2 vCPUs. For network I've chosen to use with the virtual e1000 network adapter.
    Power the VM up and it should boot and present the first setup screen. From here on, just follow the Filr documentation on how to set things up.

    NOTE: when doing the first configuration, MAKE SURE TO SELECT vdb as data disk


    For Xen however, as the appliance does not have the needed Xen kernel packages to have it boot as paravirtual guest, we need an extra step in between where the appliance first is booted as fully virtualised guest. Again using virt-manager, select to create a new virtual machine with the existing disk option, OS type being SLES 11.

    Specs for the virtual server:
    OS SLES 11 (64bit)
    *Fully virtualised
    5 GB RAM (or more)
    2 vCPU
    add the existing OS disk
    add a new data disk (must not have any data on it, unless one is doing an appliance upgrade)
    Change the network adapter to the rtl8139

    The appliance should now be able to boot and when done booting, present you with the first setup screen.
    Enter the basic details and finish the first setup.

    !NOTE: when doing the first configuration, MAKE SURE TO SELECT sdb as data disk

    Now the setup has run, do not continue with the appliance configuration just yet.
    Using virt-manager, get to the appliance console and login as root.

    NOTE: Make sure you have internet connectivity on the appliance (the appliance should be allowed to https to *.novell.com)

    Register the appliance with SUSE (which will add the needed online repositories):
    #suse_register -a email=[your NCC account email@domain.com] -a regcode-sles=[your SLES entitelment code]

    Once this has run successfully, check that the online repository had been added and set active
    #zypper sl

    Then refresh the catalogs & install the needed kernel-xen and dependencies (don't update the appliance, only install these exact packages)
    #zypper ref
    #zypper in kernel-xen

    #optionally for us Nagios fans, install the nrpe monitoring package for Nagios
    #zypper in nagios-nrpe

    Modifying boot and partition parameters:

    1) Once this is done, edit the /boot/grub/menu.1st to set the correct boot parameters. There should already be a line
    for booting with the Xen kernel, that has been added by the kernel-xen package installation :

    - remove the "kernel /boot/xen.gz"
    - change line "model /boot/vmlinux..." to "kernel /boot/vmlinuz-
    - change line "module /boot/initrd.." to "initrd /boot/initrd...
    - make sure default is set to 0 and 0 Xen is the first section in the boot option lines

    2) Edit the mountpoints in /etc/fstab >

    ...part1/sdaX > xvdaX & ...part1/sdbX > xvdbX

    3) Edit /etc/udev/rules.d/70-persistant-net.rules
    #vi /etc/udev/rules.d/70-persistant-net.rules (remove every and any line you see, tip: use the 'dd' command in vi to delete each line, save with ':wq')

    4) check that in the folder /etc/sysconfig/network, the configuration file for the primary network interface is named "ifcfg-eth0". For some reason this file seems to be named "ifcfg-".
    Check the listing:
    #ls /etc/sysconfig/network

    Rename if needed:
    #mv /etc/sysconfig/network/ifcfg- /etc/sysconfig/network/ifcfg-eth0

    As reference, the two boot related files should then look something like this:

    filr:~ # cat /boot/grub/menu.lst
    # Modified by YaST2. Last modification on Fri May 24 16:47:48 CEST 2013
    timeout 0
    gfxmenu (hd0,0)/boot/message
    default 0

    ###Don't change this comment - YaST2 identifier: Original name: xen###
    title Xen -- SUSE Linux Enterprise Server 11 SP2 - 3.0.74-0.6.8
    root (hd0,0)
    kernel /boot/vmlinuz-3.0.74-0.6.8-xen root=/dev/xvda1
    initrd /boot/initrd-3.0.74-0.6.8-xen

    title Filr_[_VMX_]
    kernel (hd0,0)/boot/vmlinuz-3.0.58-0.6.6-default root=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1 disk=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001 vga=0x314 splash=silent showopts
    initrd (hd0,0)/boot/initrd-3.0.58-0.6.6-default

    title Failsafe_--_Filr_[_VMX_]
    kernel (hd0,0)/boot/vmlinuz-3.0.58-0.6.6-default root=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1 disk=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001 vga=0x314 splash=silent showopts ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off
    initrd (hd0,0)/boot/initrd-3.0.58-0.6.6-default

    filr:~ # cat /etc/fstab
    /swapfile swap swap defaults 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    /dev/xvda1 / ext3 defaults 1 1
    /dev/xvdb1 /vastorage ext3 rw 0 0

    Now you can shutdown the appliance and do a final step to reconfigure the virtual server definition so it will run as a full paravirtual machine.

    To do this, simply delete the created virtual machine definition in virt-manager, and recreate a new vm definition with these specs:

    Specs for the virtual server:
    OS SLES 11 (64bit)
    5 GB RAM (or more)
    2 vCPU
    add the existing OS disk
    add the existing data disk
    Network card: leave default

    Boot up and continue on with the appliance configurations on https://[appliance name/ip]:9443 & https://[appliance name/ip]:8443

    Happy Filr'ing!

    Last edited by magic31; 05-Jun-2013 at 08:44 AM.
    Knowledge Partner (voluntary sysop)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts