virtual-machine releases use virtualisation.incus.package to find
where the agent-loader configuration is defined. In practice it's
likely not a problem, but when marking lts v6 on 25.11 as vulnerable
it exposed the mismatch. For correctness we should ensure the VM
tests are using the agent loader from the relevant incus package.
The cloneConfig module can prevent the incus-create-nixos-config.service from
running because it will already have generated a configuration.nix.
Also modifies the test to hopefully catch that.
Fixes 0f363a1cb4
With the addition of test driver machines based on systemd-nspawn, the
`Machine` class was superseded by an abstract base class `BaseMachine`
and a subclass `QemuMachine` for conventional QEMU-based test nodes.
This commit fixes the usage of the `Machine` class in type annotations
across our tests. It also makes the tests use the more specific
`machines_qemu` variable if QEMU-specific features are required from the
machines. (`machines` provides only the methods shared by both
`NspawnMachine` and `Qemumachine`.)
Add subtests to verify the activation script replacements:
- config create service creates /etc/nixos/configuration.nix on first boot
- service does not overwrite existing configuration (ConditionPathExists)
- switch-to-configuration switch calls installBootLoader, creating /sbin/init
(container-only, since VMs use a real bootloader)
Added extra option to enable unprivileged containers. This includes a
patch to remove the hard-coded path to `lxc-user-nic` and a new security
wrapper to set SUID to `lxc-user-nic`.
This is a feature supported out of the box by upstream and allows the
incusd service to be restarted without impacting running
instances. While this does give up a bit of reproducibility, qemu and
lxc for example, there are clear benefits in allowing the host to
apply updates without impacting instances.
Modeled after the zabbly implementation: 2a67c3e260/systemd/incus-startup.service
This will now be the default.
Was previously broken due to a missing runtime dependency.
> Error: Failed to start device "vtpm": Failed to validate environment: Required tool 'swtpm' is missing