Minimal image boot output goes to a non-default console in standard QEMU invocation

Bug #1785633 reported by Michał Sawicz
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
cloud-images
Confirmed
Medium
Unassigned

Bug Description

When booting the xenial or bionic minimal images using qemu, their output goes to the serial console. A default invocation of qemu will not display the serial console output to the user, so it appears that boot has hung.

(This can be verified by pressing Ctrl-Alt-3 in the qemu console, which will display the serial console output.)

[Original Report]

The xenial minimal image [1] as well as the bionic one [2] fail to boot in QEMU/KVM:

$ qemu-system-x86_64 --enable-kvm -hda ubuntu-16.04-minimal-cloudimg-amd64-disk1.img

Results in:
> Booting from Hard Disk...
> error: no such device: root.

$ qemu-system-x86_64 --enable-kvm -hda ubuntu-18.04-minimal-cloudimg-amd64.img

Hangs at:
> Booting from Hard Disk...

[1] http://cloud-images.ubuntu.com/minimal/releases/xenial/release/ubuntu-16.04-minimal-cloudimg-amd64-disk1.img
[2] http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img

Michał Sawicz (saviq)
description: updated
Dan Watkins (oddbloke)
Changed in cloud-images:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Dan Watkins (oddbloke) wrote :

Hey Saviq,

The output you're seeing is actually a little misleading; the image _is_ booting, but all of its output goes to the serial console. You can see this by pressing Ctrl-Alt-3 in the QEMU console.

(As a side note, you'll also want to add `-net nic,model=virtio` to your invocations to get working networking; qemu defaults to emulating a physical e1000 device, which the KVM-only linux-kvm kernel doesn't have support for.)

I'm going to change this bug to be about the default QEMU console output being misleading and drop its priority.

Thanks,

Dan

summary: - Can't boot minimal images in QEMU
+ Minimal image boot output goes to a non-default console (in QEMU)
summary: - Minimal image boot output goes to a non-default console (in QEMU)
+ Minimal image boot output goes to a non-default console in standard QEMU
+ invocation
description: updated
Changed in cloud-images:
importance: High → Medium
Revision history for this message
Michał Sawicz (saviq) wrote :

FWIW the grub config has "console=tty1" instead of "console=tty0" - changing that gives me GRUB at least on the default console.

Revision history for this message
Michał Sawicz (saviq) wrote :

Just realized CONFIG_VT is disabled in the minimal kernel, so we won't get far with Mir on it :/

Revision history for this message
Michał Sawicz (saviq) wrote :

This seems to have bit me again on Hyper-V, I can't see any output from the VM and it never seems to complete booting (which might be due to missing virtualized hardware support, TBD).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.