Connecting a Hyper-V VM (Linux based) to the internet via wifi - No wifi appears to connect to in Linux

28,453

Solution 1

1] Delete all the virtual switches and start over (if it is wise to do so).

2] Create an External switch with external network selected either Ethernet or WiFi. (wait for a minute)

3] Now create an Internal switch. (again wait for a minute)

4] Go to Control Panel\Network and Internet\Network Connections and right-click on the External switch, go to Sharing tab and enable the sharing for the Internal switch. (Now, if you don't see a list of network adapters that includes the Internal switch, you may have to start over or wait for a while to let all the changes take effect.)

5] Select the Internal switch for your Linux type guest OS and enable the network in the OS. (You don't need to restart the guest OS at any of the steps) Hopefully your guest OS will connect to the internet as well as internal network.

I've tested & verified this exact process for RedHat7, CentOS7 and Kali Linux.

Solution 2

I have managed to connect my Elementary OS with my laptop's Wi-Fi. This is how.

Open Hyper-V Virtual Switch Manager Create an Internal Virtual Switch Rename it "Internal Switch" Hit Okay

Select Elementary OS VM Right click > Settings Change Network Adapter to newly created Switch Hit Okay

DO NOT START THE VM YET.

Go to Windows 8’s Network and Sharing Center and click on the “Wi-Fi” link (or the name of your laptop’s wireless adapter) listed in the Connections

In the adapter status window, click “Properties”

In the Properties window, click the Sharing tab, check the “Allow other network users…” box, select “vEthernet (Internal Switch)” (or the name of your wireless adapter), and click “OK” to close the window

Click Close to exit the Wi-Fi status window To confirm you have it setup correctly, click on the “Change adapter settings” link. You should see the word Shared beside your wireless connection.

Start you VM and check you are connected to the Internet.

Share:
28,453

Related videos on Youtube

Mr_CJ
Author by

Mr_CJ

Updated on September 18, 2022

Comments

  • Mr_CJ
    Mr_CJ over 1 year

    This is what I do:

    Open Hyper-V
    Virtual Switch Manager
    Create an External Virtual Switch
    Rename it "External Switch"
    Select my WIRELESS adapter
    Allow management operating system to share this network adapter
    Enable (have tried both disabled and enabled) VLAN Ident.
    Hit Okay

    Select VM (Elementary OS (would any other distro give me different results?) or Pear OS atm)
    Right click > Settings
    Change Network Adapter to newly created Switch
    Enable VLAN (if not already enabled)
    Hit Okay
    Start VM

    Check connections
    Only thing that shows is Wired Connection 1.
    No internet connection
    Close VM
    Delete the switch and close Hyper-V with frustration written over face.

    What am I doing wrong? Or what can I do to get a connection?

    • Mr_CJ
      Mr_CJ over 10 years
      So: blog.credera.com/technology-insights/microsoft-solutions/… this worked for Pear-OS, but not Elementary, will check with Ubuntu :)
    • joeqwerty
      joeqwerty over 10 years
      I can't answer your question directly but I can say that if you're doing this on a home network then it's highly doubtful that you need to configure the virtual switch or the VM for a VLAN.
  • GETah
    GETah over 8 years
    This fixed all my problems! Thank you for saving me hours of diagnositcs
  • schoon
    schoon about 5 years
    A million other answers on the net don't work. This does for win10 and Ub18. Vin you hero!
  • chnging
    chnging over 3 years
    great answer, very simple, worked on me on Ubuntu as well