Hello,
I'm doing my first steps with Xen and have my first domU up now
(Debian/sid under Debian/sid).
The main problem I had, was to bring up the graphical desktop of the
guest with vnc4server. The solution was simple - but not easy to find
for me - so let me share it:
Whenever I tried to login on xdm or gdm via xvnc4viewer coming from
dom0, I found errors in .xsession-errors of the login-user:
...
Xlib: connection to ":0.0" refused by server
...
The solution was to delete the .Xauthority file in the home-dir of the
login-user (... but don't ask me why, I only came to this idea by heavy
googling). -
Being my first contact with Xen, I missed a general abstract, how the
xen components are "glued" together. I mean something rudimental like
this example, which reflects my first xen setup:
* Boot a xen host system with grub using the Package
xen-hypervisor-3.0-unstable-1-i386:
/boot/grub/menu.lst
...
title Debian xen-3.0, kernel 2.6.18-1-xen-686 /dev/sda10
root (hd0,9)
kernel /boot/xen-3.0-unstable-1-i386.gz
module /boot/vmlinuz-2.6.18-1-xen-686 root=/dev/sda10 ro console=tty0
module /boot/initrd.img-2.6.18-1-xen-686
* Prepare the host for networking with a new guest, for example set
(network-script network-bridge) and deactivate (network-script
network-dummy) in Debian's default /etc/xen/xend-config.sxp.
* Create the guest system with xen-tools and
xen-linux-system-2.6.18-1-xen-686. With xen-tools a basic guest
distribution can be downloaded and an installed using the option
debootstrap. Let the guest be installed in one big file like disk.img
and a swap file swap.img for example. Use dhcp for convenience doing all
the eth-settings (when you have your own a dhcp-server). The kernel, you
boot your guest with, has to reside in your host filesystem, for example:
kernel = '/boot/vmlinuz-2.6.18-1-xen-686'
ramdisk = '/boot/initrd.img-2.6.18-1-xen-686'
* Start your new guest machine with "console connected", so you can
watch the boot messages:
# xm create myguest.cfg -c
* Install a virtual xserver like the vnc4server Debian-Package, if you
like to see a graphical desktop of your guest in a host-window. For
graphical authorisation use a display-manager like xdm or gdm and a
small window-manager like icewm or icewm-experimental. Example configs
can be:
/etc/X11/xdm/Xservers
...
##:0 local /usr/bin/X vt7 -dpi 100 -nolisten tcp
:0 local /usr/bin/Xvnc -geometry 1024x768 -depth 24 -rfbauth
/root/.vnc/passwd
...
or
/etc/gdm/gdm.conf
...
[servers]
0=VNC
[server-VNC]
name=VNC server
command=/usr/bin/Xvnc -geometry 800x600 -depth 24 -rfbauth /root/.vnc/passwd
flexible=true
The /root/.vnc/passwd for granting access to the VNC-Server can be
created with vnc4passwd.
* Access the desktop of your new virtual machine via network with
xvnc4viewer <guest IP>
Hope it helps some xen-newbies like me,
Oliver
(Thanks to all those great minds developing Xen!)
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|