none
An error occurred while applying changes to the properties of the virtual switch. (0xC0000022). RRS feed

  • Question

  • I have an error below when I try to create a new VMSwitch.

    An error occurred while applying changes to the properties of the virtual switch.

    An error occured while adding a virtual Ethernet switch connection.

    Failed to bind the Ethernet port'{****}': {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xC0000022).









    And this following is a dialogue by PowerShell;

    PS C:¥Windows¥system32>Get-NetAdapter
    Name                              InterfaceDescription                       ifIndex Status MacAddress LinkSpeed
    -------                              --------------------                          -------  ------  ------------- -----------
    Ethernet                           Realtek PCIe GbE Family Controller    7         Up        ****      100Mbps
    vEthernet (Default Switch) Hyper-V Virtual Ethernet Adapter      17        Up        ****      10Gbps

    PS C:¥Windows¥system32>$net = Get-NetAdapter -Name 'Ethernet'

    PS C:¥Windows¥system32>New-VMSwtch -name "External VM Switch" -AllowManagementOS $true -NetAdapterName $net.Name

    New-VMSwitch: An error occured while adding a virtual Ethernet switch connection.

    Failed to bind the Ethernet port'{****}': {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xC0000022).

    place row: 1 letter: 1

    + New-VMSwitch -name "External VM Switch" -AllowManagementOS $true -Net ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo           : NotSpecified: (:) [New-VMSwitch], VirtualizationException
        + FullyQualifiedErrorID: OperationFailed, Microsoft.HyperV.PowerShell.Commands.NewVMSwitch

    The PC that I am controlling is for my work, and is not connected to the Internet. This means the error can be because of Firewall or function restricting by my company, however I or any co-workers with me do not know what the causes exactly are.




    I am in need of your suggestions.

    Best regard.

    Wednesday, July 8, 2020 10:57 AM

Answers

  • Hi u-g,

    Sorry for the delay. As there's antivirus software running, please uninstall it first. If the issue still occurs you may use procmon to create logs and we may find the access denied recorded in it.

    For more details about procmon you could refer to the link

    https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by u-g Friday, August 7, 2020 10:58 AM
    Tuesday, July 14, 2020 9:25 AM

All replies

  • Hi, 

    Thanks for your question. As per my understanding, the issue you are experiencing is that you failed to create a virtual switch with the powershell command New-VMSwitch and you got a error message said Access Denied. Please correct me if there’s any misunderstanding. To attempt to fix the issue, could you please answer the questions below?

    1. Did you run powershell as administrator?

    2. Have you installed the latest windows updates?

    3. Have you updated your network adapter driver?

    4. Have you tried to re-install the network adapter in device manager?

    If there's an antivirus running, you may try to uninstall it. Also I find a similar issue solved by running command netcfg -d to clean all the network settings, then create a virtual switch again. You may refer to the link below

    https://social.technet.microsoft.com/Forums/office/en-US/84f413dc-2da0-44c0-928d-70b7a6c0404b/hyperv-virtual-switch-manager-cannot-create-an-external-switch?forum=winserverhyperv

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, July 9, 2020 9:36 AM
  • Hello, Ian!

    I sincerely appreciate your reply.

    Yes, you accurately understand what problem I am having.

     

     

    So, I answer your questions;

    1.    Did I run PowerShell as administrator?
    Yes, as the dialog says C:\Wndows\system32


    2.    Have I installed the latest windows updates?
    Maybe yes, because the system says Version: 1909, OS Build: 18363.418.
    The PC, however, is not connected to the Internet, and probably its functions are restricted, so I am not sure…


    3.    Have I updated my network adapter driver?
    Yes, I just manually checked updates every one of the drivers under Network Adapter


    4.    Have I tried to re-install the network adapter in device manager?
    Yes, as I did #3 above

     

     

    About antivirus software, I am going to try and uninstall it later, when the software is not under my controlling, but under my firm. So, it takes a time, but I will talk to my boss, and offer you the update.

    Also about netcfg –d, it did not work… I read the thread you introduced, and I disconnected the physical LAN, waited for 10 seconds, connected it, to see if it solved, turned out NO.

     

    What am I supposed to do next?  I’m a poor kitten.
    Friday, July 10, 2020 2:24 PM
  • Hi u-g,

    Sorry for the delay. As there's antivirus software running, please uninstall it first. If the issue still occurs you may use procmon to create logs and we may find the access denied recorded in it.

    For more details about procmon you could refer to the link

    https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by u-g Friday, August 7, 2020 10:58 AM
    Tuesday, July 14, 2020 9:25 AM
  • SOLVED!

    Uninstalling Virus Buster was the answer. It prevented me from what I wanted to do.

    Thank a lot!

    P.S. Sorry for being very late 😭

    • Edited by u-g Friday, August 7, 2020 11:04 AM
    Friday, August 7, 2020 11:03 AM