Installation guide

Chapter 30. Managing guests with virsh
258
Command Description
setvcpus Changes number of virtual CPUs assigned to a
guest.
vcpuinfo Displays virtual CPU information about a guest.
vcpupin Controls the virtual CPU affinity of a guest.
domblkstat Displays block device statistics for a running
guest.
domifstat Displays network interface statistics for a running
guest.
attach-device Attach a device to a guest, using a device
definition in an XML file.
attach-disk Attaches a new disk device to a guest.
attach-interface Attaches a new network interface to a guest.
detach-device Detach a device from a guest, takes the same
kind of XML descriptions as command attach-
device.
detach-disk Detach a disk device from a guest.
detach-interface Detach a network interface from a guest.
The virsh commands for managing and creating storage pools and volumes.
For more information on using storage pools with virsh, refer to http://libvirt.org/formatstorage.html
Table 30.3. Storage Pool options
Command Description
find-storage-pool-sources Returns the XML definition for all storage pools
of a given type that could be found.
find-storage-pool-sources port Returns data on all storage pools of a given type
that could be found as XML. If the host and port
are provided, this command can be run remotely.
pool-autostart Sets the storage pool to start at boot time.
pool-build The pool-build command builds a defined
pool. This command can format disks and create
partitions.
pool-create pool-create creates and starts a storage pool
from the provided XML storage pool definition
file.
pool-create-as name Creates and starts a storage pool from the
provided parameters. If the --print-xml
parameter is specified, the command prints
the XML definition for the storage pool without
creating the storage pool.
pool-define Creates a storage bool from an XML definition
file but does not start the new storage pool.
pool-define-as name Creates but does not start, a storage pool from
the provided parameters. If the --print-xml
parameter is specified, the command prints