How to: Set Up and Configure Hyper-V Hosts

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

You must setup one or more Hyper-V hosts for Lab Management to create and run virtual machines. To do this, you must first enable the Hyper-V role in Windows Server 2008 on those machines, and perform the following additional procedures on each host to prepare them for use by Lab Management.

  • Install updates recommended for Lab Management.

  • Change Windows Remote Management (WinRM) configuration settings.

  • Make Team Foundation Server service a local administrator.

To enable the Hyper-V role

  1. Make sure that each host is running one of the supported operating systems. For more information, see Lab Management System Requirements.

  2. On the Hyper-V host, log on as an administrator.

  3. Click Start, point to Administrative Tools, and then click Server Manager.

  4. In the left pane of Server Manager click Roles.

  5. In the right-side pane click Add Roles.

  6. Go through the Add Roles Wizard. You can just click Next in all except the following pages of the wizard:

    1. On the Select Server Roles page, select Hyper-V and then click Next.

    2. On the Create Virtual Networks page, select an active network adapter and then click Next.

      Note

      To find which network adapters are active, use the ipconfig command to view which network adapters have IP addresses. In the wizard, select the network adapter that should be used for creating a virtual network. You must select an adapter that is connected to the same network as the other machines in the lab. If there are several adapters such as this, select the adapter to which the virtual machines that were created by Lab Management should be connected to.

    3. On the Confirm Installation Selections page, click Install.

    4. On the Installation Results page, click Close.

    5. On the Do you want to restart now dialog box, click Yes.

      The machine will restart and continue with Resume Configuration Wizard.

    6. On the Installation Results page, you will see a message that states Installation succeeded. Click Close.

To change Windows Remote Management configuration settings

  1. Click Start, right-click Command Prompt, and then click Run as administrator.

  2. At the command prompt, run the following command:

    winrm set winrm/config @{MaxTimeoutms = "1800000"}

  3. If the host OS is Windows Server 2008 SP2, also run the following command:

    winrm set winrm/config/Service @{MaxConcurrentOperations="200"} -r:https://<HyperVHost>

    These changes improve the reliability of operations performed by Lab Management on the Hyper-V hosts.

To verify that Hyper-V is installed correctly and is working

  1. Click Start, point to Administrative Tools, and then click Hyper-V Manager.

  2. Accept the end user license agreement.

  3. In Hyper-V Manager, in the list of Hyper-V servers, click the name of the physical host machine.

  4. In the Virtual machines pane, you should see a message that No virtual machines were found on this server.

  5. Create a new virtual machine (VM):

    1. Click New. Next, click Virtual Machine and follow the instructions in the wizard.

    2. Under Configure Networking, select the virtual network that you created when you installed Hyper-V role.

    3. On the Connect Virtual Hard Disk step, select the option to Create a virtual hard disk and name the hard disk blank.vhd.

    4. Click Finish.

  6. Right-click the virtual machine that was created, and then click Start.

    The virtual machine State should change from Off to Running. If the VM does not start, review the information from the following sites to identify the cause of the problem:

  7. Right-click the virtual machine, and then click either Turn off or Shutdown.

    The virtual machine should stop.

  8. Right-click the virtual machine, and then click Delete.

To make the Team Foundation Server service account a local administrator on <HyperVHost>

  1. Click Start, point to Administrative Tools, and then click Computer Management.

  2. In the Computer Management console, expand the Local Users and Groups node.

  3. In the left pane, click Groups and in the right-side pane double-click Administrators.

  4. In Administrators Properties dialog box, click Add.

  5. In the Select Users, Computers, or Groups dialog box, in the Enter the object names to select text box,:

    1. Type the Team Foundation Server service account (domain\tfssvc).

      This account is required to give Team Foundation Server access to the physical host machine.

    2. Click OK.

  6. Click OK to close the Computer Management console.

After you complete the procedures in this topic, update the following entry in the checklist in Lab Management System Requirements

Machine

Description

Computer name

Administrator

HyperVHost[1…n]

Physical machine on which virtual machines are deployed.

See Also

Concepts

Configuring Lab Management Pre-requisites

Other Resources

How to: Set Up and Configure Virtual Machine Manager

How to: Set Up and Configure Additional Library Servers