Page 1 of 1

Need troubleshooting help Win10 host, centos vm

Posted: 13. Sep 2020, 00:53
by rational_solution_man
Hello

I have windows 10 box on corporate laptop, I'm trying to get a centos virtual machine NAT network to work.

Successful resolution would be if I could ping google dot com from the virtual machine.

I have tried several searches on the internet and this website, have not found any help.

Host: Windows 10
Virtual Machine: centos,
- it boots and runs and I can log in with keyboard.
- On the networking settings inside virtualbox I chose NAT with defaults
- ping, nslookup etc don't work. ifconfig shows no network ip address assigned. Pinging any IP Address returns message: "Connect: Network is unreachable"


Things I have tried that didn't help
- I went into windows 10 firewall settings and allowed all the virtualbox dot exe files i could find through the firewall.
- tried running the virtualbox app as administrator

Noted: sentinelone, cyberark and possibly more corp security software is on this laptop

I'm interested in a troubleshooting help webpage or any tips or advice ya'll can share.

Please help if you can

Re: Need troubleshooting help Win10 host, centos vm

Posted: 13. Sep 2020, 15:15
by scottgus1
Let's see what network you've chosen. Please right-click the guest in the main Virtualbox window's guest list, choose Show in Explorer. Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.

Also look through Virtualbox Networks: In Pictures

Re: Need troubleshooting help Win10 host, centos vm

Posted: 14. Sep 2020, 04:11
by rational_solution_man
Here is my .vbox file.

Thanks so much for taking a look.

Re: Need troubleshooting help Win10 host, centos vm

Posted: 15. Sep 2020, 21:14
by scottgus1
You are using NAT:
<Network>
<Adapter slot="0" enabled="true" MACAddress="0800273D4E27" promiscuousModePolicy="AllowNetwork" type="82540EM">
<DisabledModes>
<BridgedInterface name="Intel(R) Ethernet Connection (7) I219-LM"/>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT/>
</Adapter>
</Network>
I spun up a CentOS 7 guest, with NAT, tried 'ip address' and got an enp0s3 with no IP address either. The CentOS guest I made was a text-only setup. I suspect that there are other configuration steps to get CentOS to ask for the card to request an IP address. Googling tells me this is true, you'll need to web-search how to enable network on CentOS: "centos set up network" got me onto some good info right away.

Re: Need troubleshooting help Win10 host, centos vm

Posted: 15. Sep 2020, 22:13
by rational_solution_man
thanks so much scottgus1

I just needed a little push to think about this as a centos problem instead of a virtualbox problem.

I have used virtualbox to set up dozens of virtual machines over the years and unlike CentOS, for every single one of them, the internet just worked perfectly the first time. So had never imagined that I needed to tell the operating system to enable the ethernet connection!

I searched and found some good how to setup a CentOS network at https://adam.younglogic.com/2017/08/ena ... t-centos7/

And I adapted those tips to my machine as:

Inquired the names and status of my network devices:

Code: Select all

$nmcli d
DEVICE TYPE STATE
enp0s3 ethernet disconnected

Inquired as to boot configuration of the network:

Code: Select all

$ grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-enp0s3
ONBOOT=no

Changed the boot configuration of the network:

Code: Select all

$sudo nmcli c mod enp0s3 connection.autoconnect yes
Verified that the above command changed the config file:

Code: Select all

$ grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-enp0s3
ONBOOT=yes

rebooted my centos virtual machine, network works, I can ping google, browse internet etc!

Success!

Re: Need troubleshooting help Win10 host, centos vm

Posted: 16. Sep 2020, 16:54
by scottgus1
Great! Glad you're up and running.