question

PaulGreen-6671 avatar image
0 Votes"
PaulGreen-6671 asked MarkClift-3467 answered

vSwitch in Promiscuous Mode

Hello

I have a Server 2019 Hyper-V Host and need to setup one of the vSwitches for port mirroring in Promiscuous Mode (as I understand it, at least). I have done this in the past using the below PS but am getting an error on this Host (previous hosts were running 2012R2).


Here is what I am typing into PS:

 PS C:\Windows\system32> $a = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5
    
 PS C:\Windows\system32> $a.SettingData.MonitorMode = 2
    
 PS C:\Windows\system32> Add-VMSwitchExtensionPortFeature -ExternalPort –SwitchName NAMEOFMYSWITCH -VMSwitchExtensionFeature $a


I get the below error:

 Add-VMSwitchExtensionPortFeature : Failed while modifying virtual Ethernet switch connection settings.
    
 At line:1 char:1
    
 + Add-VMSwitchExtensionPortFeature -ExternalPort –SwitchName NAMEOFMYSWITCH ...
    
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
 + CategoryInfo : NotSpecified: (:) [Add-VMSwitchExtensionPortFeature], VirtualizationException
    
 + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.AddVMSwitchExtensionPortFeature


Not sure what to make of that and I can't find much information when I search.

Any suggestions appreciated.

Many thanks

windows-server-powershellwindows-server-2019windows-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.

MarkClift-3467 avatar image
0 Votes"
MarkClift-3467 answered

@ejsiron Thank you for your reply.

Using your suggestions I was able to work around the error.

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.

ejsiron avatar image
1 Vote"
ejsiron answered ejsiron edited

I get this error when I run your PS against a virtual switch that already has the security settings extension installed. Try your PS with Set-VMSwitchExtensionPortFeature instead of Add-...

If that still doesn't work, first run

 Get-VMSwitchExtensionPortFeature -ExternalPort

If that shows the security settings feature and nothing else, then you can:

 Get-VMSwitchExtensionPortFeature -ExternalPort | Remove-VMSwitchExtensionPortFeature

If you have more than one feature installed, then you'll have to add filters to the Get-VMSwitchExtensionPortFeature until you narrow it down to the one that you want.

After you have successfully removed the feature, you should have no trouble with your original PS that uses the Add-...

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.

PaulGreen-6671 avatar image
0 Votes"
PaulGreen-6671 answered

Hello

I never found an answer. In the end I installed Server 2012R2 on the host as a work-around.

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.

MarkClift-3467 avatar image
0 Votes"
MarkClift-3467 answered

I am having the same problem. Did you ever find and answer?

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.