# FreeBSD 13.0-RELEASE-p4 + bhyve + Windows 10



## cr4sh (Jun 3, 2022)

Hello. I have problem with local network/internet.
I have local network on hq0 (192.168.33.1/25) on this interface is dnsmasq


```
# ifconfig hq0
hq0: 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 50:9a:4c:74:00:f3
        inet 192.168.33.1 netmask 0xffffff80 broadcast 192.168.33.127
        inet 192.168.32.1 netmask 0xffffff00 broadcast 192.168.32.255
        inet 192.168.32.2 netmask 0xffffffff broadcast 192.168.32.2
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether aa:52:82:f6:fa:22
        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 9 priority 128 path cost 2000000
        member: hq0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 3 priority 128 path cost 20000
        groups: bridge vm-switch viid-4c918@
        nd6 options=9<PERFORMNUD,IFDISABLED>
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: vmnet-win10-0-public
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:47:79
        groups: tap vm-port
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 12103
```

Bhyve Win10 config

```
# cat win10.conf
guest="windows"
loader="uefi"
graphics="yes"
xhci_mouse="yes"
cpu=1
memory=6G

# put up to 8 disks on a single ahci controller.
# without this, adding a disk pushes the following network devices onto higher slot numbers,
# which causes windows to see them as a new interface
ahci_device_limit="8"

# ideally this should be changed to virtio-net and drivers installed in the guest
# e1000 works out-of-the-box
network0_type="virtio-net"
network0_switch="public"
network0_device="tap0"

disk0_type="ahci-hd"
disk0_name="disk0.img"

# windows expects the host to expose localtime by default, not UTC
utctime="no"
uuid="f69e6898-e356-11ec-884b-6805ca192734"
network0_mac="58:9c:fc:00:e9:41"
```
In Windows10 I have install drivers from 
	

			https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.118-2/virtio-win-0.1.118.iso
		


bhyve switch status

```
# vm switch list
NAME    TYPE      IFACE      ADDRESS  PRIVATE  MTU  VLAN  PORTS
public  standard  vm-public  -        no       -    -     hq0
[root@CERBER /vm/win10]# vm switch info
------------------------
Virtual Switch: public
------------------------
  type: standard
  ident: vm-public
  vlan: -
  physical-ports: hq0
  bytes-in: 5741572 (5.475M)
  bytes-out: 4809444703 (4.479G)

  virtual-port
    device: tap0
    vm: win10
```

Windows don't get IP from DHCP, and when I try to set IP static in Windows I can't ping 192.168.33.1

Best regards.


----------

