• Uncategorized

About linux : Host-cant-ping-VM-Guest

Question Detail

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)

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?

Question Answer

virbr0 is the virtual network adapter created by cent OS. This is created due to installation type you choose(workstation option). you should bring down this adapter. I believe enp0s3 is the host only adapter, currently No IP assigned to it. start enp0s3 to get connected.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.