cloud images slow to boot under kvm
This bug report will be marked for expiration in 6 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Incomplete
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
The Ubuntu cloud images hang for 15-30 seconds when run in qemu w/kvm. This happens before Grub's welcome message, so I think it's happening before the bootloader. This does not happen with other OS images using the exact same setup.
- With BIOS boot, it sits at the "Booting from Hard Disk..." screen.
- With EFI boot, it sits at "BdsDxe: starting Boot0001 "UEFI QEMU HARDDISK QM00001" from ... (pci details)"
Both 22.04 and 23.10 behave the same. I'm using qemu 7.2 from debian bookworm on linux 6.5.10 from bookworm-backports.
A recent Debian bookworm and Fedora image (exact urls below) both reach the bootloader in less than a second from the above points. So this seems related to the ubuntu images.
It'd be nice to speed this up, though so far I don't have any idea for the cause.
Thanks,
Ross
22.04 - https:/
23.10 - https:/
bookworm - http://
fedora - https:/
Changed in cloud-images: | |
status: | New → Incomplete |
Hi Ross,
thanks for the report, and that is odd indeed.
It sounds like the initialization needing a fallback of some sort to then go to the next step and get to the bootloader.
I was quickly retrying and did not see/reproduce that slowdown in the bootloader.
It passes that stage rather quick, let us say ~1 second.
I didn't care about the later system to work (no PW setting or such), just a cmdline to see how fast it would boot (initialize, boot-load, kernel, complete system boot), the command I ran was:
$ sudo qemu-system-x86_64 -m 1G -cpu host -smp 2 -machine accel=kvm,type=q35 -drive file=/tmp/ ubuntu- 22.04-server- cloudimg- amd64.img, if=virtio, format= qcow2 -nographic
I tried the above 1:6.2+dfsg- 2ubuntu6. 17 in Ubuntu Jammy, as well 1:8.2.2+ds-1 in Debian sid and 1:7.2+dfsg- 7+deb12u5 in Debian bookworm. They are all fast with the 22.04 image you referred to.
I used that commandline to - for now - to avoid having to look for well meant distracting magic of libvirt or other higher level things. I see nothing super special in my commandline nor can I see the issue.
Hence I need to ask you which command or tooling config did you use to start the guest when you see the difference in boot speed?