Identify NICs in Windows Server 8 Hyper-V
In a Hyper-V cluster are normally a lot of NICs involved. Identifying the right can be challenging. It is important to consequently label your network adapters on all the servers in the Hyper-V cluster.
In Windows Server 8 there are PowerShell Cmdlets that can be used for identifying NICs. Once you identified the NIC, rename it to meaningful name. The PowerShell Cmdlets listed below can be executed on the following versions:
- Hyper-V Server 8
- Windows Server 8 Core
- Windows Server 8 GUI
Three ways are listed using PowerShell to identify the NIC in a Windows Server 8 Hyper-V environment.
Before you begin
Execute PowerShell and import the Hyper-V module using the following command:
Import-Module Hyper-V
1. Identify the NIC by connection State
Connect one NIC and use the following command:
Get-NetAdapter | Select Name, InterfaceDescription, MediaConnectionState | FL
Look at which NIC is connected and rename the NIC to a meaningful name (listed below)
Add the second NIC and execute the command again and rename the name of the NIC. Do this for all NICs
2. Identify the NIC using the MAC address
When you know the MAC address of the NIC (for example in a HP Flex-10 environment) it can be identified using the following command:
Get-NetAdapter | Select Name, InterfaceDescription, MacAddress | FL
Look at the corresponding MAC address and rename the NIC to a meaningful name (listed below). Do this for all NICs.
3. Identify the NIC by PCI bus ID
The last option is to identify the NIC by PCI bus ID. The following command list all NICs PCI bus adapter information:
Get-NetAdapterHardwareInfo | select Name, InterfaceDescription, DeviceType, Busnumber, Devicenumber, Functionnumber | FL
Look at the corresponding PCI bus and rename the NIC to a meaningful name (listed below). Do this for all NICs.
Rename the NIC
Rename the NIC to a meaningful name, for example, rename the name “Wired Ethernet Connection 2” to “MGMT-LOM01-VLAN20” use the following command:
Rename-NetAdapter “Wired Ethernet Connection 2” –NewName “MGMT-LOM01-VLAN20”
Enable Windows Server 8 Hyper-V in VMware Workstation
VMware Workstation Technology Preview 2012 is available as download. The Technology Preview makes it possible for example to install and operate Windows 8 and Windows Server 8 in a VM and the possibility to nest VMs.
I tested the installation of Windows Server 8 in VMware Workstation TP, enabled the Hyper-V role and run a Windows 7 64-bit VM in Hyper-V. Here are some screenshots (Hyper-V manager and the Windows 7 64 bit running in Hyper-V):
To make the above configuration work, add to following options to the end of the VMX file before starting the Windows Server 8 installation:
hypervisor.cpuid.v0 = FALSE mce.enable = "TRUE"
The VMware Workstation TP VMs are started in debug mode which impacts the performance!
More information can be found here:
- VMware Workstation Technology Preview 2012 Overview
- Download
Windows Server 8 PowerShell Cmdlets for Hyper-V help
In Windows 2008 & Windows R2 there were no official PowerShell Cmdlets available for Hyper-V. This is changed in Windows 8. Windows Server 8 has 162 PowerShell Cmdlets available for Hyper-V. Windows 8 uses PowerShell version 3.
Cmdlets are very powerful, that lets you automate all aspects of Hyper-V. Here some guidance how-to find the Cmdlets you need.
To view all the Hyper-V PowerShell Cmdlets:
Get-Command -Module Hyper-V
To search for Cmdlets, for example with the name “host” in it:
Get-Command -Module Hyper-V -Noun *host*
To get the Cmdlet syntax:
Get-VMHost -?
Get the Cmdlet syntax and available parameters, details and examples:
get-Help Get-VMHost -Full
More information over the Hyper-V Cmdlets can be found here. PowerShell 3.0 is available as Community Technology Preview (CTP) found here.
Hyper-V and hibernate
For my MS Hyper-V home server I want to hibernate every day between 12.30 and 07.00 am. When the Hyper-V role is installed, it is not possible to use the hibernate function. The following steps make it possible to automatic hibernate the system and when it wake up, the Hyper-V service and the VM(s) are started.
Steps:
1. Download “PowerShell Management Library for Hyper-V” file found here. Unblock the zone information from this zip, extract it and run the install file. Copy the content in the “HyperV_install” folder to “%windir%\System32\WindowsPowerShell\v1.0\Modules\HyperV”
2. Edit VM properties of all VMs. Set the Automatic stop action “Shut down the guest operating system”
3. Edit the registy to disable auto start the hvboot service. When installing the hyper-v role the hibernate and sleep functionality is disabled. There is no way to use the hiberate or sleep functionality while the Hyper-v service is running. The Start property of a service can have the following values:
0=Boot
1=System (default)
2=Auto
3=Demand
4=Disabled
Set the value to 3, so that you can start the service when you want. 0 is not supported for hvboot. Information found here.
Reboot the server so that the hvboot service is not started.
4. Create 4 schedule tasks to run every day.
| Name | Time | Action |
| 1.Reboot Server | 12.30 am | shutdown /r t 30 |
| 2.Hibernate | 12.40 am | shutdown /h |
| 3.Wake Up | 07.00 am | Under conditions select “Wake the computer to run this task” |
| 4.Start HVboot & VMs | 07.10 am | powershell.exe -command "c:\powershell\startvm.ps1" |
The startvm.ps1 script contains the following Powershell syntax:
|
001
002 003 |
import-module hyperv
start-service hvboot start-vm -vm "Windows Home Server 2011" |
Test if the schedule tasks are running fine by manually execute them and you’re ready to hibernate.
Microsoft Hyper-V (R2) link collection
Here’s a “handy” collection of links when designing, installing or troubleshooting a Microsoft Hyper-V (R2) environment. Even when studying for a Microsoft Hyper-V related exam this links can be useful. On the moment i ’am preparing for the exam 70-659 Windows Server 2008 R2 Server Virtualization so i generated this list of links.
General
- Hyper-V versions
- Windows Server 2008 R2: Hyper-V Component Architecture
- Hyper-V Technical Information and Resources
- Hyper-V: Survival Guide
- Microsoft ROI Calculator
- Hyper-V FAQ
- Configuring Remote Management of Hyper-V Server – in a workgroup
- Configuring the Firewall for Remote Management of a Workgroup Server Core installation
Windows 2008 R2 Virtualization calculator
- http://www.microsoft.com/windowsserver2008/en/us/server-calculator/default.aspx
- http://www.microsoft.com/windowsserver2003/howtobuy/licensing/calc_2.htm
Memory
Cluster
- Hyper-V cluster best practices
- Designating a Preferred Network for Cluster Shared Volumes Communication
- Troubleshooting ‘Redirected Access’ on a Cluster Shared Volume (CSV)
Networking
- Hyper-V: Live Migration Network Configuration Guide
- Hyper-V: Virtual Networking Best Practices
- Windows Server 2008 R2 Live Migration – “The devil may be in the networking details.”
- Hyper-V Server Networking Best Practices: Summary
- Using HP ProLiant Network Teaming Software with Microsoft® Windows® Server 2008 Hyper-V or with Microsoft® Windows® Server 2008 R2 Hyper-V
Servers
- Implementing Microsoft Windows Server 2008 Hyper-V™ on HP ProLiant servers
- Server Virtualization Validation Program links, link1, link2
Software updates
Storage
- Business-Ready Configurations for Virtualization for Hyper-V R2 on Dell PowerEdge R-Series servers and PowerVault MD3200i Storage
- Best practices for deploying an HP EVA array with Microsoft Hyper-V R2
- NetApp Best Practices for Hyper-V R2
- Virtual Hard Disk performance Windows 2008 (R2) and Windows 7
Backup
- How to back up Hyper-V virtual machines from the parent partition on a Windows Server 2008-based computer by using Windows Server Backup
- System Center Data Protection Manager 2010 Hyper-V protection: Configuring cluster networks for CSV redirected access
- System Center Data Protection Manager 2010 Hyper-V protection: Configuring cluster networks for CSV redirected access
VMs
P2V
Books
- MCTS Self-Paced Training Kit (Exam 70-652): Configuring Windows Server Virtualization
- Mastering Hyper-V Deployment
- Free ebook Understanding Microsoft Virtualization Solutions (Second Edition)
Forum
Video’s
- Hyper-V Deployment and Best Practices
- Video’s about Server, desktop and application virtualization
- Failover Cluseting in 2008 R2 What’s new
- Failover Clustering & Hyper-V
Exams
- Windows Server 2008 R2, Virtualization Administrator
- TS: Windows Server 2008 R2, Server Virtualization
- Exam testing centre
If you have other “good” Microsoft Hyper-V related links let me know so can update this list.









Recent Comments