TurnKey Linux Virtual Appliance Library

TurnKey Xen optimized builds - testing request

Alon Swartz's picture

In our quest to make TurnKey easy to deploy on as many public and private clouds, we recently released optimized builds for OpenStack and OpenVZ.

Testing the builds prior to release was relatively easy using nested virtualization, but Xen is a little more complicated.

So, if you have access to a Xen powered infrastructure it would be great if you could lend a hand in testing TurnKey Core (download, signature), and provide feedback. If you don't have access but know someone who does, please pass on this request.

The default root password is 'turnkey'.

Thanks folks!

Jeremy's picture

Geez you've been busy :)

Xen too ey!?! Far out!  You've pretty much got everything covered now! The only virtualisation (that I can think of) that you don't support OOTB now is KVM! But I don't think there has ever been much request for that (although IIRC someone posted a script on how to convert a VMware image to KVM...)

Anyway, sorry I can't help out but if I hear of anyone in my travels I'll be sure to head them here.

Alon Swartz's picture

Yeah, busy but loads of fun...

Any help with getting Xen tested so we can push it out the door would be awesome.

Regarding KVM, I'm not sure there is any need for yet another build type. I use KVM quiet a lot during testing, both iso and vmdk builds, and they work great.

Jeremy's picture

Ok cool

So you can load the VMDK straight in to KVM then!? I didn't realise...

Eric (tssgery)'s picture

I'd just use iso and vmdk for KVM

no need for anything special here... do fewer things and do them well is my motto.

 

Xen builds... too bad I reimaged my Zen server last week.


Jeremy's picture

Yeah I usually use ISO in KVM

And I recall I tried booting a KVM machine from a vHDD image (I don't recall which one...) and it didn't run so I left it at that. Obviously I was doing something wrong...

How to import the build into xen

Downloaded the .tar.gz file for xen.  How do I import this into xen.

Jeremy's picture

TBH I'm not sure

I haven't used Xen at all (when I first investigated opensource hypervisors I was seriously looking at Xen and almost ready to start installing when I came across Proxmox, which is just too easy IMO). I suspect that inside the tar.gz is a compressed filesystem of some sort. Perhaps have a peek inside and see what's inside?

Also please note that these are Xen images, not XenServer images (ie open source Xen as opposed to proprietry XenServer - see an old discussion re XenServer here if interested).

Alon Swartz's picture

TurnKey Xen optimized builds are ready...

@Rajakumar thanks for taking the time, and sorry for my late response, but @Jeremy's answer was spot on. With help from Gigatux we confirmed that the builds work, and just made an announcement.

Can't figure out what to do with XEN tar.bz2's

Hi,

I've spent a couple of nights trying to understand what to do with the XEN tar.bz2 files.

We run various XEN hosts (NOT XenServer) on various Redhat based (EL5) servers. Extracting the tar.bz2 produces the filesystem extract, but what exactly is meant to be done with that?

I've searched through this website and the net, and can't find any howto's or instructions covering this topic.

The reference here doesn't really say much that makes sense, and refers to DTC which seems to open a can of worms for installation when all that is needed is to load up the downloodable image as a XEN guest.

The reference here also isn't of much use (to me anyway), and the reference here just says "varies between Xen setups".

The "Help" areas on the Turnkey website also aren't helpful in informing people how to make use of the Xen downloadable images.

Understandably this may be because the releases are very new, but what is really needed is simple to follow instructions, howto's or faq's topics covering how to use Xen downloadable images from Turnkey.

Note I'm not a newbie, been working with Linux and UNIX environments for just over 20 years, I'm surprised I can't figure this out.

Because I stumbled on Turnkey the other night (looking for Tomcat appliances) and seeing the range of appliances available, I'm eager to use some under Xen and test quality, than going with the "easier" VMware option.

If anyone has advice, please advise or point me in the right direction. Thanks.

TKLBAM appliances on Xen

Hi Michael,

Did you ever figure out how to easily run TKLBAM appliances on Xen (preferably using the XenCenter)? They DO appear to make this much more compliated and obfuscated then it should be... (unless there is some fundamental Xen-relaterd complexity preventing this from being sdimplified that I'm not getting...).

Thanks,

Paul

TKLBAM appliances on Xen

Hi Paul. After originally leaving that email asking for help, I then set about checking out Proxmox, 2.0 at that time, now on 2.1.

I didn't try what Marc Warne had suggested in the point form setup he replied with, and honestly if it's too hard then I wouldn't want to use it in production.

I like Proxmox and am currently running three Proxmox servers, although none of them in production yet.

Proxmox includes all the Turnkey templates (and some of its own OpenVZ ones), as both projects have worked together to make it so.

I'm not sure I'll ever revisit Xen and Turnkey, but if I do I'll update this thread with what I find.

Getting Xen up and running isn't too hard

...but you do need to understand some of the fundamentals.

Clearly you know the basics (such as running a hypervisor and ensuring the dom0 is all working as expected).

You can use DTC but it might be overkill if you're just looking towards setting up a test Xen domU for Turnkey Linux (and not running hosting operation over multiple servers).

What I would do to get this running is:

  1. Set up LVM. It's a bit easier to get things working if you can point Xen in the direction of a 'real' device for the domU. The below will assume you are using LVM, but it will work if you want to create a disk image.
  2. Create a filesystem on the LVM partition (mkfs.ext3 /dev/lvm/volume).
  3. Mount the LVM partition somewhere (mount /dev/lvm/volume /mountpoint)
  4. Unpack the image into that mount point.
  5. To keep things simple, we'll run the same Linux version for the domU that the dom0 is using, so copy the modules into the mount point (cp -rx /lib/modules/`uname -r` /mountpoint/lib/modules)
  6. Unmount the mount point (umount /mountpoint).
  7. Set up a Xen configuration file in /etc/xen/xen99. Something like the following will do:

    kernel = "/boot/vmlinuz-2.6.32etcetc" # This should be the vmlinuz your dom0 uses
    ramdisk = "/boot/initrd.img-2.6.32etcetc" # This should be the initrd your dom0 uses
    memory = 512
    name = "xen99"
    #cpu = -1   # leave to Xen to pick
    vif = [ 'mac=00:16:3e:01:00:01, ip=192.168.1.100' ]

    disk = [ 'phy:/dev/lvm/volume,xvda,w' ]

    root = "/dev/xvda ro"
    # Sets runlevel 4.
    extra = "4 TERM=xterm xencons=tty console=tty1"
     
  8. Run the domU and see the console (xm create -c xen99)

Hopefully magic will now happen. Let me know if something unexpected occurs - I'll keep an eye on this thread.

Marc
GigaTux

I will test this soon

I run a small cloud using Xen and XenServer.  This could be a great help to me.   I'll test it asap and report back here.


XCP

Anyone got any help available to install these on a XCP platform?

 

--Tom

XenServer / XCP installation and PV modification

First and foremost, on XCP 1.6 install "xenserver-transfer-vm-6.1.0-59002p.noarch.rpm" available on the Citrix XenServer 6.1 ISO in the "\packages.transfer-vm" directory:

# yum localinstall -y --nogpgcheck xenserver-transfer-vm-6.1.0-59002p.noarch.rpm

This will enable XenCenter in Windows to import a vmdk to XCP.

 

Then download the desired "VM" image, i.e. "turnkey-core-12.0-squeeze-x86-vmdk.zip" and unzip it. In XenCenter, select "File" then "Import" and follow the instructions to import this vmdk to a XenServer / XCP server. Once finished it will boot as expected and go through the usual TurnKey Linux configuration. Make sure that the VM's DVD drive has the "xs-tools.iso" selected!

 

Now comes the tricky part of converting this HVM VM to a PV VM.

  1. SSH into the VM's console
     
  2. Assign a Debian archive by creating a sources list:
    # nano /etc/apt/sources.list
     
  3. Add the following to the file, save it and exit when done (ctrl-x, y, enter):
    deb http://ftp.debian.org/debian/ squeeze main non-free
     
  4. Update the sources, upgrade Debian:
    # apt-get update
    # apt-get upgrade
     
  5. Download / install the Xen optimized kernel:
    # apt-get install linux-image-xen-686
     
  6. Mount the XenServer Tools .iso and install the tools:

    # mount /dev/cdrom /mnt
    # cd /mnt/Linux
    # ./install.sh
     
  7. Reboot the VM:
    # reboot

 

The VM should now boot up in PV mode. To check that this is the case, look at the boot options for the VM; PV mode only supports DVD or Hard Disk boot while HVM mode additionally supports network boot. In XenCenter right click on the VM, select "Properties" and then "Boot Options" to verify PV or HVM mode.
 
XCP 1.6 is highly recommended!

Can't seem to convert to PV.

Hey Krokodox,

I've followed your steps multiple times now and never get a PV VM.  XCP just never seems to pick up on the changes to the guest OS.  It's almost as if something needs to be changed on the XCP server to go along with the change on the DomU.

I can't imagine this is so hard.  :/

James

xcp

Hello to all,

Has anyone been able to install the xen optimized version on xcp? Xencenter is not installed, so I only have xe.

Any help is welcome. 

Regards

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)