Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2023 18:21:36 -0300
From:      Jonas Lopes <jonasbsd@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   Lost connection using bhyve + netmap/VALE
Message-ID:  <CAFuq9EyQd0m6kzRrjvqhpydCOVanMTqo1-OO2A9W2KVLoHLc7g@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--0000000000002fdbf705f89d61d5
Content-Type: text/plain; charset="UTF-8"

Hello everybody.

I had a lot of problems with the vm-bhyve NAT network on 14-CURRENT. That's
why I looked for alternatives and took the opportunity to study Netgraph,
netmap/VALE with bhyve(8).

However, I think I found other bugs. When I virtualize Windows using bhyve
with TAP, the system works perfectly.

bhyve -c 2 -m 4G -w -H \
> -s 0, hostbridge \
> -s 2,nvme,/vm/windows/disk0.img \
> -s 5,virtio-net,tap0 \
> -s 29,fbuf,tcp=0.0.0.0:5900,w=1280,h=720,no \
> -s 30,xhci,tablet \
> -s 31,lpc -l com1,stdio \
> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> Windows
>

But when I virtualize Windows using bhyve with netmap/VALE, at some point
the laptop loses connectivity. I am completely without a network. Within
VALE connectivity continues, but everything else loses connectivity.
Including the internet.

-s 5,virtio-net,vale0:windows \


If I restart wlan0's network service, the computer freezes. If I delete the
VALE connection with wlan0, after the PC loses connectivity, it crashes too.

In a moment I follow the steps below:

- 1. After some time away from the PC, there is a disconnection with the
> WiFi network. It looks like it's connected, but it doesn't work;
>
> - 2. I enter the command: service netif restart wlan0
>
> - 3. The network works again;
>
> - 4. When I delete a VALE network that was connected to wlan0 before
> disconnecting the network, FreeBSD freezes;
>

I've tested it several times, and the same thing happens.

FreeBSD version:

% uname -a
> FreeBSD mithrandir 14.0-CURRENT FreeBSD 14.0-CURRENT #5
> main-n261959-cfccc7f30a01: Mon Apr  3 07:57:49 -03 2023     root@mithrandir:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
> amd64
>

Some details:

- I don't have another network card. I'm on Ideapad s145. It does not have
a cable network card.
- In a moment it crashes completely. In another it freezes, but I notice
that the keyboard is still working. I go to another tty even without an
image, I enter with the root user and reboot. It works!
- I tested it with a USB/Network and so far it only crashed 1 time. Unlike
WiFi, which freezes a few minutes (sometimes hours) after creating the VALE
connections with the virtual machine.

-- 
Jonas Lopes <jonasbsd gmail.com>

--0000000000002fdbf705f89d61d5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello everybody.<br><br>I had a lot of problems with the v=
m-bhyve NAT network on 14-CURRENT. That&#39;s why I looked for alternatives=
 and took the opportunity to study Netgraph, netmap/VALE with bhyve(8).<br>=
<br>However, I think I found other bugs. When I virtualize Windows using bh=
yve with TAP, the system works perfectly.<br><br><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex">bhyve -c 2 -m 4G -w -H \<br>-s 0, hostbridge \<br>-=
s 2,nvme,/vm/windows/disk0.img \<br>-s 5,virtio-net,tap0 \<br>-s 29,fbuf,tc=
p=3D<a href=3D"http://0.0.0.0:5900" target=3D"_blank">0.0.0.0:5900</a>,w=3D=
1280,h=3D720,no \<br>-s 30,xhci,tablet \<br>-s 31,lpc -l com1,stdio \<br>-l=
 bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \<br>Windows<br></blo=
ckquote><br>But when I virtualize Windows using bhyve with netmap/VALE, at =
some point the laptop loses connectivity. I am completely without a network=
. Within VALE connectivity continues, but everything else loses connectivit=
y. Including the internet.<br clear=3D"all"><div><br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">-s 5,virtio-net,vale0:windows \</blockquo=
te><div><br></div><div>If I restart wlan0&#39;s network service, the comput=
er freezes. If I delete the VALE connection with wlan0, after the PC loses =
connectivity, it crashes too.</div><div><br></div><div>In a moment I follow=
 the steps below:<br><br><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
- 1. After some time away from the PC, there is a disconnection with the Wi=
Fi network. It looks like it&#39;s connected, but it doesn&#39;t work;<br><=
br>- 2. I enter the command: service netif restart wlan0<br><br>- 3. The ne=
twork works again;<br><br>- 4. When I delete a VALE network that was connec=
ted to wlan0 before disconnecting the network, FreeBSD freezes;<br></blockq=
uote></div><div><br></div><div>I&#39;ve tested it several times, and the sa=
me thing happens.</div><div><br></div><div>FreeBSD version:</div><div><br><=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex"><div>% uname -a<br>F=
reeBSD mithrandir 14.0-CURRENT FreeBSD 14.0-CURRENT #5 main-n261959-cfccc7f=
30a01: Mon Apr =C2=A03 07:57:49 -03 2023 =C2=A0 =C2=A0 root@mithrandir:/usr=
/obj/usr/src/amd64.amd64/sys/GENERIC amd64</div></blockquote><div><br></div=
><div>Some details:<br><br>- I don&#39;t have another network card. I&#39;m=
 on Ideapad s145. It does not have a cable network card.<br>- In a moment i=
t crashes completely. In another it freezes, but I notice that the keyboard=
 is still working. I go to another tty even without an image, I enter with =
the root user and reboot. It works!</div><div>- I tested it with a USB/Netw=
ork and so far it only crashed 1 time. Unlike WiFi, which freezes a few min=
utes (sometimes hours) after creating the VALE connections with the virtual=
 machine.</div><div><br></div><span>-- </span><br><div dir=3D"ltr" data-sma=
rtmail=3D"gmail_signature"><div dir=3D"ltr"><div>Jonas Lopes &lt;jonasbsd <=
a href=3D"http://gmail.com" target=3D"_blank">gmail.com</a>&gt;</div></div>=
</div></div>

--0000000000002fdbf705f89d61d5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFuq9EyQd0m6kzRrjvqhpydCOVanMTqo1-OO2A9W2KVLoHLc7g>