Bug 987097 - X w/ QXL fails to start on RHEL 5.8/5.9 guests, seavgabios seems to be the culprit
X w/ QXL fails to start on RHEL 5.8/5.9 guests, seavgabios seems to be the cu...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: seabios (Show other bugs)
19
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Virtualization Maintainers
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 13:15 EDT by Dhiru Kholia
Modified: 2015-02-17 11:18 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 11:18:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
old X fails to start under KVM (14.67 KB, text/x-log)
2013-07-22 13:15 EDT, Dhiru Kholia
no flags Details

  None (edit)
Description Dhiru Kholia 2013-07-22 13:15:43 EDT
Created attachment 776978 [details]
old X fails to start under KVM

Description of problem:

X fails to start on RHEL / CentOS 5.8 guests running under KVM.

The X processes crashes during the installation and during the after installation boots.

This might not be a virt-manager bug (looks like a QEMU device emulation bug).

Version-Release number of selected component (if applicable):

Host is running updated Fedora 19 64-bit.

$ uname -r
3.9.9-302.fc19.x86_64

$ rpm -qa | grep kvm
libvirt-daemon-kvm-1.0.5.2-1.fc19.x86_64
qemu-kvm-1.4.2-4.fc19.x86_64

$ rpm -qa | grep virt-manager               
virt-manager-common-0.10.0-1.fc19.noarch
virt-manager-0.10.0-1.fc19.noarch

How reproducible:

Try to install RHEL / CentOS 5.8 under KVM.

Expected results:

X should be able to run as usual.
Comment 1 Cole Robinson 2013-07-29 13:56:51 EDT
I can reproduce too with the RHEL5.9 guest. Seems to be seavgabios related, the vgabios-qxl in qemu.git doesn't produce the issue. Emulator from F19 qemu 1.4.2 and qemu.git both reproduce with seabios.git using the build process we use for fedora seabios.

I'm reproducing with a PXE setup: when anaconda tries to transition to graphical mode there's errors about starting X and it continues on. Here's my command line:

/home/crobinso/src/qemu/x86_64-softmmu/qemu-system-x86_64 \
    -machine pc-1.2,accel=kvm,usb=off \
    -m 2048 -smp 2,sockets=2,cores=1,threads=1 \
    -boot order=n \
    -drive file=/mnt/data/devel/images/rhel5-latest.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0 \
    -netdev bridge,br=virbr0,id=hostnet0 \
    -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b3:ca:d1,bus=pci.0,addr=0x3 \
    -sdl \
    -vga qxl \
    -global qxl-vga.ram_size=67108864 \
    -global qxl-vga.vram_size=67108864 \
    -global qxl-vga.romfile=/home/crobinso/src/seabios/out/vgabios.bin
    
There's also been a report on fedora virt list:

https://lists.fedoraproject.org/pipermail/virt/2013-July/003752.html

Gerd, any thoughts?
Comment 2 Gerd Hoffmann 2013-07-30 04:17:27 EDT
Doesn't reproduce with the rhel5 guest I have at hand here.  That one is a 32bit install though.  Any chance this reproduces with 64bit only?
Comment 3 Gerd Hoffmann 2013-07-30 06:24:12 EDT
32bit works fine.  64bit breaks.  Both stdvga and qxl, whereas cirrus works fine.

That looks alot like the xorg x86 emulator has problems with seavgabios.
There already some workarounds in seabios (see tools/vgafixup.py), seems
that isn't enougth ...
Comment 4 Gerd Hoffmann 2013-07-31 05:51:48 EDT
Hmm, older x86emu versions don't handle leal properly:

http://thread.gmane.org/gmane.comp.bios.coreboot.seabios/5831
http://cgit.freedesktop.org/xorg/xserver/commit/?id=f57bc0ede
Comment 5 ross tyler 2013-10-10 15:22:54 EDT
Able to reproduce on recently updated fedora 19 installation ...

# versions
rpm -qa | egrep 'qemu|kvm'
qemu-kvm-1.4.2-11.fc19.x86_64
qemu-img-1.4.2-11.fc19.x86_64
libvirt-daemon-kvm-1.0.5.6-2.fc19.x86_64
libvirt-daemon-driver-qemu-1.0.5.6-2.fc19.x86_64
ipxe-roms-qemu-20130517-2.gitc4bce43.fc19.noarch
qemu-guest-agent-1.4.2-11.fc19.x86_64
qemu-common-1.4.2-11.fc19.x86_64
qemu-system-x86-1.4.2-11.fc19.x86_64

# the problem is evident by virtue of failover to text based RHEL installation
# instead of graphical install (due to X failing to start).
# installation will succeed but booted system will also fail to start X

# create a disk image
qemu-img create -f qcow2 -o preallocation=metadata el5.qcow2 8G

# rhel5 fails:
virt-install \
        --name el5 \
        --cpu host \
        --ram 2048 \
        --vcpus 2 \
        --os-type linux \
        --os-variant rhel5 \
        --network network=default,model=virtio \
        --graphics spice \
        --accelerate \
        --cdrom rhel-server-5.8-x86_64-dvd.iso \
        --disk path=el5.qcow2,format=qcow2,cache=none,bus=virtio

# rhel6 succeeds:
virt-install \
        --name el6 \
        --cpu host \
        --ram 2048 \
        --vcpus 2 \
        --os-type linux \
        --os-variant rhel6 \
        --network network=default,model=virtio \
        --graphics spice \
        --accelerate \
        --cdrom rhel-server-6.4-x86_64-dvd.iso \
        --disk path=image.qcow2,format=qcow2,cache=none,bus=virtio

# adding --video cirrus to rhel5 works
# but with poorer graphics than the default --video qlx
virt-install \
        --name el5 \
        --cpu host \
        --ram 2048 \
        --vcpus 2 \
        --os-type linux \
        --os-variant rhel5 \
        --network network=default,model=virtio \
        --graphics spice --video cirrus \
        --accelerate \
        --cdrom rhel-server-5.8-x86_64-dvd.iso \
        --disk path=image.qcow2,format=qcow2,cache=none,bus=virtio
Comment 6 ross tyler 2013-10-10 15:27:17 EDT
should have said (above)

# rhel5 fails:
virt-install \
        --name el5 \
        --cpu host \
        --ram 2048 \
        --vcpus 2 \
        --os-type linux \
        --os-variant rhel5 \
        --network network=default,model=virtio \
        --graphics spice --video cirrus \
        --accelerate \
        --cdrom rhel-server-5.8-x86_64-dvd.iso \
        --disk path=image.qcow2,format=qcow2,cache=none,bus=virtio
Comment 7 ross tyler 2013-10-10 15:28:05 EDT
... and ...

qemu-img create -f qcow2 -o preallocation=metadata image.qcow2 8G
Comment 9 Cole Robinson 2013-10-31 16:19:34 EDT
Solving the root issue here is very tricky. My rough understanding of it is that RHEL5 X server uses some x86 realmode emulator which has bugs handling certain assembly instructions. Some of those bugs are triggered by the assembly that gcc produces for seavgabios. Old vgabios didn't trigger them because it was hand written in assembly (a world nobody wants to go back to). Newer xorg fixed these emulation issues, but old RHEL5 will forever be buggy.

I think it's easier here for people to just do a workaround as ross suggests: if installing a RHEL5 guest, use cirrus graphics. Then when the VM is installed, make sure xorg-x11-drv-qxl is available in the guest, and switch to qxl graphics using virt-manager's UI. That works fine for me.

If the issue is just too difficult to fix in seavgabios, then maybe we can try and work around it in virt-manager/virt-install by using cirrus for RHEL5 guest install, but switch to qxl afterwards. It would need testing though
Comment 10 Dhiru Kholia 2013-11-23 00:37:42 EST
Cole,

The idea (switching to QXL after installation) works but the RHEL 5.8 VM stops responding to keyboard and mouse events after a while.

Cirrus graphics sucks (badly) and I can't get a resolution greater than 800*600 with it.

In contrast, VirtualBox and VMware Workstation have absolutely no issues and  they work perfectly well. Time to "borrow" some code?
Comment 12 Fedora End Of Life 2015-01-09 14:03:03 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 13 Fedora End Of Life 2015-02-17 11:18:22 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.