Skip to content

Instantly share code, notes, and snippets.

@erhangundogan
Last active July 6, 2025 20:28
Show Gist options
  • Save erhangundogan/898b793117e0b4abb1a0d9ff39e75f96 to your computer and use it in GitHub Desktop.
Save erhangundogan/898b793117e0b4abb1a0d9ff39e75f96 to your computer and use it in GitHub Desktop.
Incus

Incus

https://linuxcontainers.org/incus

Start

incus admin init

Some base lists

incus profile list
incus cluster list
incus network list
incus remote list
incus image list

Import

$ incus image list images: | more

Or specifically Alpine for arm64 (MacOS)

$ incus image list images:alpine arm64

Add existing network interface

$ incus network attach-profile vlanbr0 default

Download from remote

$ incus image copy images:4c307beb1d38 local:

Set password for alpine root

$ incus exec ruling-treefrog -- sh -c 'passwd'
# add user
$ lxc exec apache1 -- sudo --user ubuntu --login

Launch instance

# Alpine image
$ incus launch local:4c307beb1d38 --debug --console
# ubuntu vm
$ incus launch ubuntu:24.04 my-vm --vm
# ubuntu container
$ incus launch ubuntu:24.04 my-container

Storage

$ incus storage list
$ incus storage volume list local
# enlarge vm volume
$ incus config device override test-vm root size=20GiB
# Restart
$ incus restart test-vm
# We can create additional storage volumes in the default storage pool
$ incus storage volume create default mydisk size=10GB --type=block
# Attach new volume to the test-vm
$ incus storage volume attach default mydisk test-vm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment