Tag Archives: hyper-v

Accessing Hyper-V from WSL

Forwarding is disabled by default:

Get-NetIPInterface | Select-Object ifIndex,InterfaceAlias,ConnectionState,Forwarding
ifIndex InterfaceAlias                     ConnectionState Forwarding
------- --------------                     --------------- ----------
     57 vEthernet (WSL (Hyper-V firewall))       Connected   Disabled
     38 vEthernet (Default Switch)               Connected   Disabled
     17 Ethernet 2                            Disconnected   Disabled
     14 Local Area Connection* 10             Disconnected   Disabled
     22 Local Area Connection* 9              Disconnected   Disabled
     18 OpenVPN Connect DCO Adapter           Disconnected   Disabled
      7 Wi-Fi                                    Connected   Disabled
      5 Local Area Connection                 Disconnected   Disabled
      1 Loopback Pseudo-Interface 1              Connected   Disabled
     57 vEthernet (WSL (Hyper-V firewall))       Connected   Disabled
     38 vEthernet (Default Switch)               Connected   Disabled
     17 Ethernet 2                            Disconnected   Disabled
     14 Local Area Connection* 10             Disconnected   Disabled
     22 Local Area Connection* 9              Disconnected   Disabled
     18 OpenVPN Connect DCO Adapter           Disconnected   Disabled
      7 Wi-Fi                                    Connected   Disabled
      5 Local Area Connection                 Disconnected   Disabled
      1 Loopback Pseudo-Interface 1              Connected   Disabled
(more…)

Binding Docker container ports to the host on Ubuntu 18.04 inside Hyper-V on Windows 10

The binding did not work for me until I switched from Internal Virtual Switch to External Virtual Switch and while switching I were getting the following error:

[Window Title]
Virtual Switch Manager for MY-MACHINE

[Main Instruction]
Error applying Virtual Switch Properties changes

[Content]
Failed while adding virtual Ethernet switch connections.

[Expanded Information]
External Ethernet adapter 'Realtek PCIe GBE Family Controller' is already bound to the Microsoft Virtual Switch protocol.

until I switched Hyper-V Extensible Virtual Switch off on my network adapter properties page (after I created External Virtual Switch it switched on back):

(more…)

Setting up Hyper-V Virtual Machine With Internet Connection

To set up my virtual machines with the internet connection I followed the steps described in Configure Hyper V Virtual Machine With Internet Connection article:

First I created the virtual switch by going to Hyper-V Manager->Virtual Switch Manager:

(more…)