Followed this document to create an external virtual switch on Windows 11 Pro, and experienced networking issue on the host machine due to DNS client not working.
Consider adding some more notes on what could happened to the networking on the host machine.
Consider adding a step to rollback. What I executed Remove-VMSwitch -name 'External VM Switch'.
Consider adding preparatory measure to properly configure to get DNS working again. In my case I did followings:
Get-DnsClientServerAddress to confirm the current client DNS settings
follow the steps described in the document to create a new virtual switch with New-VMSwitch command
Get-NetAdapter or Get-NetIPAddress -InterfaceAlias "vEthernet (External VM Switch)" to confirm the interface index of the created vNIC
Get-DnsClientServerAddress to confirm the client DNS settings of the newly created vNIC for the virtual switch
Set-DnsClientServerAddress -InterfaceIndex {interface index confirmed in previous step} -ServerAddresses ("1.1.1.1","8.8.8.8")
replace ("1.1.1.1", "8.8.8.8") with whatever settings confirmed in step 1
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: 3472c798-785c-baf1-3354-76ffdb528a81
Version Independent ID: 5f202201-f814-8707-a216-b9b70bf2f969
Followed this document to create an external virtual switch on Windows 11 Pro, and experienced networking issue on the host machine due to DNS client not working.
Consider adding some more notes on what could happened to the networking on the host machine.
Consider adding a step to rollback. What I executed
Remove-VMSwitch -name 'External VM Switch'
.Consider adding preparatory measure to properly configure to get DNS working again. In my case I did followings:
Get-DnsClientServerAddress
to confirm the current client DNS settingsNew-VMSwitch
commandGet-NetAdapter
orGet-NetIPAddress -InterfaceAlias "vEthernet (External VM Switch)"
to confirm the interface index of the created vNICGet-DnsClientServerAddress
to confirm the client DNS settings of the newly created vNIC for the virtual switchSet-DnsClientServerAddress -InterfaceIndex {interface index confirmed in previous step} -ServerAddresses ("1.1.1.1","8.8.8.8")
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.