Get Started with Incus

Prerequisites:

Install Incus by following the instructions here:

Initializing Incus:

This has to be done only once, for most use cases, it's right after the install

This is the same as running the following:

With an Interactive Options list as follows:

Statement

Response

Would you like to use clustering? (yes/no) [default=no]:

no

Do you want to configure a new storage pool? (yes/no) [default=yes]:

yes

Name of the new storage pool [default=default]:

incus_stor_local

Where should this storage pool store its data? [default=/var/lib/incus/storage-pools/default]:

/var/lib/incus/storage-pools/default

Would you like to create a new local network bridge? (yes/no) [default=yes]:

yes

What should the new bridge be called? [default=incusbr0]:

incusbr0

What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:

auto

What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:

auto

Would you like the server to be available over the network? (yes/no) [default=no]:

no

Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:

yes

Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]:

no

Launching a Container

This command will download a barebones version of Ubuntu-22.04 from the default Incus Image Repository and create a container named container0.

Entering the Newly Created Container

The Images from the default incus image repository ship with ubuntu as a default user

The Short-Cut Login (Optional)

I get it, sometimes that login command looks way too tedious to type (I'm Lazy), so we can create an alias (a.k.a short-cut) to login easily using:

Use this only once, per incus install

This will now condense the login method to:

Use only in Host Machine

Exiting A Container

Use only in Container

Stop a Container

Some times this is not enough , and you would need some elbow grease, so use the --force flag, like this:

Use only in Host Machine

Restart a Container

Use only in Host Machine

Some times this is not enough , and you would need some elbow grease, so use the --force flag, like this:

Copy an Existing Container

Use only in Host Machine

Make sure the Container being copied is completely stopped

Reply

or to participate.