Category Archives: Hyper-V

Hyper-V Error when creating a new vSwitch

When creating a new Hyper-V virtual switch (vSwitch) you receive an error “Error Applying New Virtual Network Changes…Setup switch failed…Cannot bind….because it is already bound to another virtual network.”

 This error can occur if the vSwitch has already been configured with that physical network adapter or for some reason (only know to the Microsoft Gods) the Microsoft Virtual Network Switch Protocol has been checked.

First, verify that vSwitch is not already configured in Hyper-V.  If it’s not in use then uncheck the protocol and reconfigure the vSwitch (image above).  But wait; what about if you’re using Hyper-V core?  Not so easy because of the lack of GUI.  Let’s begin:

  1. We need to find the NIC’s GUID that is giving the error by typing: WMIC NICCONFIG GET Description,SettingID
  2. In my case its the HP Network Teaming NIC highlighted in Yellow above.  We need to download Microsoft’s “Network Virtual Service Provider Bind (NVSPBIND)” unity and extract the files on the Hyper-v srv’s c:\windows\system32 directory.  “The purpose of nvspbind is to disable and enable protocol bindings from the command line when operating in the parent partition for Hyper-V in a server core environment.”
  3. Then from a cmd prompt type: nvspbind.exe -u <GUID of the NIC w/ the issue>
  4. You should be good to configure the vSwitch using Microsoft’s SCVMM or Hyper-V manager.  Note: These are the only two support ways of configuring a Hyper-V vSwitch.  Also, Microsoft does provide a document if you require more information on how to use nvspbind.exe.  The doc can be located on the system32 directory as part of the extraction.

Hyper-V Core | HP Nic Teaming

Setting up HP Nic teaming on the GUI version of Hyper-V or Windows server is pretty straight forward.  However, the same can not be said when trying to accomplish the task using Hyper-V Core.  Well, unless you’re following the instructions listed below.  But first you’ll need a server that already has HP NIC teaming configured.  Preferably an identical server with the same amount of NICs configured the way you would like Hyper-V core to be configured.

  1. Log onto a server that already has HP teaming configured; open a command prompt and type CQNICCMD /S <filename>.xml
  2. Modify the file if additional NICs need to be added or remove.  HP recommends checking the file for errors if it has been modified by typing CQNICCMD /P <filename>.xml
  3. Copy the file to the Hyper-V Core server and then type in the cmd prompt: CQNICCMD /C <filename>.xml
  4. Check the log file for errors located at: \cpqsystem\log\cpqteam.log.
  5. Test the NIC teaming and verify the configuration was successful.

Below is a copy of a xml file output in case you don’t have a server which can be used to export the xml file.  However, I’m not responsible for issue you may encounter.  Make sure to add or remove the NICs in the file to mimmic your server configuration.  Also, TEST BEFORE PLACING YOUR SERVER IN PRODUCTION.  ONCE AGAIN, I’M NOT RESPONSIBLE FOR ANY ERRORS YOU MAY ENCOUNTER!  Copy the below xml information and paste it on a file with an xml extension:

<?xml version=”1.0″ encoding=”ISO-8859-1″?>

<teamingconfig>

  <!– The comment lines in this file make it convenient   –>
  <!– to reference <nic>, <team>, and <vlan> elements     –>
  <!– within the file.  It is recommended that these      –>
  <!– comment lines remain unchanged if the user edits    –>
  <!– the file.                                           –>

  <!–                        –>
  <!–     Version Data       –>
  <!–                        –>

  <version UtilityVersion=’9.70.0.16′ ScriptVersion=’3.1’/>

  <!–                        –>
  <!–      Adapter Data      –>
  <!–                        –>

  <!– <nic> element 1 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’iSCSIEnabled’ value=’0’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’FlowControl’ value=’Disable’/>
    <property id=’WireSpeed’ value=’1’/>
    <property id=’TOEEnabled’ value=’1’/>
    <property id=’RSSEnabled’ value=’1’/>
    <property id=’OptimizationMethod’ value=’L2 and L4’/>
    <property id=’TargetInterruptsPerSecond’ value=’4425’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPUDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’LSOV1IPv4′ value=’1’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’TransmitBuffers’ value=’1500’/>
    <property id=’NetworkAddress’ value=” />
    <property id=’iSCSIVlanId’ value=’0’/>
    <property id=’iSCSIVlanName’ value=”/>
    <property id=’iSCSIPacketPriority’ value=’Disabled’/>
    <property id=’iSCSIDHCPEnabled’ value=’Enabled’/>
    <property id=’iSCSIIPAddress’ value=’0.0.0.0’/>
    <property id=’iSCSISubnetMask’ value=’0.0.0.0’/>
    <property id=’iSCSIGateway’ value=’0.0.0.0’/>
    <property id=’iSCSILAA’ value=” />
  </nic>

  <!– <nic> element 2 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’iSCSIEnabled’ value=’0’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’FlowControl’ value=’Disable’/>
    <property id=’WireSpeed’ value=’1’/>
    <property id=’TOEEnabled’ value=’1’/>
    <property id=’RSSEnabled’ value=’1’/>
    <property id=’OptimizationMethod’ value=’L2 and L4’/>
    <property id=’TargetInterruptsPerSecond’ value=’4425’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPUDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’LSOV1IPv4′ value=’1’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’TransmitBuffers’ value=’1500’/>
    <property id=’NetworkAddress’ value=” />
    <property id=’iSCSIVlanId’ value=’0’/>
    <property id=’iSCSIVlanName’ value=”/>
    <property id=’iSCSIPacketPriority’ value=’Disabled’/>
    <property id=’iSCSIDHCPEnabled’ value=’Enabled’/>
    <property id=’iSCSIIPAddress’ value=’0.0.0.0’/>
    <property id=’iSCSISubnetMask’ value=’0.0.0.0’/>
    <property id=’iSCSIGateway’ value=’0.0.0.0’/>
    <property id=’iSCSILAA’ value=” />
  </nic>

  <!– <nic> element 3 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’EnablePME’ value=’Disable’/>
    <property id=’WakeOn’ value=’OS Controlled’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’WakeOnLink’ value=’Disable’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’0’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

  <!– <nic> element 4 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’WakeOn’ value=’Disable’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’1’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

  <!– <nic> element 5 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’EnablePME’ value=’Disable’/>
    <property id=’WakeOn’ value=’OS Controlled’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’WakeOnLink’ value=’Disable’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’2’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

  <!– <nic> element 6 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’WakeOn’ value=’Disable’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’3’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

  <!– <nic> element 7 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’WakeOn’ value=’Disable’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’3’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

  <!– <nic> element 8 –>
  <nic>
    <property id=’SpeedDuplex’ value=’Auto/Auto’/>
    <property id=’PriorityVLANTag’ value=’Priority and VLAN Enabled’/>
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’WakeOn’ value=’Disable’/>
    <property id=’MasterSlave’ value=’Auto Detect’/>
    <property id=’SpdEnabled’ value=’H/W Default’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
    <property id=’RSSEnabled’ value=’0’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’ReceiveBuffers’ value=’256’/>
    <property id=’TransmitBuffers’ value=’512’/>
    <property id=’PreferredPrimaryRanking’ value=’3’/>
    <property id=’DualChannelGroup’ value=’0’/>
    <property id=’ConfiguredPortCost’ value=’0’/>
  </nic>

<!–                        –>
  <!–       Team Data        –>
  <!–                        –>

  <!– <team> element 1 –>
  <team relnics=’2 4 5 6 7 8′>
    <property id=’TeamName’ value=’HP Network Team #1’/>
    <property id=’OpMode’ value=’Auto’/>
    <property id=’LoadBalAlgorithm’ value=’Auto’/>
    <property id=’RxPathValidationInterval’ value=’3’/>
    <property id=’TxPathValidationInterval’ value=’3’/>
    <property id=’RxPathValidationMode’ value=’Enabled’/>
    <property id=’TxPathValidationMode’ value=’Enabled’/>
    <property id=’TeamNetworkAddress’ value=” />
    <property id=’JumboPacket’ value=’1514 Bytes’/>
    <property id=’IPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’TCPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv4′ value=’Rx/Tx Enable’/>
    <property id=’UDPChecksumOffloadIPv6′ value=’Rx/Tx Enable’/>
    <property id=’LSOV1IPv4′ value=’0’/>
    <property id=’LSOV2IPv4′ value=’1’/>
    <property id=’LSOV2IPv6′ value=’1’/>
    <property id=’FlowControl’ value=’Rx/Tx Enable’/>
  </team>

</teamingconfig>


Parent partition Memory Reserve

Hyper-V R2 SP1 introduced dynamic memory for the virtual machines.  As a result, memory will be given and taken away as needed by the VM’s.  The parent partition (which is also a VM) may surfer from memory starvation because the other VMs have taken the available memory.  Not a good scenario to encounter.  Which is why Microsoft introduce a regkey that can reserve a static amount of memory just for the parent VM.  How much memory to allocate depends on the load placed on the parent VM.  Below is the regkey information:

HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Virtualization

Then create a new DWORD with the name MemoryReserve.  Set the static amount you wish to allocate for the parent VM.  The value is configured in “Decimal” using MB’s.  For example, 2 Gig’s of RAM would be 2048.  Then restart the server to apply the new changes and call it a day because your done.

For more information on the amount to allocated be visit: PFE Virtualization Blog at technet.


Hyper-V Virtual Machine Import Error

Issue: You use the Hyper-V management tool to export a virtual machine without any issues.  However, after trying to import the VM you receive the error: “Import failed. Number of parameters supplied for resource paths are not consistent. You should have a SourceResourcePath entry for every CurrentResourcePath entry in import structure.”

Solution:  You’re out of luck!  Just playing!  Corny joke as my wife always tells me.  Anyhow, the solution is very simple.  Open the export file with the extension .exp.  This file can be found under the “Virtual Machines” folder located in the VM export folder.  Open it and search for “CopyVmStorage”.  Then all that needs to be done is to change the value set from FALSE to TRUE.

From this:

NAME=”CopyVmStorage” TYPE=”boolean”><VALUE>FALSE</VALUE>

To this:

NAME=”CopyVmStorage” TYPE=”boolean”><VALUE>TRUE</VALUE>

Try your import again.  If you don’t receive any errors you’re done.

However, you may receive an error stating unable to locate the virtual machines hard drives.
Follow these instructions:

  1. Create a folder called “Virtual Hard Disks” under the virtual machine export folder.
  2. Copy all of the *.vhd files into the folder created in step 1.
  3. Import the VM again.

Done!