MicrosoftDocs / Virtualization-Documentation

Place to store our documentation, code samples, etc for public consumption.
http://docs.microsoft.com/virtualization/
Creative Commons Attribution 4.0 International
1.79k stars 1.54k forks source link

Add more notes on DNS failure on the host machine immediately after creating a new external virtual switch #1960

Open pkkudo opened 5 months ago

pkkudo commented 5 months ago

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:

  1. Get-DnsClientServerAddress to confirm the current client DNS settings
  2. follow the steps described in the document to create a new virtual switch with New-VMSwitch command
  3. Get-NetAdapter or Get-NetIPAddress -InterfaceAlias "vEthernet (External VM Switch)" to confirm the interface index of the created vNIC
  4. Get-DnsClientServerAddress to confirm the client DNS settings of the newly created vNIC for the virtual switch
  5. 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.