5

I have an Ubuntu VMWare virtual machine that stopped having an internet connection after a forced a shutdown.

Upon inspection there were no connections in the Network panel of Settings.

I found this previous superuser question: Ubuntu: Missing network interface and no UI and miraculously the one and only answer worked!

Only problem is that every time I boot the vm back up I have to do the whole procedure again.

Worth noting that I don't have an eth0 interface but I have one called ens33 and that's what I used for the commands.

Does anyone know what's going on or how I can just automate the procedure so that it runs every time I boot? (ugly solution, I know, but I spent hours researching and that answer is the only thing I found)

2 Answers 2

3

You want to modify the network configuration for this interface so it automatically comes up and runs dhcp.

I am not sure which network configuration strategy your linux is using; your answer depends on which of these files exists:

/etc/network/interfaces

Given Ubuntu, it's probably this strategy.

Put these two lines into the file if they are not present already, and remove other lines related to ens33:

auto ens33
iface ens33 inet dhcp

Note: If you see the line "source /etc/network/interfaces.d/*.cfg", you may also have a "/etc/network/interfaces.d/ens33.cfg" file. If you see this line in your interfaces file, it would be more appropriate to put your changes into the ens33.cfg file.

/etc/sysconfig/network-scripts/ifcfg-ens33.cfg

In the future most distributions should be shifting to this configuration strategy so I am putting it for future users. This should be the contents of the file, and probably nothing else.

DEVICE=ens33
BOOTPROTO=dhcp 
ONBOOT=yes

If you are still encountering issues, please post the contents of these files.

0
0

Restor configuration Virtual Network Editor to default.

This link helpme https://communities.vmware.com/t5/VMware-Workstation-Pro/No-more-network-in-VMs/td-p/2926219

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 6 at 17:39
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Destroy666
    Jun 6 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .