[Impact]
* Upstream [1] added a mistake missing an else downgrading
cirrus to vga.
* Fixed in [2] and released in 1.14 but needs to be backported to Focal.
[1]: https://github.com/coreboot/seabios/commit/34b6ecc160749a691b80fcb8638216518d971c65
[2]: https://github.com/coreboot/seabios/commit/d11c75185276ded944f2ea0277532b7fee849bbc
[Test Case]
* Get an Ubuntu CD image and boot it with Cirrus video.
$ wget https://mirrors.ocf.berkeley.edu/ubuntu-releases/20.04/ubuntu-20.04.1-live-server-amd64.iso
$ qemu-system-x86_64 -m 2048 -smp 1 -vnc 0.0.0.0:1 -k fr -name test-boot -monitor pty -boot order=d -drive file=/var/lib/libvirt/images/ubuntu-20.04.1-live-server-amd64.iso,media=cdrom -device cirrus-vga,id=video0,bus=pci.0,addr=0x3
Once that is running you can connect VNC to :5901 and with the error will see a fail loop stating:
graphics initialization failed
Error setting up gfxboot
boot:
Could not allocate memory.
With the fix this will boot into the installer of the ISO.
[Where problems could occur]
* This changes the listing of (virtual) GPUs to the guest.
There it differs between Cirrus/VGA/stdvga/bochs.
Therefore using those backends are the ones we'd expect errors.
On testing no issue was seen thou, and the code is in Ubuntu since
groovy without breaking the world all around.
[Other Info]
* Depending where/how you drive your VMs the actual bug might be well
hidden and it just appears as a hanging or not starting boot.
----
Hello.
I can't boot ubuntu-20.04.1-live-server-amd64.iso with VNC graphic
using libvirt, there is an error message:
graphics initialization failed
Error setting up gfxboot
boot:
after a moment, I see some other messages:
graphics initialization failed
Error setting up gfxboot
boot:
Could not allocate memory.
boot
Could not allocate memory.
boot
Could not allocate memory.
boot
To reproduce:
- download ubuntu-20.04.1-live-server-amd64.iso to
/var/lib/libvirt/images
- create a qcow2 image /var/lib/libvirt/images/disk0.qcow2
- create the following libvirt XML definition file
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>ubuntu-server-20.04.1</name>
<title>ubuntu-server-20.04.1</title>
<vcpu><![CDATA[4]]></vcpu>
<cputune>
<shares>205</shares>
</cputune>
<memory>2097152</memory>
<os>
<type arch='x86_64'>hvm</type>
</os>
<devices>
<emulator><![CDATA[/usr/bin/qemu-system-x86_64]]></emulator>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/disk0.qcow2'/>
<target dev='sda'/>
<boot order='1'/>
<driver name='qemu' type='qcow2' cache='none'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/libvirt/images/ubuntu-20.04.1-live-server-amd64.iso'/>
<target dev='hda' bus='ide'/>
<boot order='2'/>
<readonly/>
<driver name='qemu' type='raw' cache='none'/>
</disk>
<graphics type='vnc' listen='0.0.0.0' port='5901' keymap='fr'/>
<input type='tablet' bus='usb'/>
</devices>
<features>
<acpi/>
</features>
</domain>
- define the domaine with: virsh define ubuntu-server.xml
- start the domain with: virsh start ubuntu-server-20.04.1
- connect to the VNC port 5901
It's working fine when I try the following:
qemu-system-x86_64 -m 2048 -smp 1 -vnc 0.0.0.0:1 -k fr -name test-boot -monitor pty -boot order=d -drive file=/var/lib/libvirt/images/disk0.qcow2,media=disk -drive file=/var/lib/libvirt/images/ubuntu-20.04.1-live-server-amd64.iso,media=cdrom
The non working qemu command line used by libvirt is:
/usr/bin/qemu-system-x86_64 -name guest=ubuntu-server-20.04.1,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-7-ubuntu-server-20.04./master-key.aes -machine pc-i440fx-focal,accel=kvm,usb=off,dump-guest-core=off -cpu qemu64 -m 2048 -overcommit mem-lock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 503e911c-f7a5-48ef-8241-36bdbc75b9a3 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device lsi,id=scsi0,bus=pci.0,addr=0x3 -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/disk0.qcow2","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-2-storage","backing":null} -device scsi-hd,bus=scsi0.0,scsi-id=0,device_id=drive-scsi0-0-0,drive=libvirt-2-format,id=scsi0-0-0,bootindex=1,write-cache=on -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/ubuntu-20.04.1-live-server-amd64.iso","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":true,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"} -device ide-cd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=2,write-cache=on -vnc 0.0.0.0:1 -k fr -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
CasperMD5CheckResult: skip
DistroRelease: Ubuntu 20.04
Package: libvirt-daemon-system 6.0.0-0ubuntu8.5
PackageArchitecture: amd64
ProcCmdline: BOOT_IMAGE=/vmlinuz-5.4.0-58-generic root=/dev/mapper/vggrichka-root ro quiet splash vt.handoff=7
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=fr_FR.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 5.4.0-58.64-generic 5.4.73
Tags: focal
Uname: Linux 5.4.0-58-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True
modified.conffile..etc.libvirt.nwfilter.allow-arp.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.allow-dhcp-server.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.allow-dhcp.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.allow-incoming-ipv4.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.allow-ipv4.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.clean-traffic-gateway.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.clean-traffic.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-arp-ip-spoofing.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-arp-mac-spoofing.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-arp-spoofing.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-ip-multicast.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-ip-spoofing.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-mac-broadcast.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-mac-spoofing.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-other-l2-traffic.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.no-other-rarp-traffic.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.qemu-announce-self-rarp.xml: [modified]
modified.conffile..etc.libvirt.nwfilter.qemu-announce-self.xml: [modified]
modified.conffile..etc.libvirt.qemu.conf: [modified]
modified.conffile..etc.libvirt.qemu.networks.default.xml: [modified]
mtime.conffile..etc.libvirt.nwfilter.allow-arp.xml: 2020-12-17T10:31:59.619331
mtime.conffile..etc.libvirt.nwfilter.allow-dhcp-server.xml: 2020-12-17T10:31:59.639331
mtime.conffile..etc.libvirt.nwfilter.allow-dhcp.xml: 2020-12-17T10:31:59.599330
mtime.conffile..etc.libvirt.nwfilter.allow-incoming-ipv4.xml: 2020-12-17T10:31:59.643331
mtime.conffile..etc.libvirt.nwfilter.allow-ipv4.xml: 2020-12-17T10:31:59.575330
mtime.conffile..etc.libvirt.nwfilter.clean-traffic-gateway.xml: 2020-12-17T10:31:59.647331
mtime.conffile..etc.libvirt.nwfilter.clean-traffic.xml: 2020-12-17T10:31:59.631331
mtime.conffile..etc.libvirt.nwfilter.no-arp-ip-spoofing.xml: 2020-12-17T10:31:59.615331
mtime.conffile..etc.libvirt.nwfilter.no-arp-mac-spoofing.xml: 2020-12-17T10:31:59.591331
mtime.conffile..etc.libvirt.nwfilter.no-arp-spoofing.xml: 2020-12-17T10:31:59.611331
mtime.conffile..etc.libvirt.nwfilter.no-ip-multicast.xml: 2020-12-17T10:31:59.595330
mtime.conffile..etc.libvirt.nwfilter.no-ip-spoofing.xml: 2020-12-17T10:31:59.627331
mtime.conffile..etc.libvirt.nwfilter.no-mac-broadcast.xml: 2020-12-17T10:31:59.603331
mtime.conffile..etc.libvirt.nwfilter.no-mac-spoofing.xml: 2020-12-17T10:31:59.607331
mtime.conffile..etc.libvirt.nwfilter.no-other-l2-traffic.xml: 2020-12-17T10:31:59.583330
mtime.conffile..etc.libvirt.nwfilter.no-other-rarp-traffic.xml: 2020-12-17T10:31:59.623331
mtime.conffile..etc.libvirt.nwfilter.qemu-announce-self-rarp.xml: 2020-12-17T10:31:59.579330
mtime.conffile..etc.libvirt.nwfilter.qemu-announce-self.xml: 2020-12-17T10:31:59.587330
mtime.conffile..etc.libvirt.qemu.conf: 2020-12-17T10:32:02.111360
mtime.conffile..etc.libvirt.qemu.networks.default.xml: 2020-12-17T10:31:59.179326
apport information