Manage Virtual Machines Remotely With Hyper-V Manager and Windows 7

Applies To: Windows Server 2008 R2

You can install Hyper-V Manager on a client computer, and from that computer, you can manage the virtual machines that are running on your virtualization server. The user experience is the same as that of Hyper-V Manager running on the virtualization server.

Note

The client computer can be running Windows 7, Windows Vista® with Service Pack 1, Windows Vista with Service Pack 2, a full installation of Windows Server 2008 R2, or a full installation of Windows Server 2008 with the update to the release version of Hyper-V (KB950050 in the Microsoft Knowledge base – https://go.microsoft.com/fwlink/?LinkID=122188). Additionally, the client computer does not need to be a computer that supports virtualization, and it does not need to be running a 64-bit operating system. For this test scenario, a computer that is running Windows 7 is used as the client computer, as explained in the following scenario prerequisites.

Scenario prerequisites

To test this scenario, you will need the following:

Scenario steps

The following procedure explains how to install Hyper-V Manager on the client computer. It also explains how to run the HVRemote.wsf script to configure the virtualization server and the client computer for remote management.

Note

You can also manually configure the virtualization server and the client computer, instead of configuring them by using the HVRemote.wsf script. For detailed configuration steps, review the Install and Configure Hyper-V Tools for Remote Administration topic of the Hyper-V Planning and Deployment Guide (https://go.microsoft.com/fwlink/?LinkId=163301).

To manage virtual machines remotely with Hyper-V Manager and Windows 7

  1. On the client computer, install Remote Server Administration Tools for Windows 7 as follows:

    1. Download the installation file for Remote Server Administration Tools for Windows 7 directly to the client computer, or copy it by using a removable storage device.

    2. To install Remote Server Administration Tools for Windows 7, double-click the installation file. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue. The Windows Update Standalone Installer dialog box appears.

    3. In the Windows Update Standalone Installer dialog box, click Yes. The Download and Install Updates dialog box appears.

    4. In the Download and Install Updates dialog box, review the license terms, and if you accept the terms, click I Accept.

    5. After the installation is complete, Help for Remote Server Administration Tools for Windows 7 appears. To close the Download and Install Updates dialog box, click Close.

Important

Hyper-V Manager is installed as one of the role administration tools included with Remote Server Administration Tools for Windows 7. These tools are not enabled by default, and to use them you must manually turn them on, as explained in the following procedure and in Help for Remote Server Administration Tools for Windows 7.

  1. Turn on the role administration tools for Hyper-V so that Hyper-V Manager is available on the client computer as follows:

    1. Click Start, click Control Panel, and then click Programs.

    2. In the Programs and Features area, click Turn Windows features on or off. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue. The Windows Features dialog box appears.

    3. In the Windows Features dialog box, expand Remote Server Administration Tools, and then expand Role Administration Tools.

    4. Select Hyper-V Tools, and then click OK.

    After the role administration tools for Hyper-V are turned on, Hyper-V Manager is available under Administrative Tools. If Administrative Tools is not listed on the Start menu of the client computer, to find Hyper-V Manager, click Start, type Hyper-V Manager in the Search programs and files box, and then press ENTER.

  2. On the client computer, run the HVRemote.wsf script to configure it for remote management as follows:

    1. Download the HVRemote.wsf script file directly to the client computer, or copy it by using a removable storage device.

    2. Open an elevated Command Prompt window. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

    3. Browse to the folder where you downloaded or copied the HVRemote.wsf script file, and then type the following command:

      cscript hvremote.wsf /mmc:enable
      
    4. If the client computer and the virtualization server are connected in a workgroup or if they are not connected in trusted domains, type the following command:

Important

You do not need to run this command if the client computer and the virtualization server are connected in the same domain or in trusted domains.

        cscript hvremote.wsf /anondcom:grant
  1. On the virtualization server, run the HVRemote.wsf script to give remote management access for Hyper-V to a domain or workgroup user:

    1. Download the HVRemote.wsf script file directly to the virtualization server, or copy it by using a removable storage device.

    2. Open an elevated Command Prompt window, and then browse to the folder where you downloaded or copied the HVRemote.wsf script file.

    3. If the client computer and the virtualization server are connected in a domain, type the following command:

      cscript hvremote.wsf /add:<domain>\<user_name>
      

      where <domain> and <user_name> are the domain name and the domain user that you want to give remote management access for Hyper-V.

    4. If the client computer and the virtualization server are connected in a workgroup, type the following command:

      net user <user_name> <password> /add
      

      where <user_name> is the name of a local user on the client computer to whom you want to give remote management access on the virtualization server, and <password> is the password for that user.

      Next, type the following command:

      cscript hvremote.wsf /add:<user_name>
      

      where <user_name> is the name of the local user that you specified in the previous command.

    5. If you want to give remote management access for Hyper-V to more users, repeat the previous steps as many times as necessary.

  2. To complete the configuration for remote management, restart the client computer and the virtualization server.

  3. After the client computer and the virtualization server restart, you can manage the virtual machines on the virtualization server from the client computer as follows:

    1. Log on to the client computer by using a workgroup or domain account (one of the accounts that you gave remote management access for Hyper-V on the virtualization server).

    2. On the client computer, open Hyper-V Manager. Click Start, point to Administrative Tools, and then click Hyper-V Manager. If Administrative Tools is not listed on the Start menu, type Hyper-V Manager in the Start Search box, and then press ENTER.

    3. In Hyper-V Manager, in the Actions pane, click Connect to Server. The Select Computer dialog box appears.

    4. In the Select Computer dialog box, click Another Computer, type the computer name of the virtualization server, and then click OK.

      The left navigation pane lists the virtualization server, and the virtual machines that are available on the virtualization server are listed under Virtual Machines.

Important

If you see an error message instead of the list of virtual machines, review the troubleshooting section in the HVRemote Documentation.pdf document, which is available in the Hyper-V Remote Management Configuration Utility Downloads (https://go.microsoft.com/fwlink/?LinkId=163299). Also, you might want to review the detailed configuration steps for remote management that are listed in the Install and Configure Hyper-V Tools for Remote Administration topic of the Hyper-V Planning and Deployment Guide (https://go.microsoft.com/fwlink/?LinkId=163301).

Additional considerations about this scenario

  • After you have connected to a virtual machine, you can close Hyper-V Manager and continue to manage the virtual machine in the Virtual Machine Connection window that opened for that virtual machine. Closing Hyper-V Manager does not terminate the existing connections to virtual machines.

  • If a Windows Security Alert dialog box opens and states that Windows Firewall blocked some features of Microsoft Management Console, click Allow access.

  • The HVRemote.wsf script can also help you to configure the client computer and the virtualization server for remote management if one is connected to a workgroup and the other is connected to a domain. For more information, see the 10-second guide and other documentation that is available with the Hyper-V Remote Management Configuration Utility (https://go.microsoft.com/fwlink/?LinkId=178138)

  • You can use Hyper-V Manager on the client computer to connect to more than one virtualization server at the same time.

  • You can also use Hyper-V Manager on a virtualization server to connect to other virtualization servers and manage the virtual machines on those servers.