Name Last modified Description
Parent Directory
NEWS 28-Oct-2006 14:30
README 28-Oct-2006 23:47
README.html 28-Oct-2006 23:47
qemud-0.1.0.tar.bz2 27-Oct-2006 23:55
qemud-0.1.0.tar.gz 27-Oct-2006 23:55
qemud-0.1.1.tar.bz2 28-Oct-2006 14:38
qemud-0.1.1.tar.gz 28-Oct-2006 14:38
qemud is a management daemon for virtual machines. You can use it to configure, manage and start virtual machines. Its interface is inspired by Xen's management daemon xend and command line interface xm. Therefore qemud is also splitted into two separate programs: qemud and qm. qemud runs in the background and receives commands from qm.
While qemud's name is derived from qemu, it is not limited to qemu virtual machines and there will be support for user mode linux (and possibly others) in the future.
Download qemud from http://cthulhu.c3d2.de/~toidinamai/qemud/ or use the subversion to get the latest stable version from the repository:
$ svn co svn://svn.c3d2.de/qemud/trunk qemud
There is also a trac page for online code browsing.
qemud is written in the Python using the Twisted framework. eunuchs, not strictly necessary, but highly recommended, is used for tap device creation, so that qemu does not need access to /dev/net/tun itself.
In order to run properly, the following requirements must be met:
In the source code directory you may also use the following command to check if all necessary packages are installed:
$ python check.py
The installation should be pretty straightforward. Simply unpack the source code archive or check out the repository and run the the following command in top level directory:
$ python setup.py install
If you just want to test qemud it is also possible to run qemud directly from the archive without installing it:
$ python bin/qemud & $ python bin/qm help
As of version 0.1.0, qemud supports the following features:
qemud is alpha quality software. So far, it provides only basic functionality and its user interface is still a bit rough. Both will be improved over time, feel free to contact me for feature requests or patches.
qemud is licensed under the GPLv2.
The following example assumes that you already have a hard disk image prepared. Installation from within qemud - while possible - is difficult and not yet supported.
After installing you should be able to run qemud from the command line:
$ qemud
By default qemud stays in the foreground and logs to stderr. Check the online help with qemud --help to find out how to run qemud and make it log to a file or syslog.
qemud stores its configuration files in /etc/qemud by default. Machine configuration files are stored in the machines subdirectory. They are written in Microsoft Windows INI style and consist of at least three sections. The following file is an example is for a virtual machine named "OpenBSD":
# As of the current version, section ordering does not matter. This may # change in a future version so it's best to keep the following order. # the general section [general] # the machine's name name = OpenBSD # the module to create virtual machine, qemu is the only choice so far module = qemu [manage] # the directory the qemu machine runs in, if this is specified all following # paths may be given relative to this directory directory = /var/lib/qemud/machines/OpenBSD # user and group to run qemu as, these do not write need access on anything other # than the machine's image files user = qemu group = qemu [machine] # the memory assigned to the virtual machine (in megabytes) memory = 256 # number of CPUs, defaults to 1 #smp = 1 # primary master hda = openbsd.img # where to boot from, valid choices are floppy, disk (default) and cdrom #boot = disk # whether to use kqemu, defaults to on. some systems won't boot with this kqemu = no # this is a comma separated list of references to network configuration sections # if this option is left out, no network interfaces (not even user) are created net = default [net:default] # network interface type, possible values are user and tap type = tap # the following settings are only for tap devices, they make no sense # with user networking # the mac address of the virtual machine macaddr = 00:0e:4e:d5:9a:8b # script to run to configure the interface # The script is run with the interface name as its first argument. It should # bring the interface up and assign addresses to it or assign it to a bridge. script = ifup.sh # the name of the interface to be created, if unset the host operating system chooses ifname = obsd0
As you can see, the configuration file syntax is closely related to qemu's command line options. In fact, most options are directly passed to qemu, although some verification is done. The file should be stored in /etc/qemud/machines/OpenBSD.qemu.
If all files are in place the virtual machine can be created with the following command:
$ qm create OpenBSD
If all went well the command should not output anything. Client side error handling is not yet finished, though, and you may sometimes see an error such as:
ERROR:root:Could not create virtual machine OpenBSD: <Fault 8002: 'error'>
In this case you should check qemud's log file for explanations. This will be improved in future versions.
When the machine is up and running you can check its status with the following command:
$ qm info OpenBSD
To attach to the machine's first serial console you can use the following command:
$ qm console OpenBSD
The operating system in the virtual machine must be configured to have a getty listen on the serial port or even log boot messages there in order for this to be useful. To disconnect from the console press Ctrl+]. As of version 0.1.0 it is also possible to attach to qemu's monitor console. This will, however, most likely go away in future versions so don't rely on this feature:
$ qm console OpenBSD.monitor
The is not yet a way to cleanly shut down a virtual machine using qm. The only secure way is to log into the virtual machine and tell the guest operating system to shut down. If the operating system supports power management qemu will exit after shut down and the virtual machine will automatically stop. Alternatively you can use the following command to forcefully shut down qemu:
$ qm destroy OpenBSD
Beware that this kills the qemu process and is like pulling the power plug from a real machine.