Explore Sign in Sign up
Echo Reply
Computers, Science, Technology, Xen Virtualization, Hosting, Photography, The Internet, Geekdom And More

The Xen Dom-U Kernel And The Kitchen Sink

Published on April 28, 2010 at midnight by XC

Does anyone still like configuring and building their own Linux kernels to taste? I do. Call me a nerd, but I actually enjoy spending countless hours slimming down my kernel so it has just enough support for my hardware, with modular support for anything that I might be inclined to plug in. No, the performance gain is not appreciable, but I gain some memory in kernel space which comes in handy for working on oddball drivers.

Enter Xen paravirtualized dom-u kernels. These, quite frankly are the easiest in the world to build and configure once you have a suitably patched tree (if not yet using pv_ops from mainline). Either or, pv_ops or mainline, the process is the same. You are transported to a magical world where the front end of the Xen split drivers become all of the hardware that you will ever need to support for normal use. The rest of it, frankly is just file systems, security hooks, networking and whatever else may be needed if you intend to pass a PCI device to the domain.
Literally, its easier to start with a configuration that has everything selected as a module that can be selected as such. You then take out crap that you don’t / won’t ever need, like token ring, wireless, etc. Chuck the file systems that you (and anyone else using the guests) won’t ever want (e.g. minixfs) and select appropriate things to be built into the kernel to avoid needing an initrd. Ext3 and ext4 are good examples of things you’ll probably need to boot, which should be built in.

Category: Xen
Read More

A Slightly Better Xen Console

Published on Oct. 15, 2008 at midnight by XC

I love the ability to console in to a paravirtualized domain, especially when making changes to firewall rules. What I do not like is what the redirect does to the terminal when using stuff that heavily depends on ncurses, like ‘top’ or the midnight commander.

If your not familiar with minicom, its a simple ‘telex style’ terminal emulator. Most people use it when communicating over a null modem cable, or for direct AT command access to a modem. You might use it if you access your router’s serial console from a Linux box.

Using xenstore-ls and minicom, you can get a slightly better console into a paravirtualized guest. The steps are really simple:
1 – Make sure you have minicom. A simple apt-get install minicom (or yum install minicom) should suffice. As far as I know, every distribution under the sun packages it.

2 – Obtain the psuedo terminal of the guest. For this you will need to find out the guest’s domain ID and then use xenstore-ls to discover which terminal you need to use. An example is this:

# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 802 2 r----- 773.3
Mini1 1 32 1 -b---- 0.2
Mini2 2 32 1 -b---- 0.2
# xenstore-ls /local/domain/1/console | grep ^tty
tty = "/dev/pts/3"
Now we know that we need /dev/pts/3 to get a console to domid 1.

So we fire up minicom with a few special switches, telling it to skip initializing of the device and that we’re connecting to a psuedo terminal.

Category: Xen
Read More

Ubuntu Hardy/Xen Templates Nearly Done

Published on June 1, 2008 at midnight by XC

I’m now putting the finishing touches on some Ubuntu Hardy templates for Xen. I’ll be contributing both 32/64 bit templates to jailtime early next week.

I’ve decided that continuing to make these manually each time Ubuntu releases is a pain, so I’m nearly done scripting the whole thing. I’ll release a package with the build scripts + the source / scripts for debootstrap along with the templates.
I’m leaving comments open on this post, hopefully those who have used my previous templates can comment on what packages they would like to have beyond the strapped Ubuntu-minimal. Typically all that I do is install nano, add the updates/security/backports/universe repositories and install locales + the base (EN) language pack.

Are there any other creature comforts that you think should ship in these templates? Let me know
Additionally, I’ll have Xen templates for gNewSense ready next week as well.

Category: Xen

A Few New Tools For Xen

Published on Oct. 31, 2007 at midnight by XC

I’ve updated my xmlpulse tools to include some new features, including a program that queries xenstat to produce PHP arrays of guests. Also included is a program to dump guest information into simple bash arrays, handy for scripts. Dom ID, CPU usage, ram usage , etc are included.

Libxenstat is sort of like libvirt, much less functionality. Libxenstat is just for Xen. I used xenstat because it ships with all 3.x versions of Xen so that people don’t have to install other libs to compile and use the programs.

XMLPulse will produce xml-ized networking statistics, /proc monitoring on dom-0 and even comes with a non-xen version for keeping tabs on a standard servers running the Linux kernel.
You can grab a .tgz of the programs here (md5′s also there) or grab the repository using Mercurial at echoreply.us/hg/xmlpulse.hg

Some sample output of the programs (xml, bash, php) can be found here.

Suggested use would be to run the utilities via keyed SSH (or something like SRCE) directing their output to a file, then just include() source or parse them, depending on the format you want.

xm-phpdomains is rather handy for a quick and dirty Xen control panel written in PHP. I’m not yet done with all of the programs, see the todo list as well as obvious things like needing to consolidate functions.

Happy Xenning

Category: Xen

Xen 3.1.1 Release Candidate 2 Is Out :)

Published on Sept. 28, 2007 at midnight by XC

Oh come, all ye Xenn-ers get the latest rrrr-c. (Ok, I’ll shut up)

Keir has finished assimilating the patch queue into the new release candidate for Xen (3.1.1). There are a plethora of improvements best witnessed by viewing the change log.

I know that many of you prefer to yum or apt-get your way into Xenhood. There’s nothing really wrong with this, however, you should take note of a few things:

You get your OS packager’s version of Xen, not the latest and greatest from XenSource. Every OS packager takes Xen, ‘cherry picks’ patches then does their own voodoo. This is great, but you might want to consider letting your flavor follow the course of development.
Many of the gurus who blog tutorials, tips and tricks for Xen build Xen from source. If you use your OS packager’s version, these resources might not work for you. Debian and Ubuntu do a pretty good job staying ‘close’ to XenSource, others get really picky about including patches from xen-unstable.

At this point, I really recommend having Mercurial installed prior to messing with Xen. 3.1.1 pulls in a slightly different version of the 2.6.18 kernel, see this repository to understand the difference from a stock kernel.org kernel (how it used to work). When you run ‘make’, Xen will want to use Mercurial to pull in that kernel tree then apply the stuff in the sparse tree against it, thus producing your xen-0 and xen-u kernels.

From what I understand, because Xen’s paravirt_ops is now in mainstream Linux (2.6.23-rc8 is a good example), the sparse tree will soon be eliminated. Any kernel.org kernel can easily adapt for the Xen hypervisor, just like VMI ops.

Most of the major changes that I see are for HVM (fully virtualized) guests, plus some stuff to add more BSD compatability and the elimination of a bunch of work arounds. If you have time, give it a try, the Xen developers are looking for feedback.

Category: Xen