...
Test: does the xen list
command show that the current system is Domain-0?
Toolstacks (a.k.a toolkits and toolboxes)
There are several toolstacks available for the personal or scripted administration of Xen resources.
...
Storage
The recommended way to provide storage for a DomU is by an LVM on Dom0 which the DomU uses as a virtual HDD.
Reference: http://wiki.xenxenproject.org/wiki/ChoiceStorage_of_Toolstacks
Apparently, once a toolstack has been chosen, it is not easy to change. From Debian 7 Wheezy's /etc/default/xen (where the chosen toolstack is configured):
# Attention: You need to reboot after changing this!
libvirt and virsh
libvirt is a library for managing KVM, OpenVZ, VMware, VirtualBox, Xen and others. For Xen, it is the least feature-complete of all the toolstacks.
virsh is a user/script shell to interface with libvirt. References: http://libvirt.org/virshcmdref.html
xapi and xe
The most feature-complete of all the toolstacks.
xend and xm
Deprecated since Xen 4.1 but the default in Xen 4.1 as packaged for Debian. Will be removed from Xen 4.2.
xend comprises:
- xm command
xend-config.sxp config file format
- xmdomain.cfg config file format
xend was abandoned because of @@@
xl
Strategic since Xen 4.1.
Designed to be command line compatible with xend. TODO: does it have an xm command?
On Debian 7 Wheezy:
root@SON-OF-blav.bluelightav:~# type xl
xl is /usr/sbin/xl
root@SON-OF-blav.bluelightav:~# ll /usr/sbin/xl
lrwxrwxrwx 1 root root 43 May 5 2013 /usr/sbin/xl -> ../lib/xen-common/bin/xen-toolstack-wrapper
Toolstack library
Libxenlight (libxl)
The strategic Xen toolstack library, designed to hide xenstore, libxenctrl, and libxenguest from higher levels.
Toolstack configuration
Debian 7 Wheezy
The Xen toolstack on Debian 7 Wheezy is configurable.
On blav2, we had explicitly configured using xl:
root@SON-OF-blav.bluelightav:~# diff /etc/default/xen{.org,}
7c7 < TOOLSTACK=
--- > TOOLSTACK=xl
When root runs command xl
:
...
Networking
Choice:
- Bridged Each DomU* OS is connected to the LAN
- Routed Dom0 is a router between the LAN and the DomU* network interfaces
- NATted Dom0 is a NATting router between the LAN and the DomU* network interfaces
Interface names:
- peth*
- vif*
- veth*
- xenbr0
Toolstacks (a.k.a toolkits and toolboxes)
There are several toolstacks available for the personal or scripted administration of Xen resources.
Primary reference: http://wiki.xen.org/wiki/Choice_of_Toolstacks
Apparently, once a toolstack has been chosen, it is not easy to change. From Debian 7 Wheezy's /etc/default/xen (where the chosen toolstack is configured):
# Attention: You need to reboot after changing this!
libvirt and virsh
libvirt is a library for managing KVM, OpenVZ, VMware, VirtualBox, Xen and others. For Xen, it is the least feature-complete of all the toolstacks.
virsh is a user/script shell to interface with libvirt. References: http://libvirt.org/virshcmdref.html
xapi and xe
The most feature-complete of all the toolstacks.
xend and xm
Deprecated since Xen 4.1 but the default in Xen 4.1 as packaged for Debian. Will be removed from Xen 4.2.
xend comprises:
- xm command
xend-config.sxp config file format
- xmdomain.cfg config file format
xl
Strategic since Xen 4.1.
Designed to be command line compatible with xend. TODO: what does this mean? man -k xend lists the config file format xend-config.sxp. It may mean command line compatible with xm; many of the xl commands take similar arguments to xm.
Unlike xm, xl does not do dom0 network configuration; standard OS tools must be used.
In case there is no local xl man page: http://xenbits.xen.org/docs/unstable/man/xl.1.html and (Xen 4.2) http://manpages.ubuntu.com/manpages/raring/en/man1/xl.1.html
Toolstack library
Libxenlight (libxl)
The strategic Xen toolstack library, designed to hide xenstore, libxenctrl, and libxenguest from higher levels.
Toolstack configuration
Debian 7 Wheezy
The Xen toolstack on Debian 7 Wheezy is configurable.
On blav2, we had explicitly configured using xl:
root@SON-OF-blav.bluelightav:~# diff /etc/default/xen{.org,}
7c7 < TOOLSTACK=
--- > TOOLSTACK=xl
When root runs command xl
:
- The shell runs /usr/sbin/xl which is a symlink to /usr/lib/xen-common/bin/xen-version to set VERSION to 4.1-toolstack-wrapper
- /usr/lib/xen-common/bin/xen-version gets Xen version info from /sys/hypervisor/version/*Sets PATH toolstack-wrapper:
The shell runs- Sources /usr/lib/xen-common/bin/xen-toolstack to set TOOLSTACK to /usr/lib/xen-4.1/bin/xl
- Sources /etc/default/usr/lib/xen-common/bin/xen-dir to set TOOLSTACK to xl (would fall back to hardcoded default otherwise)Sets TOOLSTACK to dir to /usr/lib/xen-4.1/bin/xl
exec
s - Sources /usr/lib/xen-4common/bin/xen-version to set VERSION to 4.1/bin/xl
When root runs command xm
(does not work):
- /usr
- /
- lib/xen-common/bin/xen-
- Sources
- version gets Xen version info from /sys/hypervisor/version/*
- Sets PATH to /usr/lib/xen-common4.1/bin
- Sources /etc/default/xen -toolstack to set TOOLSTACK to xl (would fall back to hardcoded default otherwise)
- Sets TOOLSTACK to /usr/lib/xen-4.1/bin/xlSources
exec
s /usr/lib/xen-common/bin/xen-dir to set dir 4.1/bin/xl
When root runs command xm
(does not work):
- The shell runs /usr/sbin/xm which is a symlink to /usr/lib/xen-common/bin/xen-toolstack-4.1wrapper
- Sources /usr/lib/xen-common/bin/xen-version to set VERSION to 4.1-toolstack-wrapper:
- Sources /usr/lib/xen-common/bin/xen-version gets Xen version info from /sys/hypervisor/version/*Sets PATH to /toolstack to set TOOLSTACK to /usr/lib/xen-4.1/bin/xl
- Sources /etc/defaultusr/lib/xen-common/bin/xen-dir to set TOOLSTACK to xl (would fall back to hardcoded default otherwise)Sets TOOLSTACK to dir to /usr/lib/xen-4.1
- Sources /bin/xlGenerates usr/lib/xen-common/bin/xen-version to set VERSION to 4.1
- /usr/lib/xen-common/bin/xen-version gets Xen version info from /sys/hypervisor/version/*
- Sets PATH to /usr/lib/xen-4.1/bin
- Sources /etc/default/xen to set TOOLSTACK to xl (would fall back to hardcoded default otherwise)
- Sets TOOLSTACK to /usr/lib/xen-4.1/bin/xl
- Generates message "ERROR: A different toolstack (xl) have been selected!"
Configuration
DomU*
Networking
Choice:
- Bridged Each DomU* OS is connected to the LAN
- Routed Dom0 is a router between the LAN and the DomU* network interfaces
- NATted Dom0 is a NATting router between the LAN and the DomU* network interfaces
Installation (domu*)
...
Creating DomUs
xen-create-image
xen-create-image is part of the xen-tools package. TODO: does it build the image from Dom0's OS? If so we might prefer not to use it because Dom0 was installed from the Hetzner Debian image and an uncustomised Debian may be preferable.
Using Debian Installer
Allows installation of an uncustomised Debian.
Reference: http://wiki.xenproject.org/wiki/Debian_Guest_Installation_Using_Debian_Installer
Troubleshooting
TODO: integrate the next para.
...
xen-linux-system-3.2.0-4-amd64
Documentation only. TODO: presumably its dependencies are crucial; list them?
xen-linux-system-amd64
Documentation only. TODO: presumably its dependencies are crucial; list them?
xen-system-amd64
...
Documentation only. TODO: presumably its dependencies are crucial; list them?
xen-tools
Tools that work with the xm and xl toolstacks to administer Xen config files and images.
...
Plus, presumably in suppport:
- /etc/xen-tools/*
- /usr/lib/xen-tools/<OS name>.d/*/xen-tools/<OS name>.d/*
xen-create-image largely automates creating domUs. Config file: /etc/xen-tools/xen-tools.conf. The --lvm
option creates a new logical volume which is available to the domU as a hard disk drive
Logs in the /var/log/xen-tools/ directory.
...
- Xen-Tools.org documentation: http://xen-tools.org/software/xen-tools/
- Xen-Tools.org FAQ: http://xen-tools.org/software/xen-tools/faq.html
- Xen Project Community Blog: Xen-Tools page: http://blog.xen.org/index.php/2012/08/31/xen-tools-a-straightforward-vm-provisioninginstallation-tool/
xen-utils-4.1
Tools to control the hypervisor from dom0.
Provides (in /usr/lib/xen-4.1/bin/):
...
- Wikipedia: http://en.wikipedia.org/wiki/Xen
- Debian Wiki Xen page (in draft): https://wiki.debian.org/Xen
- Xen Project Beginners Guide: http://wiki.xenproject.org/wiki/Xen_Beginners_Guide#Setup_Linux_Bridge_for_guest_networking
- Xen On Debian Wheezy With LVM (HowtoForge. Has bridge example with fixed IP): http://www.howtoforge.com/xen-on-debian-wheezy-with-lvm
- Using Xen With LVM-Based VMs Instead Of Image-Based VMs (HowtoForge. Etch): http://www.howtoforge.com/using-xen-with-lvm-based-vms-instead-of-image-based-vms-debian-etch
- Debian Wheezy -> Jessie and set up Xen (HowtoForge): http://www.howtoforge.com/how-to-set-up-xen-4.3-on-debian-wheezy-7.0.2-and-then-upgrade-to-jessie
- Setting up XEN on a Hetzner Dedicated Server (Squeeze, xen-create-image, xm): https://gist.github.com/meskyanichi/3354956
- Routed XEN VM based on LVM (step-by-step for Hetzner DS3000. Lenny): http://wiki.summercode.com/routed_xen_vm_based_lvm_step_by_step_guide_for_hetzner_ds3000
- XPSU13 VIDEO: Xen for Beginners (49 min): http://www.xenproject.org/help/presentations-and-videos/video/latest/xpus13-beginners.html
- Xen on 4 app servers (xl, no public IPs): http://wiki.xenproject.org/wiki/Xen_on_4_app_servers
- Debian Guest Installation Using Debian Installer: http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer
- The Debian Administrator's Handbook, Virtualisation chapter (covers domU* creation using Nice. xen-tools, xm, bridged): http://debian-handbook.info/browse/stable/sect.virtualization.html
- How to install Xen in Debian (Armen's Wiki. Has scripts for both public and private IPs for virtual machines): http://vardump.org/wiki.php/HowToInstallXenInDebianGNULinux.
- Network Configuration Examples (Xen WIKI): http://wiki.xen.org/wiki/Host_Configuration/Networking
- Bridging Network Connections (Debian WIKI): https://wiki.debian.org/BridgeNetworkConnections
peth*