61
Appendix D. Enabling VNC for Linux VMs
VMs might not be set up to support Virtual Network Computing (VNC), which XenServer uses to control VMs
remotely, by default. Before you can connect with the XenCenter graphical console, you need to ensure that the
VNC server and an X display manager are installed on the VM and properly configured. This section describes the
procedures for configuring VNC on each of the supported Linux operating system distributions to allow proper
interactions with the XenCenter graphical console.
CentOS-based VMs should use the instructions for the Red Hat-based VMs below, as they use the same base
code to provide graphical VNC access. CentOS 4 is based on Red Hat Enterprise Linux 4, and CentOS 5 is based
on Red Hat Enterprise Linux 5.

D.1. Enabling a Graphical Console on Debian Squeeze VMs

Note:
Before enabling a graphical console on your Debian Squeeze VM, ensure that you have
installed the Linux guest agent. See Section 5.5, “Installing the Linux Guest Agent” for details.
The graphical console for Debian Squeeze virtual machines is provided by a VNC server running inside the VM.
In the recommended configuration, this is controlled by a standard display manager so that a login dialog is
provided.
1. Install your Squeeze guest with the desktop system packages, or install GDM (the display manager) using
apt (following standard procedures).
2. Install the Xvnc server using apt-get (or similar):
apt-get install vnc4server
Note:
Significant CPU time can be taken by the Debian Squeeze Graphical Desktop Environment,
which uses the Gnome Display Manager version 3 daemon. Citrix strongly advises that
customers uninstall the Gnome Display Manager gdm3 package and install the gdm package
as follows:
apt-get install gdm
apt-get purge gdm3
3. Set up a VNC password (not having one is a serious security risk) using the vncpasswd command, passing in
a filename to write the password information to. For example:
vncpasswd /etc/vncpass
4. Modify your gdm.conf file (/etc/gdm/gdm.conf) to configure a VNC ser ver to manage display 0 by
extending the [servers] and [daemon] sections as follows:
[servers]
0=VNC
[daemon]
VTAllocation=false
[server-VNC]
name=VNC
command=/usr/bin/Xvnc -geometry 800x600 -PasswordFile /etc/vncpass BlacklistTimeout=0
flexible=true
5. Restart GDM, and then wait for the graphical console to be detected by XenCenter:
/etc/init.d/gdm restart