1.7 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 the virtual machine host’s console (known as local access or on-box access) or from a remote computer.

1.7.1 Viewing Virtual Machines through the Host IP Address

You can use the host’s IP address and a VNC viewer to view a virtual machine’s display. 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 1-3 YaST Remote Administration

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

  • vncviewer host_ip::590#

  • vncviewer host_ip:#

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

Figure 1-4 VNC Viewer Command

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 1-5 Mozilla Firefox VNC Viewer

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

1.7.2 Viewing Virtual Machines through the Virtual Machine IP Address

You can use a VNC viewer to directly view a virtual machine’s display.

To use a VNC viewer from a remote computer, remote administration must be enabled on the virtual machine.

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

  • vncviewer vm_ip::590#

  • vncviewer vm_ip:#

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

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.

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

1.7.3 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, edit the virtual machine’s setting ( /etc/xen/vm_name) to include the line (vncdisplay #)where # is the assigned port number.

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

1.7.4 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 1.3, Virtual Machine 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.