Incus: Difference between revisions
imported>Offlinehacker No edit summary |
imported>Offlinehacker No edit summary |
||
Line 39: | Line 39: | ||
<tt>security.nesting=true</tt> is needed for nix to work correctly. | <tt>security.nesting=true</tt> is needed for nix to work correctly. | ||
Your new instance should be running: | |||
<pre> | |||
$ incus list | |||
+-------+---------+----------------------+-----------------------------------------------+-----------+-----------+ | |||
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | | |||
+-------+---------+----------------------+-----------------------------------------------+-----------+-----------+ | |||
| nixos | RUNNING | 10.227.60.142 (eth0) | fd42:49ed:2bf3:f0ad:216:3eff:fe73:47bd (eth0) | CONTAINER | 0 | | |||
+-------+---------+----------------------+-----------------------------------------------+-----------+-----------+ | |||
$ incus exec nixos -- bash | |||
</pre> | |||
After that you can run a root shell inside container using <tt>incus exec nixos -- bash</tt>. From there you probably want to add a new user and use ssh to connect via the IP that you can find using <tt>incus list</tt> command. | |||
Image is built using linuxcontainers CI job [https://jenkins.linuxcontainers.org/job/image-nixos/], the source of which can be found here [https://github.com/lxc/lxc-ci/blob/main/jenkins/jobs/image-nixos.yaml]. As we can see jenkins CI job downloads <tt>lxdVirtualMachineImage</tt> derivation produced by hydra, which produces qcow2 image file. Configuration for nixos image can be found here [https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix]. | Image is built using linuxcontainers CI job [https://jenkins.linuxcontainers.org/job/image-nixos/], the source of which can be found here [https://github.com/lxc/lxc-ci/blob/main/jenkins/jobs/image-nixos.yaml]. As we can see jenkins CI job downloads <tt>lxdVirtualMachineImage</tt> derivation produced by hydra, which produces qcow2 image file. Configuration for nixos image can be found here [https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix]. |