Using VNC for remote virtual machine access

In the previous section, you have learned how to create shared virtual machines within VMware. This option is useful if you want to share virtual machines with other users who are also using VMware. On the other hand, to access shared virtual machines from a remote computer that doesn't run VMware, this approach doesn't work and you will need something else. VNC might be a good solution.

VNC is a generic protocol that you can use on any operating system to provide remote access. It works from physical computers as well as virtual machines. To open a virtual machine for VNC access, you can use the setup procedure for your specific operating system. Alternatively, you can also use the VMware Workstation virtual machine options to enable VNC access. In this section, you'll learn how to configure the VMware Workstation using VNC.

Before starting to configure VNC on your virtual machines, you should consider the alternatives. VNC is great if you want to connect to a remote graphical desktop but if you want to access a virtual machine that runs in the console-only mode, you don't need it. In that case, use SSH or any other console-based virtual machine access method. It's easier to set up and is also more secure.

Enabling VNC access on a virtual machine

To enable VNC access on a virtual machine, you should open the virtual machine's properties. To do this, select the virtual machine and navigate to VM | Settings. Next, open the Option tab. On this tab, click on VNC Connections. The current status should be set to Disabled. Click on Enable to open VNC access for the virtual machine and select the port you want to use. Every virtual machine needs a dedicated port assignment. For the first VM that you'll share with VNC, the default port 5900 will do fine. All subsequent virtual machines need a dedicated port however, so choose port 5901 for the second virtual machine, 5902 for the third, and so on. To add some extra protection, you can add a password as well. Next, click on OK to save the settings.

Enabling VNC access on a virtual machine

Enabling VNC access to virtual machines

Connecting remotely to virtual machines using VNC

To establish a remote connection to a virtual machine that is shared with VNC, you need a VNC Viewer. You can download a free VNC Viewer at www.tightvnc.com/download.php. After downloading it, run the setup procedure. There is no need to do anything difficult, just select the default settings. The installation program gives you a VNC Viewer as well as a VNC Service. You can use the VNC service to provide remote access to your computer's desktop. You don't need it to connect to individual virtual machines on remote computers, but make sure to provide a password to the service to prevent unauthorized use.

After installation, you need the TightVNC Viewer to get access to VNC-enabled virtual machines. In the remote host box, enter the IP address of the computer that hosts the VNC shared virtual machine. Next, enter the port assignment as well. For the first virtual machine you want to connect to, you can use the default port assignment 5900; if you want to connect to any other virtual machine, you need to specify the port to the IP address, as in 192.168.1.117:5901, and click on Connect. If you have protected VNC access with a password, enter the password now and click on OK. You'll now be connected to the virtual machine.

Connecting remotely to virtual machines using VNC

Connecting to a VNC enabled virtual machine

Once you've established a remote connection with the VNC enabled virtual machine, there may be specific buttons or key sequences that you need. At the top of the VNC Viewer window, you'll see a button bar. In this bar, you'll find access to commonly used function keys for use within the virtual machine. These include all keys that have a special function both in the virtual machine and in the host operating system, such as Ctrl, Alt, and Ctrl + Alt + Del. Use the buttons if you need to use these keys within the virtual machine.

Once you've finished working in the VNC session, you can just close the VNC Viewer window. As the remote machine is running somewhere else, the only thing you have to do is just disconnect the session.

Connecting remotely to virtual machines using VNC
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset