How to: Connect to a Virtual Environment

You can connect to the virtual machines in a Visual Studio Lab Management environment through Windows Remote Desktop just as you connect to any machine on the network. You can also connect by using Microsoft Environment Viewer.

You can interact with the virtual environments you create by using Microsoft Test Manager and Microsoft Environment Viewer, an additional tool that is included in Visual Studio Test Professional. You can connect only to deployed environments. Whether you can open a remote connection to each virtual machine in the environment depends on the state of that virtual machine.

Steps to connect to an enevironment

To connect to a virtual environment

  1. In Microsoft Test Manager, click Lab Center, and then click the Lab tab.

  2. Click the virtual environment to connect to.

  3. Click Connect.

Host-based and Guest-based Connections

The Microsoft Environment Viewer uses two types of connections:

  • Host-based

  • Guest-based

The Microsoft Environment Viewer automatically determines the correct type of connection, based on the client operating system and your identity. You cannot manually select the type of connection.

Host-based Connections

These remote connections are routed through the hosts on which the virtual machines reside. They use the Hyper-V’s "Virtual Machine Connection" protocol. Because they are routed through the host, these connections let you interact with virtual machines even while they are turning on, shutting down, or when the virtual machine’s network is not completely formed. The virtual machines do not have to have an IP address or even a guest operating system. This form of connection is important, for example, if you want to install an operating system on the virtual machines of an environment, or if you must customize the operating system.

Environment Viewer uses a host-based connection automatically when both the following conditions are satisfied:

There can only be one active host-based connection to an environment at a given time. Therefore, when one user is connected to an environment by using a host-based connection and another user tries the same type of connection, the first user is disconnected. Use the In use feature of environment to indicate that you are working on an environment and do not want other users to connect to it. For more information about how to turn on In use, see How to: View or Modify a Virtual Environment.

Guest-based Connections

If any one of the conditions listed in the host-based connections section is not satisfied, Environment Viewer uses a guest-based connection. This connection directly uses Remote Desktop Protocol (RDP) to the virtual machine. For this connection, the virtual machine has to be turned on, its network stack should be working, its remote desktop connections must be enabled, and the user who is connecting to the virtual machine should be a member of "Remote Desktop Users" on the virtual machine. These connections only work with virtual machines that support RDP.

Note

When you are connected to the virtual environment using a remote desktop or guest-based connection, you might experience frequent, unexpected disconnects. One possible cause of the loss of the connection is that the virtual machine is configured to automatically log on to the network. Remove the automatic logon configuration. If the problem persists, contact your system administrator.

Although host-based connections are better for interacting with virtual machines when they are turning on or powering up, guest-based connections usually have better performance characteristics and have additional features such as "copy to clipboard" and access to local devices. The ‘"copy to clipboard" capability of RDP lets users copy and paste text, images, and other objects between the client’s desktop and the virtual machine’s desktop.

The number of guest-based connections to an environment depends on the operating systems in its virtual machines. If the operating system in virtual machine is a client operating system such as Windows XP, there can be only one RDP connection. If the operating system in virtual machine is a client operating system such as Windows Vista or Windows 7, there can be multiple connections, but only one can be active at a given time. If the operating system in virtual machine is a server operating system such as Windows 2003 Server or Windows 2008 Server, then there can be multiple RDP connections, depending on how RDP was configured in the virtual machine.

Connecting to a Domain Controller Virtual Machine

If you are working with a network-isolated environment that includes a domain controller virtual machine, communication to this virtual machine is possible only through a host-based connection or from another virtual machine in the environment. This is because Lab Management configures the domain controller virtual machine not to have external connectivity. To connect to the domain controller virtual machine follow these steps:

  • From a machine with Windows Vista SP1 and later versions or Windows 7 clients, log on as the creator of the environment. This will make sure that you get a host-based connection.

  • If that is not possible, connect to one of the other virtual machines in the environment. From that other machine, open an RDP connection to the domain controller virtual machine.

Operating the Environment

After you are connected to an environment, you can perform the following operations on that environment through Microsoft Environment Viewer.

  • Environment state operations: Start, Pause, Shutdown, Power off, Refresh status, Mark "In use".

  • Environment snapshot operations: Take snapshot, Restore to previous or selected snapshot, Rename snapshot, Delete snapshot, Share snapshot.

  • Capability operations: View status, Reset test and workflow integration capabilities.

While you interact with the selected virtual machine, you can follow these steps using Microsoft Environment viewer:

  • Send CTRL+ALT+DEL keys to the virtual machine.

  • View the desktop of the virtual machine in full-screen mode.

  • View the system information about the virtual machine. System information contains computer name, internal computer name (for network-isolated environments), and SCVMM virtual machine name.

For more information about the operations that you can perform on a virtual environment, see How to: Operate a Virtual Environment.

See Also

Concepts

Creating Virtual Environments