Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2018 13:42:08 -0700
From:      freebsd-questions@umpquanet.com
To:        freebsd-questions@freebsd.org
Subject:   vm-bhyve Windows 10 Pro guest has no network connectivity
Message-ID:  <20180831204208.GA75930@g5.umpquanet.com>

Next in thread | Raw E-Mail | Index | Archive | Help
I have Googled a lot of hits for this problem, but so far I haven't seen
a case that matches my scenario.

I have a FreeBSD 11.2-STABLE system running vm-bhyve-1.2.3 with neither
firewalling nor NAT in use.

The primary symptom that I'm seeing is that the Windows guest sees no
internet connectivity through the virtual Ethernet interface.  The
Windows DHCP client is not able to obtain an IP, even though there is
DHCP service available on the host's bge0 public interface.  If I
manually configure an IP on the Windows host that is from the same
subnet as the bhyve host, then I *can* ping IPs on the physical host
(there are two, one primary and one jail IP).  But I cannot ping any
hosts on the subnet, including the LAN gateway IP.

Some configuration information follows.  Please let me know if I can
provide more.

Thank you!

Jim


# uname -a
FreeBSD myhost.example.com 11.2-STABLE FreeBSD 11.2-STABLE #0 r335674: Tue Jun 26 13:20:24 PDT 2018     root@mydesk.example.com:/usr/obj/usr/src/sys/GENERIC  amd64

# kldstat
Id Refs Address            Size     Name
 1   26 0xffffffff80200000 2036ee8  kernel
 2    1 0xffffffff82238000 259e0    geom_mirror.ko
 3    1 0xffffffff8225e000 381130   zfs.ko
 4    2 0xffffffff825e0000 a380     opensolaris.ko
 5    1 0xffffffff825eb000 e568     if_bridge.ko
 6    2 0xffffffff825fa000 6d28     bridgestp.ko
 7    1 0xffffffff82601000 7600     if_tap.ko
 8    1 0xffffffff82609000 2988     nmdm.ko
 9    1 0xffffffff8260c000 356928   vmm.ko
10    1 0xffffffff82a21000 2328     ums.ko

# grep ^gateway /etc/rc.conf; sysctl net.inet.ip.forwarding
gateway_enable="yes"
net.inet.ip.forwarding: 1

# vm list
NAME   DATASTORE  LOADER  CPU  MEMORY  VNC           AUTOSTART  STATE
win10  default    uefi    2    2G      0.0.0.0:5900  No         Running (6053)

# vm info win10
------------------------
Virtual Machine: win10
------------------------
  state: running (6053)
  datastore: default
  loader: none
  uuid: e1399325-ad4b-11e8-befb-1866daab8c4e
  uefi: yes
  cpu: 2
  memory: 2G
  memory-resident: 2155712512 (2.007G)

  console-ports
    com1: /dev/nmdm-win10.1B
    vnc: 0.0.0.0:5900

  network-interface
    number: 0
    emulation: virtio-net
    virtual-switch: public
    fixed-mac-address: 58:9c:fc:00:20:78
    fixed-device: -
    active-device: tap0
    desc: vmnet-win10-0-public
    mtu: 1500
    bridge: vm-public
    bytes-in: 0 (0.000B)
    bytes-out: 9184 (8.968K)

  virtual-disk
    number: 0
    device-type: file
    emulation: ahci-hd
    options: -
    system-path: /bhyve/win10/disk0.img
    bytes-size: 21474836480 (20.000G)
    bytes-used: 6185743360 (5.760G)

# vm switch info
------------------------
Virtual Switch: public
------------------------
  type: standard
  ident: vm-public
  vlan: -
  physical-ports: bge0
  bytes-in: 15640835 (14.916M)
  bytes-out: 882841459 (841.943M)

  virtual-port
    device: tap0
    vm: win10

# ifconfig -l
bge0 bge1 bge2 bge3 lo0 vm-public tap0

# for IF in bge0 vm-public tap0; do ifconfig $IF; done
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c0099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether 18:66:da:ab:8c:4e
        hwaddr 18:66:da:ab:8c:4e
        inet 10.160.161.94 netmask 0xffffff00 broadcast 10.160.161.255 
        inet 10.160.161.26 netmask 0xffffffff broadcast 10.160.161.26 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 56:58:34:98:7a:aa
        nd6 options=1<PERFORMNUD>
        groups: bridge vm-switch viid-4c918@ 
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 6 priority 128 path cost 2000000
        member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: vmnet-win10-0-public
        options=80000<LINKSTATE>
        ether 00:bd:d2:ac:42:00
        hwaddr 00:bd:d2:ac:42:00
        inet6 fe80::2bd:d2ff:feac:4200%tap0 prefixlen 64 tentative scopeid 0x6 
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        groups: tap vm-port 
        Opened by PID 6053

# netstat -4rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            10.160.161.1       UGS        bge0
127.0.0.1          link#5             UH          lo0
10.160.161.0/24    link#1             U          bge0
10.160.161.26      link#1             UHS         lo0
10.160.161.26/32   link#1             U          bge0
10.160.161.94      link#1             UHS         lo0
10.160.161.96      link#6             UHS         lo0




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20180831204208.GA75930>