Bug 723713

Summary: virsh does not have a command to list devices attached to a virtual machine
Product: [Fedora] Fedora Reporter: Thomas Schweikle <tschweikle>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: aquini, berrange, clalance, crobinso, itamar, jforbes, laine, lance.gropper, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-07 00:28:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Schweikle 2011-07-20 20:59:04 UTC
Description of problem:
There is no command to list devices attached to a virtual machine. Only commands exist to show information or state of devices attached to virtual machines. For both commands it is necessary to know the device name attached.

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

How reproducible:
Allways

Steps to Reproduce:
1. Install libvirt-bin
2. Create a virtual machine
3. search for a command listing devices attached
  
Actual results:
no such command available

Expected results:
having such a command available

Additional info:
something like "virsh list-devices <domain>" or 
"virsh domlistblk <domain>" would be helpful

Comment 1 Daniel Veillard 2011-07-21 01:25:18 UTC
Well those can be extracted from the XML provided by virsh dumpxml <domain>
by looking in the "devices" section.
One of the problem of a standalone list as you suggest is that it would
like all the associated metadata like:
  - is that a read only device use
  - is that used as a block device or a character one

etc ...

I don't disagree that one or 2 convenience function could be provided for virsh
(not in the API) though ...

Daniel

Comment 2 Fedora Admin XMLRPC Client 2011-09-22 17:52:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Admin XMLRPC Client 2011-09-22 17:56:27 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2011-11-30 20:03:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora Admin XMLRPC Client 2011-11-30 20:03:12 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2011-11-30 20:07:42 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2011-11-30 20:07:48 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Cole Robinson 2012-06-07 00:28:54 UTC
Yeah, this is not a bug. XML might not be the best interface, but there are well known tools that allow parsing it.

Comment 9 Lance Gropper 2014-08-12 00:16:29 UTC
It actually does have one - look at the original submission - he apparently is trying to see block devices, however the command has a typo: it's not "virsh domlistblk <domain>" - the correct command is "virsh domblklist <domain>". I hope this comment helps him as the message is pretty old.