Chapter 6. Accessing Virtual Machines Remotely

When setting up a serious test environment, it may be useful to make the machines accessible from a distance. Even if you're using VMware Workstation on your own computer, there are different ways in which you can accomplish this. In this chapter, you'll read how to use VNC, the VMware web service, and VNC on individual machines to access virtual machines remotely.

If you're running a big test environment with multiple virtual machines, it can be useful to enable remote access. Generically speaking, there are three different methods to do this:

  • The first method is by using the VMware web service. This approach allows you to enable access to all virtual machines that you're hosting in an easy way.
  • The second method is by enabling VNC remote access on individual virtual machines.
  • The third method is by using an external solution such as TeamViewer, which allows remote access to the host computer and everything running on it. This is great if the host computer doesn't run anything but VMware.

Setting up shared machines with the VMware Web Service

The VMware Web Service is an easy and convenient way to share machines with other users. To use this solution, you need to set up shared machines, but it's also a good idea to create a dedicated user account to share the virtual machines so that you can prevent remote users from getting access to the files on your computer. Be aware however that normal user accounts without administrator privileges won't be able to get access to other users' virtual machines. An administrator user can at least browse through virtual machines that other users have created. It is a lot easier to set up a dedicated account for the use of VMware Workstation, and from that account, share all virtual machines. This prevents you from the need to give too much access privileges to other users.

Shared virtual machines and user accounts

To use VMware shared virtual machines, you'll need a user account on the computer where the shared virtual machine resides. This means that before setting up the shared virtual machine, you'll have to create these user accounts—unless you want the remote user to connect with your own username and password.

Creating a Windows user account

If you're working in a corporate environment with Active Directory, all user accounts are probably already available. If you're running VMware Workstation on a Windows 8 computer, you'll need to set up a user account yourself. To do this, start the PC Settings application and click on Users. From here, select Add a user and follow the wizard to proceed through all of the required steps to create the user. You don't have to grant administrator privileges to the user, just create the user account and assign a password.

Creating a Linux user account

To create a Linux user account, open a shell window and make sure that you have root permissions. To escalate your permissions to the root level, use the sudo so command and enter the root password. Next, type useradd -m username. This adds the new user account to your computer. To set a password for this user, still as root, enter the passwd command and enter the new password twice.

Sharing a virtual machine

Probably the easiest way to enable shared VMs is by using the VMware integrated feature. This allows you to run a web service on the host's operating system, which gives access to all virtual machines on that host. Enabling the VMware Workstation Server starts at the virtual machines that you want to provide access to. You'll first have to share the virtual machine, after which the workstation's server properties can be set. The procedure described as follows shows how this works:

  1. Right-click on the virtual machine that you want to share. Select the Manage menu, and click on Share.
  2. To enable sharing for the selected virtual machine, you need to make it available in the shared VM's directory. You can do this by either moving the virtual machine, or making a full clone of it. If you choose the latter option, you will basically make a full copy of the virtual machine, which means that the cloned virtual machine is going to be an independent machine. This choice is useful if you want to be able to do different things in the share machines than what you're doing in the original machine. If you move the virtual machine, it's just the physical location that is moved. You won't experience it from the VMware Workstation interface; it's just a protection issue. The benefit of moving the virtual machine rather than cloning it is that you will work on the same virtual machine.
    Sharing a virtual machine

    To share a virtual machine you must make it accessible remotely

  3. After sharing it, you'll see a new folder with the name Shared VMs in VMware Workstation. You'll also notice that the virtual machine is still accessible from the My Computer folder as well.

Accessing a shared virtual machine

Accessing a shared virtual machine from a remote computer that runs VMware isn't difficult. The following procedure describes how you can do it:

  1. To access a shared virtual machine from another computer that's running VMware Workstation 9, you'll use the Connect to Server option from the File menu. Enter the name or IP address of the computer that shares the virtual machine, and enter a name and password to access the shared virtual machine.
  2. It is likely that at this point you'll get a security certificate warning. This warning is generated because probably the remote virtual machine isn't registered in a corporate network, and that is fine; just ignore the warning and click on Connect Anyway. To prevent this warning from popping up again, select the Always trust this host with this certificate option as well.
    Accessing a shared virtual machine
  3. After successful authentication to the remote computer, it will be added to your VMware Workstation view, including all the shared virtual machines that are running on it. If you are planning to use the shared virtual machines on a frequent basis, it's a good idea to click on Remember in the dialog that asks if you want to remember the login information for the remote computer, so that you'll see the virtual machines the next time after starting VMware Workstation (provided that the remote machine is available).
    Accessing a shared virtual machine

    Accessing remote shared virtual machines

..................Content has been hidden....................

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