Lxd: LXD 3.6 - Error: Failed container creation: Create container: Create LXC container: Invalid devices: Detect root disk device: No root device could be found

Created on 21 Oct 2018  路  1Comment  路  Source: lxc/lxd

Required information

  • Distribution: Ubuntu
  • Distribution version: 16.04
  • The output of "lxc info" or if that fails:

    • Kernel version: 4.4.0-135-lowlatency

    • LXC version: 3.0.0 (https://github.com/lxc/lxc/commit/65322e5c52bc1792d81efd0076a995fc8a1c0042)

    • LXD version: 3.6 (https://github.com/lxc/lxd/commit/2e0a0164e215dd10cbd67f238a22a8f7cf94465c)

    • Storage backend in use:

Issue description

When creating a new container in a new project without inherits the default profile it creates a empty
profile that stops the launch of a new container until the root and eth0 information be defined.

Steps to reproduce

1- lxc project create demo

Project demo created

2- lxc project switch demo


3- lxc ls

| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+

4- lxc storage ls

|  NAME   | DESCRIPTION | DRIVER |             SOURCE             | USED BY |
+---------+-------------+--------+--------------------------------+---------+
| default |             | zfs    | /var/lib/lxd/disks/default.img | 14      |
+---------+-------------+--------+--------------------------------+---------+

5- lxc launch ubuntu:16.04 c1

Creating c1
Error: Failed container creation: Create container: Create LXC container: Invalid devices: Detect root disk device: No root device could be found

Information to attach

  • [ ] Any relevant kernel output (dmesg)
  • [ ] Container log (lxc info NAME --show-log)
  • [ ] Container configuration (lxc config show NAME --expanded)
  • [ ] Main daemon log (at /var/log/lxd/lxd.log or /var/snap/lxd/common/lxd/logs/lxd.log)
  • [ ] Output of the client with --debug
  • [ ] Output of the daemon with --debug (alternatively output of lxc monitor while reproducing the issue)

Most helpful comment

Its not a problem at all ! Sorry about that
In my understanding if not inherited from the default project then the images and profiles must be different or customized and set individually:

1-Listing the actual profile
lxc profile show default

lxc profile show default
config: {}
description: Default LXD profile for project demo
devices: {}
name: default
used_by: []

2- Defining a disk
lxc profile device add default root disk path=/ pool=default

Device root added to default

3- Defining a network
lxc profile device add default eth0 nic name=eth0 nictype=bridged parent=lxdbr0

Device eth0 added to default

4- Launching
lxc launch ubuntu:16.04 c1

Creating c1
Starting c1

5- Listing
lxc ls

| NAME |  STATE  |        IPV4         | IPV6 |    TYPE    | SNAPSHOTS |
+------+---------+---------------------+------+------------+-----------+
| c1   | RUNNING | 10.75.88.168 (eth0) |      | PERSISTENT |           |
+------+---------+---------------------+------+------------+-----------+

>All comments

Its not a problem at all ! Sorry about that
In my understanding if not inherited from the default project then the images and profiles must be different or customized and set individually:

1-Listing the actual profile
lxc profile show default

lxc profile show default
config: {}
description: Default LXD profile for project demo
devices: {}
name: default
used_by: []

2- Defining a disk
lxc profile device add default root disk path=/ pool=default

Device root added to default

3- Defining a network
lxc profile device add default eth0 nic name=eth0 nictype=bridged parent=lxdbr0

Device eth0 added to default

4- Launching
lxc launch ubuntu:16.04 c1

Creating c1
Starting c1

5- Listing
lxc ls

| NAME |  STATE  |        IPV4         | IPV6 |    TYPE    | SNAPSHOTS |
+------+---------+---------------------+------+------------+-----------+
| c1   | RUNNING | 10.75.88.168 (eth0) |      | PERSISTENT |           |
+------+---------+---------------------+------+------------+-----------+
Was this page helpful?
0 / 5 - 0 ratings