astro / microvm.nix

NixOS MicroVMs
https://astro.github.io/microvm.nix/
MIT License
1.45k stars 103 forks source link

Documentation might have a wrong example command for creating tap interface #300

Closed vikanezrimaya closed 2 days ago

vikanezrimaya commented 2 days ago

Since microvm uses queues=4 when configuring the tap interface, this seems to require the multi_queue option to be set on the tap interface creation in the ip tuntap add command. Otherwise, running the MicroVM from shell will display:

$ result/bin/microvm-run
microvm@test: -netdev tap,id=microvm,ifname=microvm,script=no,downscript=no,queues=4: could not configure /dev/net/tun (microvm): Invalid argument

So, the full command should be:

$ ip tuntap add $NAME mode tap user $USER multi_queue
vikanezrimaya commented 2 days ago

Oh. Just saw that it says to add multi_queue if the VM adds more than one CPU core. I guess I'm too sleepy. Closing.