Incus launch fails: No root device could be found

Using incus 0.3 on Ubuntu (with deb package from zabbly), launching new container fails :

➜ incus launch images:ubuntu/23.10 rust
Creating rust
Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Invalid devices: Failed detecting root disk device: No root device could be found

Not sure what the problem can be.

Did you run incus admin init to perform the initial setup on your system ?

It sounds like you don’t have any storage set up at the moment which would normally have been taken care of by the init step.

Well, I have a bunch a containers migrated from LXD currently running with incus, and storage pool:

➜ incus storage list
±--------±-------±----------±------------±--------±--------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
±--------±-------±----------±------------±--------±--------+
| default | zfs | rpool/lxd | | 7 | CREATED |
±--------±-------±----------±------------±--------±--------+

Ah, can you show incus profile show default?

➜ incus profile show default
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
name: default
used_by:

  • /1.0/instances/siarec-spip3
  • /1.0/instances/sqlserver
  • /1.0/instances/talend-open-studio
  • /1.0/instances/aja-dataroom
  • /1.0/instances/aja-restore
  • /1.0/instances/monetdb
  • /1.0/instances/siarec-restore

Okay, so that’s the problem, your default profile doesn’t have a root disk defined.

You could keep things as they are and just always pass --storage default when creating instances, but that may get a bit annoying :slight_smile:

So the real fix would be incus profile device add default root disk pool=default path=/ which will add a root device to your default profile using your default storage pool.

1 Like

Deb 12

I’m into the same problem as this thread.

ran
root@debian:/data# incus profile show default
config: {}
description: Default Incus profile
devices: {}
name: default
used_by:
project: default

Looks to be “Devices not defined”

Here are my disks
root@debian:/data# df -h
Filesystem Size Used Avail Use% Mounted on
udev 126G 0 126G 0% /dev
tmpfs 26G 1.9M 26G 1% /run
/dev/sdb2 23G 2.6G 20G 12% /
tmpfs 126G 0 126G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sdb5 1.8G 40K 1.7G 1% /tmp
/dev/sdb3 9.1G 697M 8.0G 8% /var
/dev/sdb6 404G 48K 384G 1% /home
/dev/sdb1 511M 5.9M 506M 2% /boot/efi
tmpfs 26G 0 26G 0% /run/user/1000
/dev/sda1 440G 28K 417G 1% /data
tmpfs 100K 0 100K 0% /var/lib/incus/shmounts
tmpfs 100K 0 100K 0% /var/lib/incus/guestapi

wanting to use /dev/sda1/data for the incus pool

Is that possible, or do I not quite get it? Even if it’s what I want to do, is that what I should do?

Thanks

Incus supports all kind of storage types.

Please post the output of incus storage ls This will list all current configured storage devices. In case it is empty your need to create a new storage device. Have a look at About storage pools, volumes and buckets - Incus documentation and following pages to create a new pool:
For example incus storage create pool2 dir source=/data will create a storage pool named pool2 at the location suggested above. After that you can add it to your default profile or use it directly during container creation incus launch <image> <instance_name> --storage pool2.

1 Like