Difference between revisions of "Virsh domblklist"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<code>virsh domblklist domain [--inactive] [--details]</code><ref>https://linux.die.net/man/1/virsh</ref> Print a table showing the brief information of all block devices asso...")
 
Line 1: Line 1:
<code>virsh domblklist domain [--inactive] [--details]</code><ref>https://linux.die.net/man/1/virsh</ref>
+
<code>[[virsh]] domblklist domain [--inactive] [--details]</code><ref>https://linux.die.net/man/1/virsh</ref>
 
Print a table showing the brief information of all block devices associated with domain. If --inactive is specified, query the block devices that will be used on the next boot, rather than those currently in use by a running domain. If --details is specified, disk type and device value will also be printed. Other contexts that require a block device name (such as domblkinfo or snapshot-create for disk snapshots) will accept either target or unique source names printed by this command.
 
Print a table showing the brief information of all block devices associated with domain. If --inactive is specified, query the block devices that will be used on the next boot, rather than those currently in use by a running domain. If --details is specified, disk type and device value will also be printed. Other contexts that require a block device name (such as domblkinfo or snapshot-create for disk snapshots) will accept either target or unique source names printed by this command.
  

Revision as of 10:08, 2 January 2020

virsh domblklist domain [--inactive] [--details][1] Print a table showing the brief information of all block devices associated with domain. If --inactive is specified, query the block devices that will be used on the next boot, rather than those currently in use by a running domain. If --details is specified, disk type and device value will also be printed. Other contexts that require a block device name (such as domblkinfo or snapshot-create for disk snapshots) will accept either target or unique source names printed by this command.


$ virsh domblklist VM1_NAME
Target     Source
------------------------------------------------
vda        /export/images/base.img


$ virsh domblklist VM2_NAME
Target     Source
------------------------------------------------
vda        /export/images/base-root.qcow2
vdb       /export/images/base-data.qcow2
$ virsh domblklist VM2_NAME --details
Type       Device     Target     Source
------------------------------------------------
file       disk        vda       /export/images/base-root.qcow2
file       cdrom       vdb       /export/images/base-data.qcow2

List for all VM Machines:

  • for VM in `virsh list --name`; do virsh domblklist $VM --details; done



See also

  • https://linux.die.net/man/1/virsh
  • Advertising: