Jammy: ds-identify: cloud-init disabled by generator due to inability to detect LXD datasource when launched from Jammy host system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
High
|
Chad Smith |
Bug Description
Launching Jammy KVM instances from a Jammy host where kernel is > 5.10 results in ds-identify disabling cloud-init from systemd boot targets due to systemd-detect-virt returning "qemu" instead of "kvm".
Steps to reproduce from Jammy host
$ lxc profile show jammy-vm
config: {}
description: Default LXD profile for jammy VMs
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
name: jammy-vm
$ lxc launch ubuntu-daily:jammy --vm --profile jammy-vm test-jammy
$ lxc exec test-jammy -- systemd-detect-virt
qemu
$ lxc stop test-jammy
$ lxc config set test-jammy security.
$ lxc start test-jammy
$ lxc exec test-jammy -- DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/
# Ensure "no datasource detected"
$ lxc exec test-jammy -- add-apt-repository ppa:cloud-
$ lxc exec test-jammy -- apt install cloud-init
$ lxc exec test-jammy -- DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/
"Found single datasource: LXD"
Changed in cloud-init (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Chad Smith (chad.smith) |
importance: | Undecided → High |
This bug was fixed in the package cloud-init - 22.1-14- g2e17a0d6- 0ubuntu1~ 22.04.5
--------------- g2e17a0d6- 0ubuntu1~ 22.04.5) jammy; urgency=medium
cloud-init (22.1-14-
* d/p/cpick- be9389c6- Work-around- bug-in- LXD-VM- detection- 1325: 30ccd51a- ds-identify- also-discover- LXD-by- presence- from-DMI: e3307e4d- ds-identify- detect- LXD-for- VMs-launched- from-host- with:
cherry-pick be9389c6: Work around bug in LXD VM detection (#1325)
* d/p/cpick-
cherry-pick 30ccd51a: ds-identify: also discover LXD by presence
from DMI
* d/p/pick-
cherry-pick e3307e4d: ds-identify: detect LXD for VMs launched from
host with > 5.10 kernel (LP: #1968085)
-- James Falcon <email address hidden> Wed, 06 Apr 2022 16:48:16 -0500