canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.35k stars 930 forks source link

VM with custom block vols using `limits.(read|write)` block during start #14236

Open roosterfish opened 4 days ago

roosterfish commented 4 days ago

Steps to reproduce

lxc init ubuntu:jammy v1 --vm
lxc storage volume create default vol1 --type block size=1GiB
lxc storage volume attach default vol1 v1
lxc config device set v1 vol1 limits.read 200
lxc config device set v1 vol1 limits.write 200

lxc start v1 # <- returns but it blocks and never fully starts the guest

When starting v1 using lxc start --console the output is the following: lxc_start_blocking.txt. But the guest OS never comes up.

Something which might be interesting in the log is this line:

Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-1067-kvm root=PARTUUID=bc0e8ef5-e209-43c3-bea5-1040910252d2 ro console=tty1 console=ttyS0
Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-5.15.0-1067-kvm", will be passed to user space.

It does not happen for custom storage volumes of type filesystem.

tomponline commented 4 days ago

does it work if iops are significantly increased?

roosterfish commented 4 days ago

does it work if iops are significantly increased?

Interesting, an IOPS limit of e.g. 100000 doesn't cause this but it takes "some time" until the guest OS is ready. So probably it's not an error but just takes forever to finish.

Are there maybe some tests performed with the disk on startup that are limited by those settings? That would be supported by the fact that it's only slow when limits.read is set to a fairly small value. Setting limits.write to the same doesn't make a visible difference.