aboutsummaryrefslogtreecommitdiffstats
path: root/host.nix
Commit message (Collapse)AuthorAgeFilesLines
* let the guests' dnsmasq be their DNS resolver tootv10 days1-11/+13
| | | | | | It forwards to the servers in the host's resolv.conf and listens only on fcbr0, so it doesn't get in the way of a resolver on the host's loopback. The service is renamed from fcbr0-dhcp to fcbr0-dnsmasq.
* use the host's DNS resolvertv10 days1-2/+3
| | | | | The guest's resolv.conf and the DHCP server now point at 172.16.0.1, so the host's resolver has to answer there.
* get guest addresses via DHCP, one tap device per VMtv10 days1-7/+41
| | | | | | | | | | host.nix now makes a bridge fcbr0 with a number of tap devices (default 8) and runs a dnsmasq of its own for DHCP. The run script takes the first tap device it can lock and derives the guest MAC from its number. The guest uses DHCP, with the MAC as client identifier, as the machine-id (and thus the default DUID) is the same in every VM. host.nix now takes { user, taps ? 8 } instead of just the user.
* add networkingtv11 days1-0/+15
Give the guest a virtio-net interface backed by the host tap device fctap0, with a static address (172.16.0.2/24, gateway 172.16.0.1) set up by systemd-networkd, and 9.9.9.9 as nameserver. host.nix is a NixOS module for the host that creates fctap0, owned by the given user, and NATs it: imports = [ (import ./host.nix "tv") ]; Firecracker refuses to start if fctap0 doesn't exist.