Can not get ip address for connecting VM to add to OS

Do not seem to have an ip address when trying to connect VM to Windows OS (demo - connecting vm to windows at 1 minute mark). Please see print screens

Print screen when trying to connect VM ip address to OS pdf.pdf (396.8 KB)

Check the steps below and try again:

By default that Network Card is configured to use NAT . ( communicate to the internet )

What you can do is to add a Second Network Card which will be configured as HOST-ONLY + configure host only network. (to be able to communicate with your mac)

A. To create host only network go to that HIGHLIGHTED network and create vmboxnet0

B. Then you need to enable second network interface and point it to just created host only network vmboxnet0 .

C. Reboot Ubuntu and second interface will get IP address assigned.

D. After reboot check for that new IP address (ifconfig) and ssh to it. Don’t use root at first.

Thanks for reply, but not really understanding at all.
Have 0 IT knowledge so following lab instructions very carefully. Can you explain in detail similar to the way the lab is described? Are you able to provide instructions from the time point given on the video, at around the 1 min mark. Also, using Windows and not MAC. Please provide as soon as possible so that I can continue on. thank you

I’m facing the same issue, did you get a solution for this?

did but not clear at all. still have not yet received any clarification. Let me know if you get anywhere with it. thanks

having same issue how can i fix this

Is this still an issue?

Hi All,

I had the same issue of not having the IP address visible with my Guest OS centOS after running "ifconfig " command in my Guest machine.

Went to the Virtual Box main console. Select File menu–> Host Network Manager and then clicked CREATE. This created a new Adapter. After creation make sure the newly created adapter is Enabled with Checkbox ticked.

Then went to the CentOS VM settings and selected NETWORK Option.

Now the Adapter 2 Option got Enabled where I selected “HOST only Adapter” and in name selected the enabled Adapter from the previous settings.

Please make sure your VM machine is shut down during all this and then start the machine once all setting done.

Run “Ifconfig” again in the terminal and now was able to see the Ip.

If you selected multiple adapter maybe by mistake you’ll see multiple ip assigned to the VM but any of that Ip can then be used to SSH into the VM with putty or any other terminal software for specific OS.

I hope this help!

Thanks!
VJ

Hi all,

I am facing the same issue. I tried the steps mentioned by @cloudarchitectvj but its not working. May be due to the fact that when I am adding Host network Manager it is giving “Failed to save DHCP server parameter”.

Kindly suggest a way forward.issue_Screenshot.pdf (228.3 KB)

@samiran
Not sure if you got it running, but I managed to read some documentation on enabling a driver. On the Virtual machine, in the terminal type nm-connection-editor. On the Network Connections screen, select your ethernet connection, click the settings icon (gear).


Go to the General tab and select connect automatically with priority.
Click Save in the lower right. Restart the VM.
At that point I was able to see the IP address for the ethernet connection.

Hi,

By default the internet connection is not enabled.

In a terminal launch this command to edit a config file:

sudo nano /etc/sysconfig/network-scripts/ifcfg-enp0s3

add 3 lines:

DNS2=8.8.4.4

DNS1=8.8.8.8

ONBOOT=yes

Save the file. My file modified:

[osboxes@osboxes network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s3

TYPE=Ethernet

PROXY_METHOD=none

BROWSER_ONLY=no

BOOTPROTO=dhcp

DEFROUTE=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_FAILURE_FATAL=no

IPV6_ADDR_GEN_MODE=stable-privacy

NAME=enp0s3

UUID=dc27e3b5-edf1-42fb-a811-a46ca21c6fe9

DEVICE=enp0s3

DNS2=8.8.4.4

DNS1=8.8.8.8

ONBOOT=yes

Restart the VM.

Hi Team!

I have followed whatever you suggested above but unfortunately I was not able to resolve it.
I have edited sudo nano /etc/sysconfig/network-scripts/ifcfg-enp0s3 and added three mentioned lines in “ifcfg-enp0s3” file.
Then checked the file with “cat” command, I could able to see only those three lines. not as you shown above.

Please help me on this, let me know correct way to approach it.

Hi, pls what do you mean by HIGHLITED network?

Hi @KodeKloud I’ve tried every option listed above. But none of them seem to work.
However, when I tried to configure an IP address, it showed up and when I powered the machine off and tried to connect again, it was gone.

Please do help