astro / microvm.nix

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

No Internet by Systemd-resolve. #25

Closed GTrunSec closed 2 years ago

GTrunSec commented 2 years ago

Could you confirm whether the tap in the example of the microvm.nix has internet access? I can sure this problem is caused by DNS of the systemd-resolve.

How do we solve it by systemd-resolve.service?

GTrunSec commented 2 years ago

This issue was due to the namespace of my host

GTrunSec commented 2 years ago

The attached hosts still have no network.

astro commented 2 years ago

~Please describe your networking setup in more detail. Do you bridge to a DHCP with public IP addresses, or did you setup NAT?~

~I am fine with giving usable defaults as long as they can be overriden for custom deployments.~

Ah, the example! Let me have a look...

astro commented 2 years ago

The example does not provide external network access. The virbr0 bridge is only local inside the example VM, connecting the MicroVMs.

An option that always works would be using qemu's user interfaces.

What's the rationale behind having that in the example? An example shouldn't include too much so that lines of code are fewer in my opinion.

GTrunSec commented 2 years ago

This question is about virtual machine networking-related issues, it shouldn't open an issue. Thanks for you reply