A virtual machine uses a computer or host’s internet network to connect to the web. If a virtual machine is created and configured correctly, you should have active internet, albeit the specific type of network connection can vary. But what if it has no internet?
However, virtual machine managers, software, or workstations offer configurable network settings, so there is room for error.
1. Check Network Settings and Enable the Correct Adapter
Before you check your virtual machine’s network settings, verify if your computer or the host has an active internet connection.
After you confirm that, shut down your virtual machine and open the VM manager or workstation.
The exact path to network settings and subsequent options may be a tad different based on the software you have.
Still, the conceptual approach is the same for most virtual machines, irrespective of your operating system.
Here are the steps to check the network settings:
- With the virtual machine turned off, open the VM manager or workstation from the base computer or host. You may have only one or a few virtual machines on the same system. Select the virtual machine that doesn’t have an active internet connection.
- Click on settings to access the virtual network configuration. A VM using switches has a Virtual Network Switch Manager to set up the internet connection and other related properties. However, even switches use the network adapter of your computer or host.
- Enable the network adapter or virtual switch, and select the right one if you have two or more. A virtual machine will likely have at least one network adapter or virtual switch if it’s configured correctly. Otherwise, you must add an adapter or a switch.
- Ensure you select the right network adapter, depending on the one you have on the base computer. Some virtual machine managers or workstations do not offer you a choice if you select the NAT mode because it will only use the default network adapter.
Suppose your virtual machine didn’t have an enabled network adapter or switch. The above steps should fix the no internet issue in such a case.
But if a VM network adapter or switch is already enabled, you may have to check the type of connection and other settings.
Plus, you can change network adapters or switches if you have more than one to check whether or not a different connection works for your virtual machine’s internet.
You may also remove and add a virtual network adapter before enabling it to fix any existing glitches in the configuration.
Go to steps 4 and 5 to change the network connection type and advanced settings.
Otherwise, continue with the following steps to work on network adapters and virtual switches.
2. Remove, Add, and Enable a Virtual Network Adapter
Depending on the system you have, you will find network adapters in your virtual machine library or its equivalent.
You can go to the settings menu from the library and then removable devices to remove a network adapter. The removal option is usually in the advanced settings.
Similarly, you can add a network adapter using the virtual machine library settings. Look for the add device option and select the network adapter.
These paths may vary among VM software, and you’ll need a different approach to change the network adapter on a remote virtual machine.
You must have the remote virtual machine turned on and access its host server with the login credentials.
Here are the steps:
- Go to File and then Connect to Server. Enter the host server’s name or select it from the available drop-down options. Use your login credentials to connect.
- Go to Virtual Machine – Settings – Network Adapter. Choose a network adapter from the drop-down menu based on your preferred connection.
- Review the virtual network configuration, including the connection and advanced options. These properties vary for different virtual machines and host environments.
3. Create and Enable a New Virtual Switch for Your VM
Some virtual machine managers have network switches instead of adapters, but both serve the same purpose.
A virtual network switch shares the computer or host machine’s internet with the VM you have on the system.
Here are the steps to create and enable a new virtual switch:
- Turn off your virtual machine and open the VM manager.
- Select the virtual machine you want to create a switch for.
- Look for the Virtual Switch Manager option on the right pane.
- Click on the option and select New Virtual Switch to create one.
- Name the switch and choose External Network as its connection type.
- Select the network adapter or card of your computer or VM’s host.
- Check the box for Allow OS to share the network or something similar.
- Click Apply and select OK to save your VM’s virtual network switch.
You will probably get a pop-up notification alerting you of the changes.
Click on Yes to proceed. If you select the right adapter for the virtual network switch as an external connection, your VM should have active internet at this stage.
Otherwise, you may have an issue with the network.
Check your computer’s network and internet settings to ensure that you select the correct adapter for the new switch.
This step isn’t necessary if your system has only one adapter in the drop-down menu for the computer’s or host’s active internet connection.
4. Switch the Type of Network Connection: Bridged or NAT
Suppose your virtual machine’s network adapter is currently using the NAT or Network Address Translation mode.
With the network adapter enabled, you should change this connection type to bridged. Some VM managers or workstations show this connection type as a bridged adapter.
Don’t use the host-only adapter and private network modes. Similarly, if the virtual machine uses a switch, it should be configured as an external network. You shouldn’t select the private mode.
In some cases, a virtual machine’s internet may not work using NAT networking, so the bridged adapter mode might fix this problem.
But such an issue doesn’t imply that a virtual machine has a glitch. The problem in these instances is usually the host network or that of your computer.
5. Modify the VM’s Advanced Network Settings As Required
When you choose and enable a network adapter or virtual switch for your VM, you will need to check the following basic settings:
- Connect at power on.
- Connection type, etc.
Ensure all such checkboxes are ticked, and you have the right type of network connection for the selected adapter.
After that, you should check and modify the advanced network settings as necessary.
Some of the advanced network settings you may find are the following:
- Adapter type.
- Cable connected.
- MAC address.
- Promiscuous mode.
You can verify the adapter type to ensure it is accurate for the network.
The default adapter type selected when you confirm the basic settings should be fine unless a computer or host has two or more internet connections.
The cable connected option is typically a checkbox, similar to ‘allow the operating system to share the network’ or ‘replicate physical network connection state’ in VM managers.
Tick the cable-connected checkbox, and choose ‘allow all’ for the promiscuous mode if there’s one.
Virtual machines don’t have identical advanced settings, so you should check what is available in your manager or workstation to make appropriate changes according to the environment.
The same norm applies to assigning a MAC address.
Most VM managers or workstations can assign unique MAC addresses automatically when you turn on a virtual machine.
However, you may want to assign a MAC address for a particular VM, in which case you’ll need to generate one using the virtual machine software.
Also, you must know the MAC address of the internet connection of your base computer or host system to generate a unique ID.
You can get your MAC address through the network or internet settings. MAC is generally listed as a physical address in network connection details.
Furthermore, some virtual machines may prompt you to allow the VM to be discoverable on the network.
You may or may not permit this based on the type of network you are using. A home or work network shouldn’t be an issue. Don’t make a VM discoverable on a public network.
6. Restore Default Settings for Your Virtual Machine Network
The 5 steps I’ve listed until now should fix a virtual machine with no internet.
However, the configurations might be a bit complicated if any VM has plenty of network settings with several changes over time. You can consider restoring the default network settings for such a virtual machine.
The exact process of restoring the default settings will vary, but most virtual machines should be turned off before you make any such changes.
Depending on your VM manager or workstation, you must look for the virtual network editor that lists all the configurations and settings.
In most VM managers or workstations, you will find a Restore Defaults option once you access the list of virtual networks, including adapters or switches and other properties, such as the type of connection, etc.
Grant admin access and restore the default virtual machine network settings.
You may also restore default settings if or when you think one of your virtual network changes is why the VM does not have an active internet connection.
Restoring the settings may not work if you have a new virtual machine whose default config can’t access the internet.
7. Reboot the Host and Turn On the Virtual Machine to Test
Once you have completed one or several of the troubleshooting steps 1 through 6, turn on the virtual machine and check if you can use the internet.
Rebooting the computer or host machine isn’t necessary. However, you may choose to do so if you change any computer or host settings.
You should see the virtual machine’s network icon showing its connected status, not the red cross or the lack of an active internet connection.
Pinging isn’t necessary. Open a browser, enter a website address, and verify that you have fixed the no internet issue on your virtual machine.
8. Review Your Antivirus Settings and Firewall Configuration
Your antivirus and firewall settings may prevent a virtual machine from accessing the host computer’s internet.
None of the above remedies may work in such instances unless you change the antivirus settings or firewall configuration. VM users may have to review both in some cases.
A virtual machine shares the base computer or host’s network. The antivirus and firewall should allow network access and sharing.
The exact configuration or setting for your antivirus or firewall may vary, so check both to ensure the virtual machine isn’t blocked from accessing the internet.
If you use a virtual private network (VPN), check whether or not the VM’s internet connection is being encrypted and routed like the host’s online activities and interactions.
Bridged connections require you to set up a new VPN for the virtual machine to secure its online communications.
9. Download and Reinstall Your Virtual Machine Workstation
An older version of a virtual machine manager or workstation may have bugs or glitches, so it is not above suspicion when a VM has no internet.
You can uninstall the manager, download the latest workstation, and install the software. The latest firmware’s default settings may work fine.
10. Uninstall and Reinstall the Virtual Machine Tools and Drivers
Consider uninstalling and reinstalling the virtual machine tools if nothing else works. The tools usually include the network adapter drivers.
Generally, virtual machines and networks don’t use conventional drivers. However, some VMs may require you to update your network adapter drivers.