question

farm8863-8299 avatar image
0 Votes"
farm8863-8299 asked IanXue-MSFT rolled back

MS Server 2008 R2 Hyper-V help

hello,

I have a MS server 2008 R2 with Hyper V as a role with a VM that needs to allow tagged traffic from the VM through to my network. I found instruction for 2012 PowerShell commands as noted below:

however these commands don't work in 2008 R2. can you help with the commands to allow all tagged traffic through?

To see the list of adapters and assignment, use the following script:
Get-VMNetworkAdapter -VMName <C9800-name>
Note To rename the adapter name, use the following command:
Rename-VMNetworkAdapter -VMName <C9800-name> -Name '<C9800-adapter-name>' -NewName 'Eth1' Here, Eth1 is the adapter name.
To configure Ethernet1 (data port/management) as Trunk, with Native VLAN id as 0, use the following script:
Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth1 -Trunk -AllowedVlanIdList “1-4000” -NativeVlanId 0
To configure Ethernet0 (serial port) as access or untagged, use the following script:
Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth0 -Untagged

windows-server-powershellwindows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered IanXue-MSFT rolled back

Hi,

The Hyper-V module for Windows PowerShell is only available since Windows Server 2012 and is not compatible with Windows Server 2008 R2.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh846767(v=ws.11)

However, there's a third-party module pshyperv that provides a PowerShell management library for Hyper-V. You may give it a try.
https://github.com/gcbond/pshyperv

Hope this helps.

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I thank you for the response. Is there a different way to tell the virtual switch to be a trunk and what vlans to trunk as my VM is configured as a trunk with van 90.

0 Votes 0 ·

To the best of my knowledge, there's no other PowerShell module for Hyper-V on Windows Server 2008 R2.

1 Vote 1 ·