### Start IncusOS Installation in VM Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-incus.md Starts the IncusOS virtual machine to begin the installation process. After a brief delay for Secure Boot key enrollment, it attaches to the VM's VGA console for interaction. ```bash incus start IncusOS incus console IncusOS --type=vga ``` -------------------------------- ### Start IncusOS VM for First Boot Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-incus.md Starts the IncusOS virtual machine, automatically attaching to its VGA console for the first boot configuration process. ```bash incus start IncusOS --console=vga ``` -------------------------------- ### Start migrated instances and verify status Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-import-unencrypted-incus-pool.md Start all instances that have been migrated to the new encrypted storage pool and then list them to verify they are running correctly. This confirms the successful completion of the storage migration. ```bash gibmat@futurfusion:~$ for instance in $(incus list --columns n --format compact,noheader); do incus start $instance; done gibmat@futurfusion:~$ incus list +-------------+---------+-----------------------+------------------------------------------------+-----------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +-------------+---------+-----------------------+------------------------------------------------+-----------------+-----------+ | debian13 | RUNNING | 10.119.172.82 (eth0) | fd42:d040:6b43:6e18:1266:6aff:fe87:2cc (eth0) | CONTAINER | 0 | +-------------+---------+-----------------------+------------------------------------------------+-----------------+-----------+ | debian13-vm | RUNNING | 10.119.172.185 (eth0) | fd42:d040:6b43:6e18:1266:6aff:fe63:ab3c (eth0) | VIRTUAL-MACHINE | 0 | +-------------+---------+-----------------------+------------------------------------------------+-----------------+-----------+ ``` -------------------------------- ### Install Flasher Tool Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/download.md Install the IncusOS flasher tool using Go. This tool is for advanced users needing to customize the install seed beyond what the web customizer offers. ```bash go install github.com/lxc/incus-os/incus-osd/cmd/flasher-tool@latest flasher-tool ``` -------------------------------- ### IncusOS Installation Seed with Certificate Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/download_incusos.md Example of an IncusOS installation seed configuration. This YAML snippet includes a client certificate that will be trusted by Incus during installation. Substitute the placeholder certificate with your actual certificate. ```yaml apply_defaults: true preseed: certificates: - name: demo type: client certificate: | -----BEGIN CERTIFICATE----- MIIB4TCCAWagAwIBAgIQVrBNb+LgEvX/aDNNOLM2iTAKBggqhkjOPQQDAzA4MRkw FwYDVQQKExBMaW51eCBDb250YWluZXJzMRswGQYDVQQDDBJnaWJtYXRAZnV0dXJm dXNpb24wHhcNMjUwNjA1MTgwODAwWhcNMzUwNjAzMTgwODAwWjA4MRkwFwYDVQQK ExBMaW51eCBDb250YWluZXJzMRswGQYDVQQDDBJnaWJtYXRAZnV0dXJmdXNpb24w djAQBgcqhkjOPQIBBgUrgQQAIgNiAAS8Tsj87gyhkR6gUoTa9dooWhwApI9MlsZS M9HkNdgLG+0d2yU3JXru4AbCD+pslsL5mnSjbmF7BhqSAT0opQtyFMfB7hrCJkVB nnebLNOqzrOVnxYqnD1HnfKo6RVmXpGjNTAzMA4GA1UdDwEB/wQEAwIFoDATBgNV HSUEDDAKBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMAoGCCqGSM49BAMDA2kAMGYC MQC/Y4nAuV09z/zeh0aN+XV+kI9WLnITFprSHREIaES3r49cTkpoV8wFCwdLjbSb NwECMQCx5H/H3hyXJen3uLbqRxTzw5jjx1M4dO4fru+VmoOKmTSmKVq3r2j449iD GrzY7EQ= -----END CERTIFICATE----- ``` -------------------------------- ### IncusOS Install Seed with Certificate Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/download.md Example of an IncusOS install seed configuration that includes a client certificate. This is used to trust your certificate during installation. ```yaml apply_defaults: true preseed: certificates: - name: demo type: client certificate: | -----BEGIN CERTIFICATE----- MIIB4TCCAWagAwIBAgIQVrBNb+LgEvX/aDNNOLM2iTAKBggqhkjOPQQDAzA4MRkw FwYDVQQKExBMaW51eCBDb250YWluZXJzMRswGQYDVQQDDBJnaWJtYXRAZnV0dXJm dXNpb24wHhcNMjUwNjA1MTgwODAwWhcNMzUwNjAzMTgwODAwWjA4MRkwFwYDVQQK ExBMaW51eCBDb250YWluZXJzMRswGQYDVQQDDBJnaWJtYXRAZnV0dXJmdXNpb24w djAQBgcqhkjOPQIBBgUrgQQAIgNiAAS8Tsj87gyhkR6gUoTa9dooWhwApI9MlsZS M9HkNdgLG+0d2yU3JXru4AbCD+pslsL5mnSjbmF7BhqSAT0opQtyFMfB7hrCJkVB nnebLNOqzrOVnxYqnD1HnfKo6RVmXpGjNTAzMA4GA1UdDwEB/wQEAwIFoDATBgNV HSUEDDAKBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMAoGCCqGSM49BAMDA2kAMGYC MQC/Y4nAuV09z/zeh0aN+XV+kI9WLnITFprSHREIaES3r49cTkpoV8wFCwdLjbSb NwECMQCx5H/H3hyXJen3uLbqRxTzw5jjx1M4dO4fru+VmoOKmTSmKVq3r2j449iD GrzY7EQ= -----END CERTIFICATE----- ``` -------------------------------- ### Install Debug Application Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Install the 'debug' application within the IncusOS virtual machine to access debugging tools like 'nano'. This is done by sending a POST request to the applications endpoint via the Unix socket. ```bash incus exec test-incus-os bash curl --unix-socket /run/incus-os/unix.socket socket/1.0/applications -X POST -d '{"name": "debug"}' ``` -------------------------------- ### Install a non-primary application Source: https://github.com/lxc/incus-os/blob/main/doc/reference/applications/non-primary.md Installs a non-primary application on an IncusOS system. Replace '' with the desired application's name. ```bash incus admin os application add -d '{"name":""}' ``` -------------------------------- ### Show System Resources Source: https://github.com/lxc/incus-os/blob/main/doc/reference/system/resources.md Run this command to get a detailed low-level dump of information about the IncusOS system hardware. There are no configuration options for this read-only system information. ```bash incus admin os system resources show ``` -------------------------------- ### Create IncusOS VM with virt-install Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-libvirt.md Use virt-install to create a new virtual machine for IncusOS. Ensure to configure RAM, vCPUs, disk size, and attach the ISO image for installation. The TPM and UEFI firmware settings are crucial for IncusOS. ```bash virt-install -n IncusOS \ --os-variant=debian13 \ --ram=4096 \ --vcpus=1 \ --disk path=/var/lib/libvirt/images/IncusOS.qcow2,bus=sata,size=50 \ --cdrom /home/gibmat/Downloads/IncusOS_202511070055.iso \ --tpm backend.type=emulator,backend.version=2.0,model=tpm-crb \ --boot loader=/usr/share/OVMF/OVMF_CODE_4M.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/OVMF/OVMF_VARS_4M.fd ``` -------------------------------- ### Get Incus Client Certificate Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/download.md Run this command to obtain your client certificate, which is necessary for trusted IncusOS installations. ```bash incus remote get-client-certificate ``` -------------------------------- ### Complete IncusOS Installation and Cleanup VM Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-incus.md Stops the IncusOS virtual machine after installation is complete and removes the boot media (ISO) device. This prepares the VM for its first boot using its installed system drive. ```bash incus stop IncusOS incus config device remove IncusOS boot-media ``` -------------------------------- ### Initialize a new Incus cluster Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/incus-cluster.md Configure the first server for cluster communication, enable clustering, and set up a new remote for the cluster. This is done after the initial IncusOS setup and adding the server as a remote. ```bash incus config set server1: cluster.https_address=10.0.0.10:8443 incus cluster enable server1: server1 incus remote add my-cluster 10.0.0.10:8443 incus remote remove server1 ``` -------------------------------- ### Eject CDROM and reset VM after installation Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-libvirt.md Once the IncusOS installation is complete, eject the CDROM device from the virtual machine and reset it to boot from the installed system. ```bash virsh change-media IncusOS sdb --eject virsh reset IncusOS ``` -------------------------------- ### Switching Incus Release Tracks Source: https://github.com/lxc/incus-os/blob/main/doc/reference/applications/incus.md This command allows switching the installed Incus release track. Ensure the desired application name is correctly specified. ```bash incus admin os application add -d '{"name":""}' ``` -------------------------------- ### Re-attach CDROM and reset VM for installation Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-libvirt.md After the initial reboot of the virtual machine, the CDROM may be detached. Use virsh to re-attach the installation ISO and reset the VM to begin the IncusOS installation process. ```bash virsh attach-disk IncusOS /home/gibmat/Downloads/IncusOS_202511070055.iso sdb --type=cdrom virsh reset IncusOS ``` -------------------------------- ### Perform IncusOS Factory Reset with Options Source: https://github.com/lxc/incus-os/blob/main/doc/reference/system/backup.md Perform a factory reset with specific configuration options. This example allows TPM reset failures, wipes existing seed data, and configures Incus application defaults upon reboot. ```bash incus admin os system factory-reset -d '{"allow_tpm_reset_failure":true,"wipe_existing_seeds":true,"seeds":{"incus":{"apply_defaults":true}}}' ``` -------------------------------- ### Import Storage Pool with Encryption Key Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-expand-local-pool.md Use this command to import the 'local' storage pool and supply its encryption key. This is necessary after a fresh IncusOS installation to regain access to the encrypted data. ```bash incus admin os system storage import-storage-pool -d '{"name":"local","type":"zfs","encryption_key":"QWJKYnRLGfyhj+OevRfgkdE6MW6PgAqR57tTi+8T+qA="}' ``` -------------------------------- ### Launch instances with different network configurations Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-direct-attach.md Demonstrates launching two instances: one using the default NATed network and another directly attached to the host's physical network ('enp5s0'). ```bash gibmat@futurfusion:~$ incus launch images:debian/13 debian-nat Launching debian-nat gibmat@futurfusion:~$ incus launch images:debian/13 debian-direct --network enp5s0 Launching debian-direct ``` -------------------------------- ### Create and Configure IncusOS Virtual Machine Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-incus.md Initializes an empty virtual machine named 'IncusOS' with specified CPU, memory, and disk size. It also configures Secure Boot, adds a TPM device, and attaches the ISO as a bootable media. ```bash incus init --empty --vm IncusOS \ -c security.secureboot=false \ -c limits.cpu=1 \ -c limits.memory=4GiB \ -d root,size=50GiB incus config device add IncusOS vtpm tpm incus config device add IncusOS boot-media disk pool=default source=IncusOS_202511050158.iso boot.priority=10 ``` -------------------------------- ### Accessing IncusOS API Source: https://github.com/lxc/incus-os/blob/main/doc/reference/api.md The IncusOS API is typically accessed via an installed application like Incus. For manual interaction, prefix endpoints with `/os/`. This example shows how to list applications. ```APIDOC ## GET /os/1.0/applications ### Description Retrieves a list of applications available on the IncusOS system. ### Method GET ### Endpoint /os/1.0/applications ### Request Example ```bash curl https://1.2.3.4:8443/os/1.0/applications ``` ### Response #### Success Response (200) - **applications** (array) - A list of application objects. ``` -------------------------------- ### Prepare Memory Filesystem for Custom Binary Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Prepare a memory file system within the IncusOS virtual machine to allow side-loading a custom `incus-osd` binary, as direct execution from the root disk is not permitted. ```bash incus exec test-incus-os -- mkdir -p /root/dev/ incus exec test-incus-os -- mount -t tmpfs tmpfs /root/dev/ ``` -------------------------------- ### Launch Instance on VLAN Network Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-vlan-tagging.md Launch a new instance and assign it to the newly created VLAN network. This ensures the instance will communicate over the specified VLAN. ```bash gibmat@futurfusion:~$ incus launch images:debian/13 debian --network enp5s0.1234 ``` -------------------------------- ### Build and Deploy Custom Incus-OSD Binary Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Build a custom `incus-osd` binary and deploy it into the IncusOS virtual machine by pushing it to the prepared memory file system and binding it to the system's binary path. This process can be repeated after each build. ```bash cd ./incus-osd/ go build ./cmd/incus-osd/ incus exec test-incus-os -- umount -l /usr/local/bin/incus-osd || true incus exec test-incus-os -- rm -f /root/dev/incus-osd incus file push ./incus-osd test-incus-os/root/dev/ incus exec test-incus-os -- mount -o bind /root/dev/incus-osd /usr/local/bin/incus-osd incus exec test-incus-os -- pkill -9 incus-osd ``` -------------------------------- ### Build Raw Incus OS Image Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Build a raw image of Incus OS from the root of the repository. The output is suitable for writing to a USB stick and will be located in the `mkosi.output/` directory. ```bash make ``` -------------------------------- ### Compress Build Artifacts and Create Zip Archive Source: https://github.com/lxc/incus-os/blob/main/incus-osd/cmd/image-publisher/README.md Navigates into the mkosi.output directory, determines the release version from .efi files, compresses all files with gzip, and creates a zip archive named image--amd64.zip. ```bash pushd ./mkosi.output export RELEASE=$(ls *.efi | tr -dc '0-9') find -maxdepth 1 -type f | xargs gzip zip ../image-${RELEASE}-amd64.zip *.gz popd ``` -------------------------------- ### Stop All Incus Instances Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-import-unencrypted-incus-pool.md Ensure all instances are stopped before powering down the system for IncusOS installation or migration. This prevents data corruption. ```bash for instance in $(incus list --columns n --format compact,noheader); do incus stop $instance; done ``` -------------------------------- ### Get Incus Debug Logs Source: https://github.com/lxc/incus-os/blob/main/doc/reference/applications/incus.md This command retrieves a tarball of Incus logs for debugging purposes. The output is redirected to a file named logs.tar.gz. ```bash incus admin os application debug incus -d '{"action": "get-logs"}' > logs.tar.gz ``` -------------------------------- ### Prepare Rescue-Mode Virtual Disk Source: https://github.com/lxc/incus-os/blob/main/incus-osd/cmd/image-publisher/README.md Prepares a rescue-mode virtual disk image. It copies the release directory, truncates an image file to 4GiB, partitions it for rescue data, formats it with FAT, and copies files into it. Finally, it adds the created update.img as a disk device to a virtual machine. ```bash cp -r ./mirror/${RELEASE} ./update/ truncate --size 4GiB update.img /sbin/sgdisk -n 1 -c 1:RESCUE_DATA ./update.img /sbin/mkfs.vfat -S 512 --offset=2048 ./update.img mcopy -s -i ./update.img@@1048576 update :: incus config device add update disk source=$(pwd)/update.img ``` -------------------------------- ### Publish Local Build with Signed Metadata Source: https://github.com/lxc/incus-os/blob/main/incus-osd/cmd/image-publisher/README.md Publishes the local build by syncing the mirror directory with the created zip archive. The JSON metadata is signed using local development keys and certificates specified by SIG_KEY, SIG_CERTIFICATE, and SIG_CHAIN environment variables. ```bash SIG_KEY=./certs/cas/root-E1.key SIG_CERTIFICATE=./incus-osd/certs/files/root-E1.crt SIG_CHAIN=./incus-osd/certs/files/secureboot-DB-1-R1.crt ./incus-osd/image-publisher sync ./mirror/ ./image-${RELEASE}-amd64.zip ``` -------------------------------- ### Create application backup Source: https://github.com/lxc/incus-os/blob/main/doc/reference/applications/shared-api.md Create a backup of an IncusOS application, including its state and configuration. Set 'complete' to true for a full backup including cached artifacts. ```bash incus admin os application backup archive.tar.gz -d '{"complete":false}' ``` -------------------------------- ### Commit Sign-off Example Source: https://github.com/lxc/incus-os/blob/main/CONTRIBUTING.md Use this format for the sign-off line at the end of your commit message. Ensure you use your real name and a valid email address. ```text Signed-off-by: Random J Developer ``` -------------------------------- ### List Incus Storage Pools Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-import-unencrypted-incus-pool.md View the current Incus storage pools to identify the pool used by your instances. This helps confirm the setup before proceeding. ```bash incus storage list ``` -------------------------------- ### Show Service State and Configuration Source: https://github.com/lxc/incus-os/blob/main/doc/reference/services/shared-api.md Use this command to retrieve the current state and configuration of a specific IncusOS service. ```bash incus admin os service show ``` -------------------------------- ### Show IncusOS System Storage State Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-import-unencrypted-incus-pool.md Displays the current configuration and state of storage devices and pools within IncusOS. This is useful for verifying existing setups before making changes. ```bash gibmat@futurfusion:~$ incus admin os system storage show WARNING: The IncusOS API and configuration is subject to change config: {} state: drives: - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk1 model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk1 - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk2 model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk2 - boot: true bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root member_pool: local model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_root pools: - devices: - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root-part11 encryption_key_status: available name: local pool_allocated_space_in_bytes: 4.288512e+06 raw_pool_size_in_bytes: 1.7716740096e+10 state: ONLINE type: zfs-raid0 usable_pool_size_in_bytes: 1.7716740096e+10 volumes: - name: incus quota_in_bytes: 0 usage_in_bytes: 2.768896e+06 use: '-' ``` -------------------------------- ### Regenerate Development Secure Boot Certificates Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md If your development Secure Boot certificates become corrupted, you can regenerate them by removing the existing certificate directories and running this command. This is typically a one-time setup. ```bash rm -rf ./certs/ ./incus-osd/certs/files/ make generate-test-certs ``` -------------------------------- ### List Instances with IP Addresses Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-vlan-tagging.md Check the status and IP addresses of running instances. The instance launched on the VLAN network will have an IP address assigned from that network's range. ```bash gibmat@futurfusion:~$ incus list ``` -------------------------------- ### Generate Manifests for the Build Source: https://github.com/lxc/incus-os/blob/main/incus-osd/cmd/image-publisher/README.md Creates an upload directory and generates JSON manifests for the build using the provided script. The generated JSON files are then moved to the mkosi.output directory. ```bash mkdir upload/ ./incus-osd/generate-manifests . mv upload/*.json mkosi.output/ ``` -------------------------------- ### Launch an instance on IncusOS Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/access.md Launch a new instance (e.g., a Debian Trixie container) on the remote IncusOS system. This command assumes the 'images' remote is already configured. ```bash $ incus launch images:debian/trixie IncusOS:trixie Launching trixie ``` -------------------------------- ### Add additional servers to an Incus cluster Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/incus-cluster.md Join a new server to an existing Incus cluster, remove the server-specific remote, and list the cluster members. Ensure the additional server is installed without default Incus settings. ```bash incus cluster join my-cluster: server2: incus remote remove server2 incus cluster list my-cluster: ``` -------------------------------- ### Build Incus OS ISO Image Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Build an ISO image of Incus OS, which can be used to boot from a CD-ROM device. This command is an alternative to the default raw image build. ```bash make build-iso ``` -------------------------------- ### Convert IncusOS USB Image to VHDX for Hyper-V Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-hyperv.md Use this command to convert the downloaded IncusOS USB (IMG) install image to a VHDX format compatible with Microsoft Hyper-V. Ensure the filename matches your downloaded image. ```bash qemu-img convert IncusOS_202512302047.img -O vhdx -o subformat=dynamic IncusOS_202512302047.vhdx ``` -------------------------------- ### Create a managed network using a physical interface Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-direct-attach.md Create a managed Incus network that uses a host's physical interface as its parent. This is a prerequisite for direct instance attachment. ```bash gibmat@futurfusion:~$ incus network create enp5s0 parent=enp5s0 --type=physical ``` -------------------------------- ### Decrypt and Mount IncusOS Root Partition Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/emergency-procedure-lost-client-certificate.md Use cryptsetup to open the LUKS-encrypted IncusOS root partition and mount it to a temporary directory. Ensure the device path and mount point are adjusted for your system. ```bash cryptsetup luksOpen /dev/sda10 sda10_crypt mkdir -p /mnt/incusos/ mount /dev/mapper/sda10_crypt /mnt/incusos/ ``` -------------------------------- ### Edit IncusOS storage pool configuration Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-preparing-volume-incus.md Use `incus admin os system storage edit` to add a new storage pool configuration. This example creates a ZFS RAID0 pool named 'my-pool' using a specified device. ```yaml config: pools: - name: my-pool type: zfs-raid0 devices: - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk1 ``` -------------------------------- ### Show initial storage state Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-expand-local-pool.md Displays the current storage configuration, including drives and pools. Useful for understanding the system's state before making changes. ```bash gibmat@futurfusion:~$ incus admin os system storage show WARNING: The IncusOS API and configuration is subject to change config: {} state: drives: - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk1 model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk1 - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk2 model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk2 - boot: true bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root member_pool: local model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_root pools: - devices: - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root-part11 encryption_key_status: available name: local pool_allocated_space_in_bytes: 4.3008e+06 raw_pool_size_in_bytes: 1.7716740096e+10 state: ONLINE type: zfs-raid0 usable_pool_size_in_bytes: 1.7716740096e+10 ``` -------------------------------- ### Create and delete volumes within a storage pool Source: https://github.com/lxc/incus-os/blob/main/doc/reference/system/storage.md Manage volumes within a storage pool by creating or deleting them. Volumes are defined by their name, quota, and usage type. IncusOS automatically creates an 'incus' volume for the 'local' pool during setup. ```bash incus admin os system storage create-volume -d '{"pool":"local","name":"my-volume","use":"linstor"}' ``` ```bash incus admin os system storage delete-volume -d '{"pool":"local","name":"my-volume"}' ``` -------------------------------- ### Import IncusOS ISO Image to Incus Storage Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/virtual-incus.md Import the IncusOS ISO image into Incus' default storage pool. Ensure the ISO file path is correct. ```bash incus storage volume import default Downloads/IncusOS_202511050158.iso IncusOS_202511050158.iso --type=iso ``` -------------------------------- ### Test Incus OS in Incus VM Source: https://github.com/lxc/incus-os/blob/main/doc/contributing.md Test a locally built raw image of Incus OS by running it within an Incus virtual machine. This is the recommended testing method. ```bash make test ``` -------------------------------- ### Create IncusOS System Backup Source: https://github.com/lxc/incus-os/blob/main/doc/reference/system/backup.md Create a system-level backup of the IncusOS configuration and state. The backup file should be stored securely as it contains encryption keys. ```bash incus admin os system backup backup.tar.gz ``` -------------------------------- ### Set default network for instances Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-direct-attach.md Configure the default network interface for all instances to use a specific host network interface. ```bash gibmat@futurfusion:~$ incus profile device set default eth0 network=enp5s0 ``` -------------------------------- ### Show IncusOS storage with new volume Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-preparing-volume-incus.md Verify the creation of the storage volume 'my-volume' by displaying the updated IncusOS storage configuration. The output shows the volume details within 'my-pool'. ```text gibmat@futurfusion:~$ incus admin os system storage show WARNING: The IncusOS API and configuration is subject to change [snip] state: pools: - devices: - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk1 encryption_key_status: available name: my-pool pool_allocated_space_in_bytes: 1.04448e+06 raw_pool_size_in_bytes: 5.3150220288e+10 state: ONLINE type: zfs-raid0 usable_pool_size_in_bytes: 5.3150220288e+10 volumes: - name: my-volume quota_in_bytes: 0 usage_in_bytes: 196608 use: incus ``` -------------------------------- ### Add IncusOS volume to Incus storage pool Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-preparing-volume-incus.md Make the prepared IncusOS storage volume available to Incus by creating a new Incus storage pool that sources the volume. This command uses the `incus storage create` command. ```bash gibmat@futurfusion:~$ incus storage create incusos-volume zfs source=my-pool/my-volume Storage pool incusos-volume created ``` -------------------------------- ### List Incus networks after adding 'instances' role Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-direct-attach.md Verify that a new unmanaged bridge has appeared after assigning the 'instances' role to a network interface. ```bash gibmat@futurfusion:~$ incus network list +----------+--------+---------+----------------+---------------------------+----------------------------+---------+---------+ | NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY | STATE | +----------+--------+---------+----------------+---------------------------+----------------------------+---------+---------+ | enp5s0 | bridge | NO | | | | 0 | | +----------+--------+---------+----------------+---------------------------+----------------------------+---------+---------+ | incusbr0 | bridge | YES | 10.89.179.1/24 | fd42:e1a1:408f:710a::1/64 | Local network bridge (NAT) | 1 | CREATED | +----------+--------+---------+----------------+---------------------------+----------------------------+---------+---------+ ``` -------------------------------- ### List all Incus instances Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/access.md List all running instances on the IncusOS system, including their IP addresses and network interfaces. ```bash $ incus list +---------------+---------+------------------------+--------------------------------------------------+-----------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +---------------+---------+------------------------+--------------------------------------------------+-----------------+-----------+ | test-incus-os | RUNNING | 10.25.170.1 (incusbr0) | fd42:612d:f700:5f6e::1 (incusbr0) | VIRTUAL-MACHINE | 0 | | | | 192.0.2.100 (enp5s0) | fd42:3cfb:8972:3990:1266:6aff:feab:9439 (enp5s0) | | | +---------------+---------+------------------------+--------------------------------------------------+-----------------+-----------+ $ incus list IncusOS: +--------+---------+----------------------+------------------------------------------------+-----------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +--------+---------+----------------------+------------------------------------------------+-----------+-----------+ | trixie | RUNNING | 10.25.170.218 (eth0) | fd42:612d:f700:5f6e:1266:6aff:fe39:d31f (eth0) | CONTAINER | 0 | +--------+---------+----------------------+------------------------------------------------+-----------+-----------+ ``` -------------------------------- ### Write IncusOS Image to Disk Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/installation/cloud-scaleway.md Use this command to write the downloaded IncusOS image to the server's primary disk (/dev/sda). Ensure the image file name is correct. ```bash cat IncusOS_202603311955.img > /dev/sda ``` -------------------------------- ### List Incus remotes Source: https://github.com/lxc/incus-os/blob/main/doc/getting-started/access.md Verify that the IncusOS system has been successfully added as a remote server by listing all Incus remotes. ```bash $ incus remote list +-----------------+------------------------------------+---------------+-------------+--------+--------+--------+ | NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC | GLOBAL | +-----------------+------------------------------------+---------------+-------------+--------+--------+--------+ | IncusOS | https://192.0.2.100:8443 | incus | tls | NO | NO | NO | +-----------------+------------------------------------+---------------+-------------+--------+--------+--------+ | images | https://images.linuxcontainers.org | simplestreams | none | YES | NO | NO | +-----------------+------------------------------------+---------------+-------------+--------+--------+--------+ | local (current) | unix:// | incus | file access | NO | YES | NO | +-----------------+------------------------------------+---------------+-------------+--------+--------+--------+ ``` -------------------------------- ### Show Storage Configuration After Drive Replacement Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/storage-expand-local-pool.md Verify the storage configuration after replacing a failed drive. This output shows the updated device list for the 'local' RAID1 pool. ```bash gibmat@futurfusion:~$ incus admin os system storage show WARNING: The IncusOS API and configuration is subject to change config: {} state: drives: - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk1 model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk1 - boot: false bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk2 member_pool: local model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_disk2 - boot: true bus: scsi capacity_in_bytes: 5.36870912e+10 id: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root member_pool: local model_family: QEMU model_name: QEMU HARDDISK remote: false removable: false serial_number: incus_root pools: - devices: - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_disk2-part11 - /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_incus_root-part11 encryption_key_status: available name: local pool_allocated_space_in_bytes: 4.460544e+06 raw_pool_size_in_bytes: 1.7716740096e+10 state: ONLINE type: zfs-raid1 usable_pool_size_in_bytes: 1.7716740096e+10 ``` -------------------------------- ### Configure WireGuard interface with peers Source: https://github.com/lxc/incus-os/blob/main/doc/reference/system/network.md Configure a WireGuard interface with a specified port, private key, IP addresses, routes, and two peers. Providing a private_key is optional and will be generated if empty. ```yaml config: wireguard: - name: "wg0" port: 51820 private_key: "AE1SCwtkp8ruDYlUa9x9wsoTzEOePl3P9sMdFFa9PmI=" addresses: - "10.234.234.100/24" - "fd42:3cfb:8972:abcd::100/64" routes: - to: "10.234.110.0/24" via: "10.234.234.110" peers: - allowed_ips: - "10.234.234.110/24" - "fd42:3cfb:8972:abcd::110/64" - "10.234.110.0/24" endpoint: "10.102.89.110:51820" public_key: "rJhRcAtHUldTAA/J+TPQPQpr6G9C2Arf5FiTVwjOYCE=" - allowed_ips: - "10.234.234.120/24" - "fd42:3cfb:8972:abcd::120/64" persistent_keepalive: 30 public_key: "qPYSgwaJe0VZb4M8smTPpd2rfKHz0X0ypq54ZY4ATVQ=" ``` -------------------------------- ### Show IncusOS system network configuration Source: https://github.com/lxc/incus-os/blob/main/doc/tutorials/network-direct-attach.md Retrieve the current IncusOS network configuration, detailing interfaces and their roles. ```bash gibmat@futurfusion:~$ incus admin os system network show WARNING: The IncusOS API and configuration is subject to change config: interfaces: - addresses: - dhcp4 - slaac hwaddr: 10:66:6a:1f:50:b7 lldp: false name: enp5s0 required_for_online: "no" state: interfaces: enp5s0: addresses: - 10.234.136.193 - fd42:3cfb:8972:3990:1266:6aff:fe1f:50b7 hwaddr: 10:66:6a:1f:50:b7 mtu: 1500 roles: - management - cluster routes: - to: default via: 10.234.136.1 speed: "-1" state: routable stats: rx_bytes: 60644 rx_errors: 0 tx_bytes: 113337 tx_errors: 0 type: interface ```