Ubuntu 22.04 doesn't boot with xen (DomU pv/pvh/pygrub)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xen (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Kinetic |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira |
Bug Description
[Impact]
* Bug 1956166 (Ubuntu 22.04 doesn't boot with xen)
introduced a libzstd-dev build-dep on Focal but
not on later releases (oversight).
* This allows Focal to boot zstd kernels on Xen
as Dom0 and DomU HVM & PV, but later releases
cannot boot DomU PV modes as the userspace &
tools code doesn't have zstd support enabled.
[Fix]
* The build-dep on libzstd-dev is applied in Debian
and Lunar, and still needed in Kinetic and Focal.
[Test Steps]
* Install and boot Xen as Dom0, and create/launch
a DomU PV domain with a zstd kernel.
$ sudo apt install xen-system-amd64
$ sudo reboot
$ cat <<EOF >xen-5.19-vm.pv
name = "xen-5.19-vm.pv"
type = "pv"
kernel = "/boot/
ramdisk = "/boot/
cmdline = "console=ttyS0 break=top"
vcpus = 1
memory = 1024
EOF
$ sudo xl create -c xen-5.19-vm.pv
Parsing config from xen-5.19-vm.pv
xc: error: panic: xg_dom_
xc_try_
(with fix)
$ sudo xl create -c xen-5.19-vm.pv
Parsing config from xen-5.19-vm.pv
[ 0.000000] Linux version 5.19.0-23-generic ...
...
[Regression Potential]
* This enables code paths for zstd support,
which is used when zstd kernels are found,
thus isn't expected to break other formats.
* However, theoretically, regressions would
probably manifest immediately on the boot
on DomU PV domains of non-zstd images, as
their kernel images would fail to load
(this is fortunately easy to verify/test).
* This change has been available in Focal
since August/2022 with no bugs reported.
[Other Info]
* Fix available in Debian and Ubuntu Lunar.
$ git remote get-url origin
https:/
$ git show --oneline -s 8b790c177e1dd
8b790c177e1d debian/control: Add libzstd-dev as Build-Depends
$ git describe --contains 8b790c177e1dd
archive/
$ rmadison -a source xen
...
xen | 4.11.3+
xen | 4.16.0-1~ubuntu2 | jammy/universe | source
xen | 4.16.2-1 | kinetic/universe | source
xen | 4.16.2+
Changed in xen (Ubuntu): | |
status: | New → Fix Released |
Changed in xen (Ubuntu Jammy): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
Changed in xen (Ubuntu Kinetic): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
Test Steps (details in bug 1956166 comment 14)
Looks good for std and non-zstd kernels on DomU PV mode;
still boots correctly with Dom0 mode; Kinetic and Jammy.
Uploading to K and J.
Kinetic:
---
zstd kernel:
cat <<EOF >xen-5.19-vm.pv vmlinuz- 5.19.0- 23-generic"
name = "xen-5.19-vm.pv"
type = "pv"
kernel = "/boot/
cmdline = "console=ttyS0"
vcpus = 1
memory = 1024
EOF
- before:
$ sudo xl create -c xen-5.19-vm.pv bzimageloader. c:619: xc_try_zstd_decode: ZSTD decompress support unavailable
Parsing config from xen-5.19-vm.pv
xc: error: panic: xg_dom_
...
- after:
sudo add-apt-repository ppa:mfo/lp1998026 dpkg/status)
sudo apt install $(awk '/^Package:/ {pkg=$2} /^Source: xen$/ {print pkg}' /var/lib/
$ sudo xl create -c xen-5.19-vm.pv
Parsing config from xen-5.19-vm.pv
[ 0.000000] Linux version 5.19.0-23-generic ...
...
non-zstd kernel:
wget https:/ /launchpad. net/~canonical- kernel- team/+archive/ ubuntu/ ppa/+build/ 24655136/ +files/ linux-image- unsigned- 5.4.0-133- generic_ 5.4.0-133. 149_amd64. deb unsigned- 5.4.0-133- generic_ 5.4.0-133. 149_amd64. deb kernel-5.4-deb
dpkg-deb -x linux-image-
cat <<EOF >xen-5.4-vm.pv 5.4-deb/ boot/vmlinuz- 5.4.0-133- generic"
name = "xen-5.4-vm.pv"
type = "pv"
kernel = "./kernel-
cmdline = "console=ttyS0"
vcpus = 1
memory = 1024
EOF
$ sudo xl create -c xen-5.4-vm.pv
Parsing config from xen-5.4-vm.pv
[ 0.000000] Linux version 5.4.0-133-generic ...
...
Dom0:
Loading Xen 4.16-amd64 ...
Loading Linux 5.19.0-23-generic ...
Loading initial ramdisk ...
(XEN) Xen version 4.16.2 (Ubuntu 4.16.2-1ubuntu1)
...
$ sudo xl info | head -n4
host : xen-zstd-k
release : 5.19.0-23-generic
version : #24-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 14 15:39:57 UTC 2022
machine : x86_64
Jammy:
---
zstd kernel:
cat <<EOF >xen-5.15-vm.pv vmlinuz- 5.15.0- 53-generic"
name = "xen-5.15-vm.pv"
type = "pv"
kernel = "/boot/
cmdline = "console=ttyS0"
vcpus = 1
memory = 1024
EOF
- before:
$ sudo xl create -c xen-5.15-vm.pv bzimageloader. c:619: xc_try_zstd_decode: ZSTD decompress support unavailable
Parsing config from xen-5.15-vm.pv
xc: error: panic: xg_dom_
...
- after:
sudo add-apt-repository ppa:mfo/lp1998026 dpkg/status)
sudo apt install $(awk '/^Package:/ {pkg=$2} /^Source: xen$/ {print pkg}' /var/lib/
$ sudo xl create -c xen-5.15-vm.pv
Parsing config from xen-5.15-vm.pv
[ 0.000000] Linux version 5.15.0-53-generic ...
...
non-zstd kernel:
wget https:/ /launchpad. net/~canonical- kernel- team/+archive/ ubuntu/ ppa/+build/ 24655136/ +files/ linux-image- unsigned- 5.4.0-133- generic_ 5.4.0-133. 149_amd64. deb unsigned- 5.4.0-133- generic_ 5.4.0-133. 149_amd64. deb kernel-5.4-deb
dpkg-deb -x linux-image-
cat <<EOF >xen-5.4-vm.pv 5.4-deb/ boot/vmlinuz- 5.4.0-133- generic"
name = "xen-5.4-vm.pv"
type = "pv"
kernel = "./kernel-
cmdline = "console=ttyS0"
vcpus = 1
memory = 1024
EOF
$ sudo xl create -c xen-5.4-vm.pv
Parsing config from xen-5.4-vm.pv
[ 0.000000] Linux version 5.4.0-133-generic ...
...
Dom0:
Loading Xen 4.16-amd64 ...
Loading Linux 5.15.0-53-generic ...
Loading initial ramdisk ...
(XEN) Xen version 4.1...