Main Menu

friends

Banner

Latest articles

FLOSS weekly
30/09/2009 | mad mad mod

FLOSS weekly FLOSS is an acronym for free/libre/open source software. Floss weekly is a podcast from the TWiT Network. The show contains interviews with prominent developers from the open so [ ... ]


the easy way to kill processes
29/12/2009 | mad mad mod

Use pkill to kill processes based on their name. For example to terminate all instances of mplayer:


# pkill mplayer
    


Other Articles

Designed by:
SiteGround web hosting Joomla Templates
XEN DomU configuration files E-mail
User Rating: / 0
PoorBest 
XEN

The Basics


XEN uses 2 different native configuration file formats. The "old" one is S-expressions (sexp) which is usualy used for configuration files in /var/lib/xend/. The default file ending is ".exp". If you want to know more about Symbolic Expressions you might want to take a look at http://en.wikipedia.org/wiki/S-Expression

The "newer" one is used for files in /etc/xen and has a Python like syntax (sorry I dont know the name). If you check the /usr/sbin/xm file you will see that it is a python script and I guess thats why you can also use the Python format.


Which one should I use now?


I would use neither of the two! Instead, I would use pure xml for DomU configuration files. Because XEN does not understand XML you have to use libvirt.

What is libvirt?


The following text is from the libvirt.org website:

libvirt is:

* A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes).
* Free software available under the GNU Lesser General Public License.
* A long term stable C API
* A set of bindings for common languages
* A CIM provider for the DMTF virtualization schema
* A QMF agent for the AMQP/QPid messaging system

libvirt supports:

* The Xen hypervisor on Linux and Solaris hosts.
* The QEMU emulator
* The KVM Linux hypervisor
* The LXC Linux container system
* The OpenVZ Linux container system
* The User Mode Linux paravirtualized kernel
* The VirtualBox hypervisor
* Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems

libvirt provides:

* Remote management using TLS encryption and x509 certificates
* Remote management authenticating with Kerberos and SASL
* Local access control using PolicyKit
* Zero-conf discovery using Avahi multicast-DNS
* Management of virtual machines, virtual networks and storage
* Portable client API for Linux, Solaris and Windows


There are several utilities available to manage virtual machines and libvirt. I think on RedHat / Fedora based systems the "virsh" utility is something like the standard tool to manage virtual machines with libvirt. If you are familiar with "xm" then it should be easy to get used to virsh.

There is a nice documentation about the XML configuration files here: http://libvirt.org/format.html


How does it work now?


Depending on how you have installed your virtual machine, you will not have an XML file now. If you want to have such a file from a defined virtual machine you can run


virsh dumpxml myserver > myserver.xml


This saves the XML configuration from myserver to myserver.xml

If you now change something in your myserver.xml you can redefine your machine with


virsh undefine myserver
virsh define myserver.xml

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting