Previous page

Next page

Locate page in Contents

Print this page

Enabling VNC Access to Virtual Machines

By default, you cannot connect to a virtual machine using a VNC client. To enable VNC access to a virtual machine, you need to configure the following settings:

  1. Enable the VNC support in the virtual machine.
  2. Specify the TCP port number on the physical server that will be used to listen to VNC connections for the virtual machine.

    Note: A unique port number must be specified for each virtual machine where you plan to connect via VNC.

  3. Set a password to secure your VNC connection. Anyone trying to connect to the virtual machine will need to specify this password before they will be logged in to the virtual machine.

Let us assume the following:

  • You want to enable VNC access to the MyVM virtual machine.
  • The server will listen on port 5901 for VNC connections to the virtual machine.
  • The XXXXXXXXX password will be used to access the virtual machine.

To enable VNC access to the MyVM virtual machine and set the parameters above, you can run the following command:

# pctl set MyVM --vnc-mode manual --vnc-port 5901 --vnc-passwd XXXXXXXXX

Configure VNC: mode=manual port=5901

Success. The operation was successfully completed.

The changes will come into effect on the next virtual machine start.