User Tools

Site Tools


virtualization:microsoft:hyper-v

Microsoft Hyper-V Server

See also more Hyper-V pages

See also Windows Core Configuration

http://blogs.technet.com/b/keithmayer/archive/2012/09/07/getting-started-with-hyper-v-server-2012-hyperv-virtualization-itpro.aspx

http://www.techrepublic.com/blog/10things/10-things-you-should-know-about-hyper-v/431

http://4sysops.com/archives/windows-server-2012-hyper-v/

:!: Note that Microsoft Hyper-V requires hardware virtualization support in the mainboard and CPU. Windows Server 8 will also require SLAT for Hyper-V.

:!: Don't try to run an app directly from the root of C:. Create a folder and run the app from the folder.

Microsoft virtualization comes in two basic flavors:

  • Hyper-V Role under a Windows 2008 Server
    • Comes with Windows Server
  • Microsoft Hyper-V Server bare metal hypervisor
    • Free download

Documentation

Driver Installation

See also Hyper-V Remote Management

On a Windows management workstation:

  1. Open the firewall
    • netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes
  2. Run 'mmc'
  3. Add snap-in → Disk Management
  4. Browse to → Hyper-V-Server-Hostname
  5. Add snap-in → Device Manager
  6. Browse to → Hyper-V-Server-Hostname
  7. Add snap-in → Group Policy Object
  8. Browse to → Hyper-V-Server-Hostname

:!: Add all other Hyper-V Servers the same way (optional)

In the MMC:

Hostname Policy → Computer Configuration → Admin Templates → System → Device Installation

Allow Remote Access to the Plug and Play Interface → Enabled

Device Manager

Install Drivers

pnputil -i -a *.inf

List a device driver and service name:

sc query type= driver

Disable a device driver:

sc delete <service_name>

NIC Teaming (NIC Bonding)

:!: You should configure NIC teaming after installing drivers and before network configuration.

:!: You will have to reconfigure the server networking after configuring NIC teaming.

:!: NIC Teaming is now built into Windows Server 2012 and is vendor independent.

NIC Teaming User Guide: http://www.microsoft.com/en-us/download/details.aspx?id=30160

http://www.aidanfinn.com/?p=12646

http://blogs.technet.com/b/privatecloud/archive/2012/06/19/nic-teaming-in-windows-server-2012-brings-simple-affordable-traffic-reliability-and-load-balancing-to-your-cloud-workloads.aspx

http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/02eaa377-8a1e-43f1-ad8b-4227138742d0

NIC Team Creation with PowerShell

Get-NetAdapter -Physical

New-NetLbfoTeam Team1 "Network 2","Network 3" -LoadBalancingAlgorithm HyperVPort
  • List NIC names
  • Load Balancing + Failover
  • Name is “Team1”
  • Switch Independent Mode
    • Switch does not require advanced features (LACP)
  • 'Generic' or 'Static' team
    • As opposed to IEEE 802.1ax Link Aggregation Control Protocol (LACP)
  • Connected to the Hyper-V external switch

Hyper-V Server Configuration

Hyper-V Role

If you are not using the bare-metal Hyper-V Server, you need to install the Hyper-V role on the host Windows Server OS:

dism /online /enable-feature /featurename:Microsoft-Hyper-V

:!: Reboot after installing the Hyper-V role.

Sconfig Text Console

  • Set the Computer Name
  • Set an IP Address
  • Enable Remote Management
  • Enable Remote Desktop
  • Enable PowerShell
  • Install Windows Updates

Command Prompt

Power Management

Set Power Config to “Best Performance”.

List the available power schemes:

powercfg -list
  • Copy the desired GUID
powercfg -setactive [GUID]

Disk Management

Use DiskPart to create partitions, volumes and drive letters for the virtual disks.

diskpart

DISKPART> list disk
DISKPART> select disk [DISKNUM]
DISKPART> create partition primary
DISKPART> list volume
DISKPART> select volume [VOLNUM]
DISKPART> format fs=ntfs label="LABEL" quick
DISKPART> assign letter=[DRIVELETTER]

Hyper-V Management

See also Windows Core Configuration

* Microsoft Hyper-V Server only has a limited text console (sconfig.cmd) for local management. There is also a command prompt available.

* The free management tools, the Hyper-V Management Console, is an MMI snap-in that only runs on a Windows 7 PC.

* The Microsoft System Center Virtual Machine Manager (SCVMM) has been renamed to Microsoft System Center 2012. These are commercial tools for managing Hyper-V.

Hyper-V Manager MMC

Install and restart server on WS2012 with PowerShell:

List available Hyper-V features:

Get-WindowsFeature hyper-v*

Install-WindowsFeature hyper-v-tools
Install-WindowsFeature hyper-v-powershell

Old info?

FIXME

Install-WindowsFeature Server-Gui-Mgmt-Infra

Restart-Computer

Manage:

virtmgmt.msc

:!: Hyper-V Server 2012: http://smudj.wordpress.com/2012/09/26/quick-and-dirty-managing-hyper-v-server-2012-from-windows-8/

:!: Hyper-V Server 2008 R2: http://technet.microsoft.com/en-us/library/ee815282%28v=ws.10%29.aspx

:!: You must configure remote access to the Hyper-V Server. It is blocked by default.

:!: If you join an Active Directory Domain, remote access is simplified.

:!: You must have DNS name resolution configured in both directions. Obviously, this is already taken care of if using an AD Domain.

HVRemote

http://blogs.technet.com/b/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx

If you are not on an AD Domain, download the HVRemote script to both the server and the management workstation and run the commands (on both the server and the management workstation) shown on this page and run commands in the “10 Second Guide”:

http://archive.msdn.microsoft.com/HVRemote

Hyper-V Management Tools

Remote Server Administration Tools for Windows 7

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d

:!: You must be a member of the Administrators user group to run the tools

Install the tools:

Start → Control Panel → Programs → Programs and Features → Turn Windows features on or off → Remote Server Administration Tools

Run the Hyper-V Manager:

Start → Administrative Tools → Hyper-V Manager

Microsoft System Center

Storage

ISO Library

http://technet.microsoft.com/en-us/library/ee340124.aspx

There are two easy methods you can use to create new VMs:

* Use the optical drive on the server * Create a local ISO library for storing your .iso files

At the Hyper-V Server command prompt:

mkdir c:\ISO
net share ISO=c:\iso /grant:administrator,FULL /grant:admin,FULL /grant:"Authenticated Users",READ
net share

Clustered Storage

Virtual Machines

Linux Guests

http://www.microsoft.com/en-us/download/details.aspx?id=34603

http://mythoughtsonit.com/2012/05/linux-integration-services-for-hyper-v-enter-the-linux-kernel

http://technet.microsoft.com/en-gb/library/cc794868%28WS.10%29.aspx

http://blogs.technet.com/b/port25

  • Install the Linux Integration Components in Linux VMs
  • Linux based on Linux Kernel 2.6.32 and later includes the Hyper-V drivers out of the box
  • Official support for Redhat and Centos 5.7 and newer, plus SUSE Enterprise 10 and 11
  • Supports 32-bit guests with 1 vCPU
  • Supports 64-bit guests with up to 4 vCPUs

Windows Guests

Boot From USB Flash

Access USB Devices in VMs

Windows Activation

http://technet.microsoft.com/en-us/library/ff793409.aspx

  • For testing, use a KMS key without a KMS licensing server
  • Windows 7 Pro - FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4

RemoteFX

Hardware Requirements

http://technet.microsoft.com/en-us/library/ff817602%28WS.10%29.aspx

http://blogs.nvidia.com/2012/06/for-best-virtual-desktop-nvidia-vgx-windows-remotefx/

http://www.nvidia.com/object/quadro-remotefx.html

http://blogs.nvidia.com/2011/02/it%E2%80%99s-here%E2%80%94nvidia-quadro-driving-virtual-desktops-with-microsoft-remotefx/

http://www.wtslabs.com/blog/?p=176

  • WDDM drivers mst be used.
  • Disable the onboard graphics after installing the GPU.
  • All video cards in the server must match.
  • GPU hardware must support DX9.0c and DX10, but only provide DX 9 to guest VMs.
  • RemoteFX platform is optimized for LAN environments.
  • RemoteFX deployments will require higher connection speeds (up to 10Mbps per-user), depending on the scenario.

With RemoteFX you invest in server hardware with GPUs, but this allows you to buy very cheap and disposable thin or zero clients that don't require much computing or GPU power. This is in contrast to some technologies like Citrix HDX that purposefully offload some CPU/GPU processing to the client devices.

Info

http://www.quest.com/partners-profile/microsoft-win7sp1.aspx

http://derek858.blogspot.com/2011/05/vir313-remotefx-gpu-virtualization-deep.html

http://communities.quest.com/community/vworkspace/blog/2011/02/23/how-eop-xtream-in-quest-vworkspace-accelerates-remotefx-by-62

http://virtualizationreview.com/Blogs/Virtual-Insider/2011/05/Configure-RemoteFX-Hyper-V-R2-SP1.aspx

http://www.petri.co.il/configuring-remotefx-hyper-v-r2-sp1.htm

http://studiohub.wordpress.com/2011/02/24/enable-remotefx-on-hyper-v-server-sp1/

  • Microsoft® RemoteFX™ enables a rich 3-D experience in virtual desktop scenarios.
  • RemoteFX requires clients with RDP version to 7.1 or newer.
  • Supported guest OS is Windows 7 with SP1, Enterprise or Ultimate Editions, 32-bit and 64-bit versions.
  • After adding the RemoteFX 3-D Video Adapter, the VM console can no longer be accessed from the Hyper-V host. This is because RemoteFX now “owns” the console.

Enable RemoteFX on the Hyper-V Server

It is important to note that your very first step before configuring or enabling RemoteFX should be to install the drivers for the graphics card; otherwise, Hyper-V will not be able to provide that card as part of the virtual hardware later when you try and add it to a virtual machine.

  1. Open Server Manager by going to Start | Administrative Tools | Server Manager
  2. Expand the Roles node on the left and click on Remote Desktop Services
  3. Under Role Services, click on Add Role Service
  4. Find the Remote Desktop Virtualization Host and select the check box next to it to enable it
  5. You will then be able to select the RemoteFX checkbox; do that as well
  6. Click on Next and then on Install to get the process going
  7. When the wizard completes the configuration click on Close to exit

Enable RemoteFX on the VMs

Once you have successfully installed and configured RemoteFX on the Hyper-V host, you will be able to configure virtual machines with the RemoteFX Adapter.

When configuring your VMs with RemoteFX, be careful how many monitors you choose to support and the maximum resolution for each. These settings directly impact and affect the amount of GPU memory that needs to be reserved on the Hyper-V host. Of course the more monitors with high resolution that you configure per VM, the fewer VMs you can configure with RemoteFX. Be careful and give users exactly what they need, not more than what they need, which is what we tend to do with all virtualization technologies these days. Resources still matter, so use them wisely.

  1. Click on Start | Administrative Tools | Hyper-V Manager
  2. Locate the VM you want to configure for RemoteFX and make sure it is powered off
  3. Highlight the VM and in the Actions pane, select settings
  4. In the Navigation pane select RemoteFX 3D Adapter
  5. You should now be at the RemoteFX 3D Video Adapter page
  6. Specify the number of monitors and their resolution
  7. Click OK to commit the changes to the VM virtual hardware

It is important to note that when you are using the RemoteFX 3D virtual adapter, you will not be able to connect to your VM using Virtual Machine Connection. Instead, you should use the Remote Desktop client to connect to that VM. If, for whatever reason you need to use the Virtual Machine Connection, you will need to remove the RemoteFX 3D virtual adapter.

Troubleshooting RemoteFX

RemoteFX Note

Also, for those looking to investigate RemoteFX running on a physical Hyper-V Server 2012 RTM and looking for which video cards work with it (requires DirectX 11 capability in the video card and SLAT capability in the physical CPUs), VisionTek 2GB HD 5450 video cards at about $40 each new in box on eBay work fine. Each of those video cards provides about 14x 1920×1080 one-screen RemoteFX sessions.

Driver Installation Notes

I know that this is an old thread, but I ran into this problem when I installed a new Hyper-V Server 2008 R2 and decided to write up a short guide on how to resolve this for future reference.

Device Manager Error

As you've all stated yourselves, the driver is fine since it is loaded and working with the other NIC. Something went wrong during the hardware detection and driver installation phase of the OS installation, and did not create a corresponding service associated with the NIC.

To fix this, we need to remove the NIC from device manager and let Windows detect it once again.

The Device Manager GUI is absent in server core, (yes you can still run device manager remotely from another computer, but from R2 this is a read-only type of administration). The corresponding application for use in CLI is a small software called Devcon.exe. This utility is included in the Windows Driver Kit and can be downloaded from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11800

Once you have put Devcon.exe on your core server (I just copied it straight into C:\) you can find the NIC you want to remove by typing:

Devcon.exe find =net

This will return a list of devices of the network adapter class, and will look something like this

C:\>devcon find =net
ROOT\VMS_MP\0000                                            : Microsoft Virtual Network Switch Adapter
USB\VID_04B3&PID_4010\5&22381B6E&0&2                        : IBM USB Remote NDIS Network Device
PCI\VEN_8086&DEV_105E&SUBSYS_125E8086&REV_06\4&11E9E35A&0&0038: Intel(R) PRO/1000 PT Dual Port Server Adapter #2
ROOT\*6TO4MP\0000                                           : Microsoft 6to4 Adapter
ROOT\*ISATAP\0000                                           : Microsoft ISATAP Adapter #17
ROOT\*ISATAP\0001                                           : Microsoft ISATAP Adapter #18
PCI\VEN_8086&DEV_105E&SUBSYS_125E8086&REV_06\4&11E9E35A&0&0138: Intel(R) PRO/1000 PT Dual Port Server Adapter
B06BDRV\L2ND&PCI_163914E4&SUBSYS_03A91014&REV_20\5&15D4A2B4&0&20050B00: Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #2
ROOT\*ISATAP\0002                                           : Microsoft ISATAP Adapter #19
ROOT\*ISATAP\0003                                           : Microsoft ISATAP Adapter #20
B06BDRV\L2ND&PCI_163914E4&SUBSYS_03A91014&REV_20\5&2E6DCA5E&0&20050B00: Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #52
11 matching device(s) found.

Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #2 is the device that I want to remove, and I do this by copy/paste the hardwareID into typing:

Devcon.exe remove B06BDRV\L2ND&PCI_163914E4&SUBSYS_03A91014&REV_20\5&15D4A2B4&0&20050B00

Since the parent registry object is the same for both NIC's on the dual port adapter, this will unfortunately remove both broadcom adapters, so if any static IP or other settings were configured on the working adapter, this must be redone. Also if you perform this via remote RDP, you will lose connection to the server.

To have the server detect the NIC's again you will have to type:

Devcon.exe rescan

Device Manager OK

And the adapters will now be reinstalled.

virtualization/microsoft/hyper-v.txt · Last modified: 2019/05/20 11:29 by gcooper