network config for host-guest

From: Steven Friedrich <freebsdlouisville_at_gmail.com>
Date: Thu, 11 May 2023 00:20:48 UTC
I am struggling to understand how to configure the host and guest.

I keep reading the vm man page, but it's not clear to me.  It said I 
should add an ip adx to my switch (public).  So here is the output from 
ifconfig on my host:

re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 
mtu 1500
  options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
     ether 10:62:e5:02:ef:45
     inet 192.168.2.9 netmask 0xffffff00 broadcast 192.168.2.255
     media: Ethernet autoselect (1000baseT <full-duplex>)
     status: active
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
     inet6 ::1 prefixlen 128
     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
     inet 127.0.0.1 netmask 0xff000000
     groups: lo
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 
mtu 1500
     ether 56:5f:80:13:f3:f6
     inet 192.168.2.250 netmask 0xffffff00 broadcast 192.168.2.255
     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 4 priority 128 path cost 2000000
     member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
             ifmaxaddr 0 port 1 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/freebsd13/0/public
     options=80000<LINKSTATE>
     ether 58:9c:fc:10:ff:bb
     groups: tap vm-port
     media: Ethernet autoselect
     status: active
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
     Opened by PID 76386

So my vm-public has adx 192.168.2.250

then I connect to the vm with: vm connect freebsd13

the bsdinstall is running, asking me if I want to install, want a shell, 
or live

I select shell, and invoke ifconfig.

But vtnet0 doesn't have an ip adx.  What am I doing wrong?

-- 
FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64