Bug 1332701

Summary: libvirt generates xml that generates 'device must be of type qxl' error
Product: [Fedora] Fedora Reporter: Dusty Mabe <dustymabe>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: agedosier, berrange, clalancette, crobinso, dyuan, fjin, imcleod, itamar, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.3.3.1-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-09 00:03:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
beforedefine.xml
none
beforedefine.xml
none
afterdefinef24.xml
none
afterdefinef23.xml none

Description Dusty Mabe 2016-05-03 20:28:19 UTC
Created attachment 1153576 [details]
beforedefine.xml

Description of problem:
I'm using imagefactory in F24 and in doing so I get an error during the run of imagefactory.

I have boiled this down to the fact that the "extra xml" that libvirt generates to supplement the provided xml that was given on "define" causes the domain to be unstartable. I believe this is because the in f24 the video model line is `<model type='cirrus' vram='16384' heads='1' primary='yes'/>` where in f23 it was `<model type='cirrus' vram='16384' heads='1'/>`.

Attached there are a few files that can be used to demonstrate the problem and\or investigate the generated libvirt xml.


```
[root@cloudhost ~]# virsh define beforedefine.xml 
Domain imagefactory defined from beforedefine.xml

[root@cloudhost ~]# virsh start imagefactory
error: Failed to start domain imagefactory
error: unsupported configuration: non-primary video device must be type of 'qxl'

[root@cloudhost ~]# virsh dumpxml imagefactory > afterdefinef24.xml 
[root@cloudhost ~]# 

```



Version-Release number of selected component (if applicable):
[root@cloudhost ~]# rpm -q libvirt-daemon-kvm 
libvirt-daemon-kvm-1.3.3-2.fc24.x86_64

How reproducible:
Always


Steps to Reproduce:
1. virsh define beforedefine.xml
2. virsh start imagefactory

Comment 1 Dusty Mabe 2016-05-03 20:29:58 UTC
Comment on attachment 1153576 [details]
beforedefine.xml

Don't use.. sending a new one

Comment 2 Dusty Mabe 2016-05-03 20:31:16 UTC
Created attachment 1153579 [details]
beforedefine.xml

Comment 3 Dusty Mabe 2016-05-03 20:32:52 UTC
Created attachment 1153581 [details]
afterdefinef24.xml

Comment 4 Dusty Mabe 2016-05-03 20:33:54 UTC
Created attachment 1153582 [details]
afterdefinef23.xml

Comment 5 Cole Robinson 2016-05-03 21:18:32 UTC
Thanks for the report. It's probably this commit, I'll confirm and do a build soon

commit 6d8b6d2847f31a3d7a234536c12b8feca751a02f
Author: Ján Tomko <jtomko>
Date:   Mon Apr 11 14:26:06 2016 +0200

    conf: also mark the implicit video as primary
    
    Commit 119cd06 started setting the primary bool for the first
    user-specified video even if user omitted the 'primary' attribute.
    
    However this was done before the addition of the implicit device.
    This broke startup of transient qemu domains with no <video>:
    https://bugzilla.redhat.com/show_bug.cgi?id=1325757
    
    Move this default to virDomainDefPostParseInternal,
    after the addition of the implicit video device, to catch the implicit
    video as well.

Comment 6 Fedora Update System 2016-05-05 12:52:09 UTC
libvirt-1.3.3.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f5b59b4ca5

Comment 7 Fedora Update System 2016-05-06 11:27:22 UTC
libvirt-1.3.3.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f5b59b4ca5

Comment 8 Fedora Update System 2016-05-09 00:03:00 UTC
libvirt-1.3.3.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.