Bug 1118705

Summary: domblklist with --inactive should not work on an transient guest
Product: Red Hat Enterprise Linux 7 Reporter: Shanzhi Yu <shyu>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: dyuan, mzhan, pkrempa, rbalakri, shyu, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-03 15:42:25 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:

Description Shanzhi Yu 2014-07-11 09:34:40 UTC
Description of problem:

domblklist with --inactive should not work on an transient guest

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

rpm -q libvirt
libvirt-1.1.1-29.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

1. create a transient guest
# virsh list --transient
  Id    Name                           State
----------------------------------------------------
  22    rhel6.5                        running

2. check domain block device

# virsh domblklist rhel6.5 --inactive
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img


Actual results:


Expected results:


Additional info:

With --inactive means query the block devices that will be used on the next boot, for transient guest, it doesn't make sense, so libvirt should propose some error like "error: Requested operation is not valid" or return null

Comment 1 Peter Krempa 2014-07-11 09:49:47 UTC
The root problem is that virDomainGetXMLDesc(dom, VIR_DOMAIN_XML_INACTIVE) returns an XML for transient VMs.

Try also virsh dumpxml --inactive domname on a transient domain.

Comment 2 Shanzhi Yu 2014-07-14 07:54:55 UTC
(In reply to Peter Krempa from comment #1)
> The root problem is that virDomainGetXMLDesc(dom, VIR_DOMAIN_XML_INACTIVE)
> returns an XML for transient VMs.
> 
> Try also virsh dumpxml --inactive domname on a transient domain.

Yes, virsh dumpxml --inactive on a transient domain will return the xml of the guest with all elements such as disk network and cpu etc.

Comment 4 Peter Krempa 2015-03-03 15:42:25 UTC
This is a very cosmetic issue and I don't think it's worth fixing.