VNC Viewer

By default, Virtual Machine Manager uses the VNC viewer to show the display of a virtual machine. You can also use VNC viewer from Domain0 (known as local access or on-box access) or from a remote computer.

You can use the IP address of a VM Guest and a VNC viewer to view the display of this VM Guest. When a virtual machine is running, the VNC server on the host assigns the virtual machine a port number to be used for VNC viewer connections. The assigned port number is the lowest port number available when the virtual machine starts. The number is only available for the virtual machine while it is running. After shutting down, the port number might be assigned to other virtual machines.

For example, if ports 1 and 2 and 4 and 5 are assigned to the running virtual machines, the VNC viewer assigns the lowest available port number, 3. If port number 3 is still in use the next time the virtual machine starts, the VNC server assigns a different port number to the virtual machine.

To use the VNC viewer from a remote computer, remote administration must be enabled on the host. You can use the YaST Remote Administration module.

Figure 5.1. YaST Remote Administration

YaST Remote Administration

In addition to this, change vnc-listen in /etc/xen/xend-config.sxp to open the access to the VM Guest. This is necessary, if you encounter messages like vncviewer: ConnectToTcpAddr: connect: Connection refused from a remote host. For more information about modifying xend-config.sxp see Section 4.2, “Controlling the Host by Modifying xend Settings”.

To access the virtual machine from the local console or a remote computer running a VNC viewer client, enter one of the following commands:

where host_ip is the IP address of the virtual machine host and # is the VNC viewer port number assigned to the virtual machine.

# vncviewer 192.168.3.100::5901

If you are using the built-in VNC viewer of an Internet browser, such as Internet Explorer* or Mozilla* Firefox*, use 580# as the port number, where # is the VNC viewer port number assigned to the virtual machine.

Figure 5.2. Mozilla Firefox VNC Viewer

Mozilla Firefox VNC Viewer

When successfully connected, the VNC viewer shows the display of the running virtual machine.

Assigning VNC Viewer Port Numbers to Virtual Machines

Although the default behavior of VNC viewer is to assign the first available port number, you might want to assign a specific VNC viewer port number to a specific virtual machine.

To assign a specific port number on a fully virtualized guest, edit the virtual machine’s setting (/etc/xen/vm/name) as follows: include the line (vncdisplay #)where

vnc=1
vncdisplay=#
vncunused=0

vnc must be set to one, # is the assigned port number and vncunused must exist and be set to 0 in order to make this work.

On a paravirtualized guest, edit the line vfb=['type=vnc,vncdisplay=#'] to set the viewer port number to the desired value.

[Tip]Tip

Assign higher port numbers to avoid conflict with port numbers assigned by the VNC viewer, which uses the lowest available port number.

Using SDL instead of a VNC Viewer

If you access a virtual machine’s display from the virtual machine host console (known as local or on-box access), you might want to use SDL instead of VNC viewer. VNC viewer is faster for viewing desktops over a network, but SDL is faster for viewing desktops from the same computer.

To set the default to use SDL instead of VNC, change the virtual machine’s configuration information to the following. For instructions, see Section 4.3, “Configuring a Virtual Machine by Modifying its xend Settings”.

  • If it is a fully virtual machine, use vnc=0 and sdl=1.

  • If it is a paravirtual virtual machine, use vfb=["type=sdl"].

Remember that, unlike a VNC viewer window, closing an SDL window terminates the virtual machine.


SUSE Linux Enterprise Server 10 SP2