Xen FAQ Using
From Xen
Contents |
How do I connect to or detach from a console?
You can connect to a console directly when starting a domU:
# xm create -c your-DomU-config
This command will start a domU and connect to it's console immediately.
If you want to connect to a domU console that is already running you first have to find the domU id using:
# xm list Name Id Mem(MB) CPU State Time(s) Console Domain-0 0 123 0 r---- 2482.9 testXM1 30 127 1 -b--- 4.9 9630 testXM2 32 127 1 -b--- 4.7 9632 testXM3 34 128 1 -b--- 0.3 9634
Now you can connect to for example the testXM2 domU with Id 32 using:
# xm console 32
You can detach from a console using the escape character: <CTRL> ']'.
On a German keyboard try <CTRL> '5' if the above doesn't work. This works both in Putty and gnome-terminal. On a Swedish keyboard (mac running iTerm) <CTRL> 'å' works.
In 3.0, how can I expose a console on a TCP port like in 2.0
Xen 3.0 no longer exposes consoles on TCP ports to provide stronger security out of the box. If this feature is desired (and you're on an isolated network), you can achieve the same results using inetd or xinetd. The following is an xinetd service that can be enabled by placing it in /etc/xinetd.d/xen:
# default: on
# description: Xen console port
service xen1
{
disable = yes
type = UNLISTED
socket_type = stream
protocol = tcp
user = root
wait = no
port = 9001
server = /usr/sbin/xm
server_args = console 1
}
service xen2
{
disable = yes
type = UNLISTED
socket_type = stream
protocol = tcp
user = root
wait = no
port = 9002
server = /usr/sbin/xm
server_args = console 2
}
Adding entries for each domid that you want to expose (and the port you want to expose it on). In the above example, entries are only made for domain IDs 1 and 2. Any additional xinetd parameters can be used to limit where the connections come from and to implement logging.
In Xen VM, how can I use 3D graphics.
See XenVGAPassthrough: wiki page for more information how to give a VM direct/full access (including video and 3d acceleration) to a graphics (VGA) card.
Backing up Xen domains
See Backing up Xen domains @ serverfault

