You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
I am trying to ensure that a certain switch configuration is always present. The problem is that when you create a switch with a type of "External", it creates another network interface on the machine and uses that instead of the original network interface specified. So the first run creates the switch just fine. The subsequent runs will still work if no VMs are using the switch, as it seems to delete the switch and recreate it. Once a VM is using the switch, instead of the xVMSwitch resource determining that there is nothing to do, it throws this error: "Failed while removing virtual Ethernet switch.
The virtual switch 'DSC Test' cannot be deleted because it is being used by running virtual machines or assigned to child pools."
Verbose logs showing the problem
Suggested solution to the issue
During the test phase of the resource, identify the newly created nic for the switch instead of the original nic it was based off of when the switch type is "Physical".
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Name : xHyper-V
Path : C:\Program Files\WindowsPowerShell\Modules\xHyper-V\3.17.0.0\xHyper-V.psd1
Description : Module with DSC Resources for Hyper-V area
ModuleType : Manifest
Version : 3.17.0.0
The text was updated successfully, but these errors were encountered:
johlju
changed the title
xVMSwitch: No idempotence for switches with type of External
VMSwitch: No idempotence for switches with type of External
Jun 12, 2022
Details of the scenario you tried and the problem that is occurring
I am trying to ensure that a certain switch configuration is always present. The problem is that when you create a switch with a type of "External", it creates another network interface on the machine and uses that instead of the original network interface specified. So the first run creates the switch just fine. The subsequent runs will still work if no VMs are using the switch, as it seems to delete the switch and recreate it. Once a VM is using the switch, instead of the xVMSwitch resource determining that there is nothing to do, it throws this error: "Failed while removing virtual Ethernet switch.
The virtual switch 'DSC Test' cannot be deleted because it is being used by running virtual machines or assigned to child pools."
Verbose logs showing the problem
Suggested solution to the issue
During the test phase of the resource, identify the newly created nic for the switch instead of the original nic it was based off of when the switch type is "Physical".
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: