Incus: Difference between revisions
imported>Offlinehacker No edit summary |
imported>Offlinehacker No edit summary |
||
Line 53: | Line 53: | ||
</pre> | </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. | 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. If for some reason instance does not get an IP, it's most likely issue with firewalld and you need to add <tt>incusbr0</tt> to allowed firewall zone. | ||
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]. |