[Solved] Cannot ping guest from host

Discussions about using Linux guests in VirtualBox.

[Solved] Cannot ping guest from host

Postby PeterOEM » 26. Apr 2019, 14:05

Hi.

I am trying to setup a virtual machine running Linux on my Windows PC. My ultimate goal is to use GameMaker 2 to create arcade style games and run them on a banana pi board, so I can develop and build arcade machinces as a project with my high school students. But before I can do that, I need an Ubuntu device to compile the games into files that Linux can run on the banana pi board. I wish to use VirtualBox as my Ubuntu device.

I'm new to virtual machines and Linux, so I'm a bit out of my depth here. I have installed VirtualBox and installed Ubuntu 18.04. It seems to be working, and I am connected to the internet on the guest when using NAT network. But I cannot pint it from my host.

I've tried the following:
  • Changing NAT network to bridge on the VM (this messes up the internet connection on the VM).
  • Changing NAT network to Only Hosted Networks. I cannot find any Networks in VirtualBox > File > Settings > Network. Also messes up the internet on the VM.
  • Changing my Ubuntu guest to static IP, since I read somewhere that the three first parts of the IP address has to be the same on the host and guest. Every time I try to change to static IP, I lose internet connection on the VM.
    Ifconfig on virtual machine says:
    inet 10.0.2.15 netmas 255.255.255.0 broadcast 10.0.2.255
    Ipconfig on host says:
    IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
I am worried that the problem might be because I'm on a work computer, and the IT department has put some sort of restriction on it.

Thanks,
Peter
Last edited by socratis on 27. Apr 2019, 11:07, edited 2 times in total.
Reason: Fixed formatting.
PeterOEM
 
Posts: 2
Joined: 26. Apr 2019, 14:00

Re: Cannot ping guest from host

Postby andyp73 » 26. Apr 2019, 14:40

If you configure your Ubuntu guest with bridged networking and it has the DHCP client enabled then you should get a 192.168.56.x IP address from the network DHCP server as the guest looks just like any other computer on the network. This is probably the route that you will need to go down if you also want to access the Banana PI on the same network.

There are a couple of potential issues with this - firstly, bridging to a wireless device doesn't always work, secondly, if there are any proxy settings needed on the host they will also be needed in the guest.

Can you configure the guest as bridged and post the output of the command "ifconfig -a" or "ip addr show" whichever your flavour of Ubuntu supports.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
andyp73
Volunteer
 
Posts: 1642
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Cannot ping guest from host

Postby PeterOEM » 26. Apr 2019, 22:15

andyp73 wrote:If you configure your Ubuntu guest with bridged networking and it has the DHCP client enabled then you should get a 192.168.56.x IP address from the network DHCP server as the guest looks just like any other computer on the network. This is probably the route that you will need to go down if you also want to access the Banana PI on the same network.


Thanks, Andy. Changing to bridged networking WITHOUT touching anything else did the trick.

I thought I had already tried that, but I must have touched something else as well :)
PeterOEM
 
Posts: 2
Joined: 26. Apr 2019, 14:00

Re: Cannot ping guest from host

Postby socratis » 27. Apr 2019, 11:07

Marked as [Solved].
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 26108
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 6 guests