vol-name

Displays the name of a volume from its key or path.

Syntax

Read syntax diagramSkip visual syntax diagram vol-name <vol-key><vol-path>
Where:
<vol-key>
Is the key of the volume.
<vol-path>
Is the path of the volume.

Selected options

--pool
Specifies the storage pool.

Usage

Volume management commands

Example

This example displays the volume name of a volume with a path /var/lib/libvirt/images/federico.img.
# virsh vol-name /var/lib/libvirt/images/federico.img
vol1