Date: Fri, 5 May 2023 11:54:54 -0400 From: Steven Friedrich <freebsdlouisville@gmail.com> To: freebsd-questions@freebsd.org Subject: Can't figure out getting network into bhyve instance. Message-ID: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------YRWSDqQTJMcMLfXt2WB1TcZI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I had found a bhyve tutorial on the Internet: https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ I performed the steps to create vm_public, but I don't get internet inside the vm. Here's my ifconfig from the host side: re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> ether 10:62:e5:02:ef:45 inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.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 16:58:c1:2e:24:bc 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: 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> I tried to follow the man page vm: root@freebsd:/zroot/bhyve/.templates # vm switch add public re0 /usr/local/sbin/vm: ERROR: failed to add member re0 to the virtual switch public root@freebsd:/zroot/bhyve/.templates # vm switch create public /usr/local/sbin/vm: ERROR: switch public already exists So I tried ifconfig vm-public destroy so I could start fresh. vm-public no longer appears in ifconfig then I tried, from the vm man page: vm switch create public /usr/local/sbin/vm: ERROR: switch public already exists root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch add public re0 /usr/local/sbin/vm: ERROR: unable to locate switch id vm switch list NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS public standard - - no - - re0 root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch info local: _netgraph,: bad variable name ------------------------ Virtual Switch: public ------------------------ type: standard ident: - vlan: - physical-ports: re0 I'm uneducated in this area. Any suggestion? -- uname -a FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64 --------------YRWSDqQTJMcMLfXt2WB1TcZI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I had found a bhyve tutorial on the Internet: <a class="moz-txt-link-freetext" href="https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/">https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/</a></p> <p>I performed the steps to create vm_public, but I don't get internet inside the vm. Here's my ifconfig from the host side:</p> <p><span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 </span><br> options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> <br> ether 10:62:e5:02:ef:45 <br> inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255 <br> media: Ethernet autoselect (1000baseT <full-duplex>) <br> status: active <br> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> <br> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 <br> options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> <br> inet6 ::1 prefixlen 128 <br> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 <br> inet 127.0.0.1 netmask 0xff000000 <br> groups: lo <br> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> <br> vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 <br> ether 16:58:c1:2e:24:bc <br> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 <br> maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 <br> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 <br> member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> <br> ifmaxaddr 0 port 1 priority 128 path cost 20000 <br> groups: bridge vm-switch viid-4c918@ <br> nd6 options=9<PERFORMNUD,IFDISABLED> <br> </span></p> <p><span style="font-family:monospace">I tried to follow the man page vm:</span></p> <p><span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;"><a class="moz-txt-link-abbreviated" href="mailto:root@freebsd:/zroot/bhyve/.templates">root@freebsd:/zroot/bhyve/.templates</a> # vm switch add public re0 </span><br> /usr/local/sbin/vm: ERROR: failed to add member re0 to the virtual switch public <br> <a class="moz-txt-link-abbreviated" href="mailto:root@freebsd:/zroot/bhyve/.templates">root@freebsd:/zroot/bhyve/.templates</a> # vm switch create public <br> /usr/local/sbin/vm: ERROR: switch public already exists</span></p> <p><span style="font-family:monospace">So I tried ifconfig vm-public destroy so I could start fresh.</span></p> <p><span style="font-family:monospace">vm-public no longer appears in ifconfig</span></p> <p><span style="font-family:monospace">then I tried, from the vm man page:</span></p> <p><span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">vm switch create public </span><br> /usr/local/sbin/vm: ERROR: switch public already exists <br> root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch add public re0 <br> /usr/local/sbin/vm: ERROR: unable to locate switch id<br> <br> </span><span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">vm switch list </span><br> NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS <br> public standard - - no - - re0 <br> root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch info <br> local: _netgraph,: bad variable name <br> ------------------------ <br> Virtual Switch: public <br> ------------------------ <br> type: standard <br> ident: - <br> vlan: - <br> physical-ports: re0 <br> <br> <br> I'm uneducated in this area. Any suggestion?<br> </span><span style="font-family:monospace"></span><span style="font-family:monospace"></span><span style="font-family:monospace"></span></p> <pre class="moz-signature" cols="72">-- uname -a FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64</pre> </body> </html> --------------YRWSDqQTJMcMLfXt2WB1TcZI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42>