none
Not able to create Virtual Switch on Window server 2016 Full Preview 4 RRS feed

  • Question

  • To create Virtual Switch on Windows Server 2016 I followed following steps and I got error as follows but not able to create Switch. Please help me. thanks in advance

    Environment Details: Azure VM – for details see attachment

    Step 1. Create VM Switch  à result Successful

                    Command :

    PS C:\Windows\system32> New-VMSwitch -Name "NAT" -SwitchType NAT -NATSubnetAddress "172.16.0.0/12"

    Step2. Create the Network Address Translation Object à fail  due to following error

                    Command:

    PS C:\Windows\system32> New-NetNat -Name NAT -InternalIPInterfaceAddressPrefix "172.16.0.0/12"

                Error:

    New-NetNat : The parameter is incorrect.

    At line:1 char:1

    + New-NetNat -Name NAT -InternalIPInterfaceAddressPrefix "172.16.0.0/12 ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidArgument: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [New-NetNat], CimException

        + FullyQualifiedErrorId : Windows System Error 87,New-NetNat

    Step3: Port Mapping àFail due to step2 fails

                    Command:

    PS C:\Windows\system32> Add-NetNatStaticMapping -NatName "Nat" -Protocol TCP -ExternalIPAddress 0.0.0.0 -InternalIPAddre

    Error:

    ss 172.16.0.2 -InternalPort 80 -ExternalPort 80

    Add-NetNatStaticMapping : Instance Nat Nat not found

    At line:1 char:1

    + Add-NetNatStaticMapping -NatName "Nat" -Protocol TCP -ExternalIPAddre ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : ObjectNotFound: (MSFT_NetNatStaticMapping:root/StandardCi...atStaticMapping) [Add-NetNat

       StaticMapping], CimException

        + FullyQualifiedErrorId : Windows System Error 1168,Add-NetNatStaticMapping

    Image:Showing Azure VM Details

    Tuesday, April 12, 2016 1:43 PM

Answers

  • this issue has been fix -

    I closed all command windows and opened new one and ran same script again

    And am able to create switch.

    thanks

    • Marked as answer by suvadan Tuesday, July 12, 2016 6:32 AM
    Wednesday, April 20, 2016 1:32 PM

All replies

  • same issue trying to do

    New-NetNat -Name "DockerNAT" -InternalIPInterfaceAddressPrefix "10.0.75.0/24"

    on

    PS C:\WINDOWS\system32> $(Get-Item "HKLM:\Software\Microsoft\Windows NT\CurrentVersion")


        Hive: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT


    Name                           Property
    ----                           --------
    CurrentVersion                 SystemRoot                : C:\WINDOWS
                                   BuildBranch               : th2_release
                                   CurrentBuild              : 10586
                                   CurrentMajorVersionNumber : 10
                                   CurrentMinorVersionNumber : 0
                                   CurrentType               : Multiprocessor Free
                                   CurrentVersion            : 6.3
                                   EditionID                 : Enterprise
                                   InstallationType          : Client
                                   InstallDate               : 1452232748
                                   ProductName               : Windows 10 Enterprise
                                   ReleaseId                 : 1511

    UPDATE: My issue was solved by removing the existing NetNat object. Get-NetNat showed me an object already existed with the same subnet and I was able to manually fix the issue (if you're using a script, try removing (Remove-NetNat) the object and run the script again)
    • Edited by so0k Saturday, April 16, 2016 7:57 PM
    Saturday, April 16, 2016 1:52 PM
  • this issue has been fix -

    I closed all command windows and opened new one and ran same script again

    And am able to create switch.

    thanks

    • Marked as answer by suvadan Tuesday, July 12, 2016 6:32 AM
    Wednesday, April 20, 2016 1:32 PM