The host
nixosModule provides a few systemd services for additional
bringup which is not available when running a MicroVM interactively
from a package.
Creates and prepares a subdirectory under /var/lib/microvms
for
declarative MicroVMs according to the
microvm.vms
option.
If the MicroVM subdirectory under /var/lib/microvms
already exists,
and the MicroVM is configured to be built from a flake's
nixosConfigurations
, this systemd unit will be skipped. The reason
for this behavior is that it is easier to update with the microvm
command instead of restarting all virtual
machines on a host when doing nixos-rebuild switch
.
Creates TAP virtual network interfaces for the user that will run MicroVMs.
Creates MACVTAP virtual network interfaces for the user that will run MicroVMs.
Prepares PCI devices for passthrough (VFIO).
Starts a fleet of virtiofsd servers, one for each virtiofs
mountpoint in microvm.shares
.
Runs the actual MicroVM through
/var/lib/microvms/%i/current/bin/microvm-run
where %i
is the
MicroVM name.
Depends on the [email protected]
instance for all configured
microvm.autostart
.