-1

I'm unable to ping my guest VM from my host.

  • Host: Win7
  • VirtualBox 5.2.6
  • Guest: CentOS 7

On VB I have my guest CentOS 7 network configured with 2 adapters.

  • Adapter 1 Attached to NAT
  • Adapter 2 Attached to Host-only Adapter (VirtualBox Host-Only Ethernet Adapter)

enter image description here

On CentOS 7

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:e3:8c:8f brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 84885sec preferred_lft 84885sec
    inet6 fe80::db4c:7b23:6a34:d832/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:0b:4f:5d brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 52:54:00:99:20:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
    link/ether 52:54:00:99:20:1b brd ff:ff:ff:ff:ff:ff

I think the virbr0 192.168.122.1 is weird. I would have expected 192.168.56.XXX.

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=d36ec069-6fa5-429f-a89b-debf35c2346e
DEVICE=enp0s3
ONBOOT=yes

On my host Win 7 I ping 192.168.122.1 and get a connection timeout. Does anyone know what I'm missing?

1

Disable the firewall on one or both the host and guest machine. Also, switch the guest to Bridged Adapter.

  • This did not work. Guest (CentOS) iptables configured to accept anything. I don't have permission to disable the firewall on host (Win) but I don't believe that's the issue. Ubuntu on the same host and VirtualBox works fine. – AR3Y35 Mar 22 '18 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.