It is important to get the network card configuration right in the parent partition for Hyper-V in Windows Server 2008/R2.
Common problems include:
These problems have nothing to do with Hyper-V actually. They’re just issues you can face with any server containing more than one network card.
Step #1: Ensure that you have a good naming convention for you network cards
As you can see I have explicitly named by network cards. One for the parent partition, one for the VM’s. If you have one or more network cards for VM’s or iSSCI, name them accordingly.
Step #2 : Ensure that the parent partition uses the right network card
In the image below you can see that the Parent Partition network card is first in the order. This means that network services will attempt to use this interface before the VM NIC #1.
Step #3 : Ensure that the VM or iSCSI NIC does not register itself in DNS
Make sure that the network cards you dedicate for VM external networks do not register themselves in DNS. Just configure the basic IP address and mask. You do not need to include DNS servers etc. Remember, you are more or less turning this network card into a virtual switch.
Note that the “Register this connections addresses in DNS” is left un-ticked. If you built you base OS for the parent partition with all the network cards patched, chances are that you will find more than one address registered for the server in DNS. Ensure that you remove unwanted A-records and PTRs.
Step #4: Ensure that you disable NetBIOS over TCP/IP on the VM network cards
I was recently asked a question about PowerShell's ability to read in an XML configuration file at a Virtual Academy I ran last week. One of the strengths of PowerShell is its ability to perform lots of time saving tasks … one of which is reading in an XML file. The Get-Content command can read in an XML file and you can easily loop through the contents.
Example:
[xml]$computerlist = Get-Content computers.xml foreach( $computer in $computerlist.computers.target) { Write-Host $computer.name }
What would the XML file look like?
<computers> <target> <Name>server1</Name> </target> <target> <Name>server2</Name> </target> </computers>
Nice and simple really.