fixing the host only IP address - confusion enp0s3 and enp08s

Discussions about using Linux guests in VirtualBox.
Post Reply
arifsyeduk
Posts: 2
Joined: 22. Jan 2018, 11:21

fixing the host only IP address - confusion enp0s3 and enp08s

Post by arifsyeduk »

Hi,
I know there are hundreds of articles all over the place on this, but I seem to be stuck in getting my head around one thing.

My Host --> Windows 7 laptop
Oracle Virtual Box --> current version 5.2.6
My Guest --> current Centos 7

It's all actually installed and runs ok, I can connect to the internet from the Guest and also connect from my Host to the Guest via PuTTy.

Confusion starts here.

On initial build of the Guest
- created a NAT and set this up to start automatically, which sets the ONBOOT=yes in the /etc/sysconfig/network-scripts/enp03s file.
- the IP address seems to be 10.0.2.15 when I do a ifconfig or ip add from the terminal.
- was able to connect to the internet

Next step created a Host Only Adapter in VirtualBox for the Guest (Adapter 2)
- started up the Guest
- ifconfig showed an additional entry against enp08s with an I.P of 192.168.56.101
- using PuTTy on My Host I could connect to the Guest

All fine so far
Now most articles, when the talk about fixing the IP address (making it Static) for the Host Only Adapter, talk about the enp03s config file. This is where I'm confused, as this was attached to the NAT Adapter. If I make these changes then the 10.0.2.15 just changes to something I decide like 192.168.56.140, and that is what will show up against ifconfig for enp03s.

I want to fixed the 192.168.56.101 IP address. So in the instance of having 2 Guest, I always know the IP of each one when they need to communicate to each other and also from the Host. I'm assuming that the 2 Guests would talk on IPs like 192.168.56.101 and .102 etc.

What am I missing or completely misunderstanding ?

Thanks in advance for any insight on this !
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: fixing the host only IP address - confusion enp0s3 and enp08s

Post by socratis »

You have a Windows Host and a Linux Guest, not a "Linux Host" (where you posted). Moving to "Linux Guests".

Why do you care what the scripts say? Maybe the script has only the HostOnly adapter, or it may have the HostOnly as it's first, not its second adapter. It could be named "arctic84", why do you care? Change the HostOnly adapter and follow the spirit of the script...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
arifsyeduk
Posts: 2
Joined: 22. Jan 2018, 11:21

Re: fixing the host only IP address - confusion enp0s3 and enp08s

Post by arifsyeduk »

Not quite sure what your trying to explain here. I'm not sure which file (script) to change. Which one is driving the 192.168.56.101 IP address. I was expecting a file like ifcfg-enp08s which would correspond to the output of ifconfig..
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: fixing the host only IP address - confusion enp0s3 and enp08s

Post by socratis »

I'm not sure what script you refer to either. And not necessarily that I want to know. All I'm saying is that whatever instructions you're reading, you should adjust accordingly, don't get "stuck" at en*. Be flexible... Follow the spirit of the instructions, not the letter of the instructions.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply