This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

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-06 20:28:54 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Thomas Schweikle 2011-07-20 16:59:04 EDT
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-20 21:25:18 EDT
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 13:52:52 EDT
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 13:56:27 EDT
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 15:03:08 EST
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 15:03:12 EST
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 15:07:42 EST
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 15:07:48 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 8 Cole Robinson 2012-06-06 20:28:54 EDT
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-11 20:16:29 EDT
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.