The basic structure of most virsh usage is:
-.. code-block:: shell
+.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
**Syntax:**
-.. code-block:: shell
+.. code-block::
help [command-or-group]
**Example 1:**
-.. code-block:: shell
+.. code-block::
virsh # help host
**Example 2:**
-.. code-block:: shell
+.. code-block::
virsh # help list
NAME
**Syntax:**
-.. code-block:: shell
+.. code-block::
quit
exit
**Syntax:**
-.. code-block:: shell
+.. code-block::
version [--daemon]
**Example:**
-.. code-block:: shell
+.. code-block::
$ virsh version
Compiled against library: libvirt 1.2.3
**Syntax:**
-.. code-block:: shell
+.. code-block::
cd [directory]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pwd
**Syntax:**
-.. code-block:: shell
+.. code-block::
connect [URI] [--readonly]
**Syntax:**
-.. code-block:: shell
+.. code-block::
uri
**Syntax:**
-.. code-block:: shell
+.. code-block::
hostname
**Syntax:**
-.. code-block:: shell
+.. code-block::
sysinfo
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodeinfo
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodecpumap [--pretty]
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodecpustats [cpu] [--percent]
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodememstats [cell]
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodesuspend [target] [duration]
**Syntax:**
-.. code-block:: shell
+.. code-block::
node-memory-tune [shm-pages-to-scan] [shm-sleep-millisecs] [shm-merge-across-nodes]
**Syntax:**
-.. code-block:: shell
+.. code-block::
capabilities
**Syntax:**
-.. code-block:: shell
+.. code-block::
domcapabilities [virttype] [emulatorbin] [arch] [machine]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-capabilities
**Syntax:**
-.. code-block:: shell
+.. code-block::
inject-nmi domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
list [--inactive | --all]
[--managed-save] [--title]
An example format for the list is as follows:
-.. code-block:: shell
+.. code-block::
``virsh`` list
Id Name State
**Example 2:**
-.. code-block:: shell
+.. code-block::
$ virsh list --title
Id Name State Title
**Syntax:**
-.. code-block:: shell
+.. code-block::
freecell [{ [--cellno] cellno | --all }]
**Syntax:**
-.. code-block:: shell
+.. code-block::
freepages [{ [--cellno] cellno [--pagesize] pagesize | --all }]
**Syntax:**
-.. code-block:: shell
+.. code-block::
allocpages [--pagesize] pagesize [--pagecount] pagecount [[--cellno] cellno] [--add] [--all]
**Syntax:**
-.. code-block:: shell
+.. code-block::
cpu-baseline FILE [--features] [--migratable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
cpu-compare FILE [--error]
**Syntax:**
-.. code-block:: shell
+.. code-block::
cpu-models arch
**Syntax:**
-.. code-block:: shell
+.. code-block::
echo [--shell] [--xml] [err...] [arg...]
**Syntax:**
-.. code-block:: shell
+.. code-block::
hypervisor-cpu-compare FILE [virttype] [emulator] [arch] [machine] [--error]
**Syntax:**
-.. code-block:: shell
+.. code-block::
hypervisor-cpu-baseline FILE [virttype] [emulator] [arch] [machine] [--features] [--migratable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
autostart [--disable] domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
blkdeviotune domain device [[--config] [--live] | [--current]]
[[total-bytes-sec] | [read-bytes-sec] [write-bytes-sec]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
blkiotune domain [--weight weight] [--device-weights device-weights]
[--device-read-iops-sec device-read-iops-sec]
**Syntax:**
-.. code-block:: shell
+.. code-block::
blockcommit domain path [bandwidth] [--bytes] [base]
[--shallow] [top] [--delete] [--keep-relative]
**Syntax:**
-.. code-block:: shell
+.. code-block::
blockcopy domain path { dest [format] [--blockdev] | --xml file }
[--shallow] [--reuse-external] [bandwidth]
**Syntax:**
-.. code-block:: shell
+.. code-block::
blockjob domain path { [--abort] [--async] [--pivot] |
[--info] [--raw] [--bytes] | [bandwidth] }
**Syntax:**
-.. code-block:: shell
+.. code-block::
blockpull domain path [bandwidth] [--bytes] [base]
[--wait [--verbose] [--timeout seconds] [--async]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
blockresize domain path size
**Syntax:**
-.. code-block:: shell
+.. code-block::
console domain [devname] [--safe] [--force]
**Syntax:**
-.. code-block:: shell
+.. code-block::
cpu-stats domain [--total] [start] [count]
**Syntax:**
-.. code-block:: shell
+.. code-block::
create FILE [--console] [--paused] [--autodestroy]
[--pass-fds N,M,...] [--validate]
#. prepare a template from an existing domain (skip directly to 3a if writing
one from scratch)
- .. code-block:: shell
+ .. code-block::
# virsh dumpxml <domain> > domain.xml
a. DO CHANGE! <name> and <uuid> (<uuid> can also be removed), or
b. DON'T CHANGE! either <name> or <uuid>
- .. code-block:: shell
+ .. code-block::
# $EDITOR domain.xml
b. an existing persistent domain will run with a modified one-time
configuration
- .. code-block:: shell
+ .. code-block::
# virsh create domain.xml
**Syntax:**
-.. code-block:: shell
+.. code-block::
define FILE [--validate]
**Syntax:**
-.. code-block:: shell
+.. code-block::
desc domain [[--live] [--config] |
[--current]] [--title] [--edit] [--new-desc
**Syntax:**
-.. code-block:: shell
+.. code-block::
destroy domain [--graceful]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domblkerror domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domblkinfo domain [block-device --all] [--human]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domblklist domain [--inactive] [--details]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domblkstat domain [block-device] [--human]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domblkthreshold domain dev threshold
**Syntax:**
-.. code-block:: shell
+.. code-block::
domcontrol domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domdisplay domain [--include-password] [[--type] type] [--all]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domfsfreeze domain [[--mountpoint] mountpoint...]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domfsinfo domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domfsthaw domain [[--mountpoint] mountpoint...]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domfstrim domain [--minimum bytes] [--mountpoint mountPoint]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domhostname domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domid domain-name-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
domif-getlink domain interface-device [--config]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domif-setlink domain interface-device state [--config]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domifaddr domain [interface] [--full]
[--source lease|agent|arp]
**Syntax:**
-.. code-block:: shell
+.. code-block::
backup-begin domain [backupxml] [checkpointxml] [--reuse-external]
**Syntax:**
-.. code-block:: shell
+.. code-block::
backup-dumpxml domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domiflist domain [--inactive]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domifstat domain interface-device
**Syntax:**
-.. code-block:: shell
+.. code-block::
domiftune domain interface-device [[--config] [--live] | [--current]]
[*--inbound average,peak,burst,floor*]
**Syntax:**
-.. code-block:: shell
+.. code-block::
dominfo domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domjobabort domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domjobinfo domain [--completed [--keep-completed]] [--anystats] [--rawstats]
**Syntax:**
-.. code-block:: shell
+.. code-block::
dommemstat domain [--period seconds] [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domname domain-id-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
dompmsuspend domain target [--duration]
**Syntax:**
-.. code-block:: shell
+.. code-block::
dompmwakeup domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
domrename domain new-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
domstate domain [--reason]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domstats [--raw] [--enforce] [--backing] [--nowait] [--state]
[--cpu-total] [--balloon] [--vcpu] [--interface]
**Syntax:**
-.. code-block:: shell
+.. code-block::
domtime domain { [--now] [--pretty] [--sync] [--time time] }
**Syntax:**
-.. code-block:: shell
+.. code-block::
domuuid domain-name-or-id
**Syntax:**
-.. code-block:: shell
+.. code-block::
domxml-from-native format config
**Syntax:**
-.. code-block:: shell
+.. code-block::
domxml-to-native format { [--xml] xml | --domain domain-name-or-id-or-uuid }
**Syntax:**
-.. code-block:: shell
+.. code-block::
dump domain corefilepath [--bypass-cache]
{ [--live] | [--crash] | [--reset] }
**Syntax:**
-.. code-block:: shell
+.. code-block::
dumpxml domain [--inactive] [--security-info] [--update-cpu] [--migratable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
edit domain
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh dumpxml --inactive --security-info domain > domain.xml
vi domain.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
emulatorpin domain [cpulist] [[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
event {[domain] { event | --all } [--loop] [--timeout seconds] [--timestamp] | --list}
**Syntax:**
-.. code-block:: shell
+.. code-block::
guest-agent-timeout domain --timeout value
**Syntax:**
-.. code-block:: shell
+.. code-block::
guestinfo domain [--user] [--os] [--timezone] [--hostname] [--filesystem]
**Syntax:**
-.. code-block:: shell
+.. code-block::
guestvcpus domain [[--enable] | [--disable]] [cpulist]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iothreadadd domain iothread_id [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iothreaddel domain iothread_id [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iothreadinfo domain [[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iothreadpin domain iothread cpulist [[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iothreadset domain iothread_id [[--poll-max-ns ns] [--poll-grow factor]
[--poll-shrink divisor]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
managedsave domain [--bypass-cache] [{--running | --paused}] [--verbose]
**Syntax:**
-.. code-block:: shell
+.. code-block::
managedsave-define domain xml [{--running | --paused}]
**Syntax:**
-.. code-block:: shell
+.. code-block::
managedsave-dumpxml domain [--security-info]
**Syntax:**
-.. code-block:: shell
+.. code-block::
managedsave-edit domain [{--running | --paused}]
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh managedsave-dumpxml domain-name > state-file.xml
vi state-file.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
managedsave-remove domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
maxvcpus [type]
**Syntax:**
-.. code-block:: shell
+.. code-block::
memtune domain [--hard-limit size] [--soft-limit size] [--swap-hard-limit size]
[--min-guarantee size] [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
metadata domain [[--live] [--config] | [--current]]
[--edit] [uri] [key] [set] [--remove]
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]]
[--persistent] [--undefinesource] [--suspend] [--copy-storage-all]
to specify the address the client should connect to. The URI is formed as
follows:
-.. code-block:: shell
+.. code-block::
protocol://hostname[:port]/[?parameters]
specific parameters separated by '&'. Currently recognized parameters are
"tlsPort" and "tlsSubject". For example,
-.. code-block:: shell
+.. code-block::
spice://target.host.com:1234/?tlsPort=4567
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-compcache domain [--size bytes]
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-getmaxdowntime domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-getspeed domain [--postcopy]
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-postcopy domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-setmaxdowntime domain downtime
**Syntax:**
-.. code-block:: shell
+.. code-block::
migrate-setspeed domain bandwidth [--postcopy]
**Syntax:**
-.. code-block:: shell
+.. code-block::
numatune domain [--mode mode] [--nodeset nodeset]
[[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
perf domain [--enable eventSpec] [--disable eventSpec]
[[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
reboot domain [--mode MODE-LIST]
**Syntax:**
-.. code-block:: shell
+.. code-block::
reset domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
restore state-file [--bypass-cache] [--xml file]
[{--running | --paused}]
**Syntax:**
-.. code-block:: shell
+.. code-block::
resume domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
save domain state-file [--bypass-cache] [--xml file]
[{--running | --paused}] [--verbose]
**Syntax:**
-.. code-block:: shell
+.. code-block::
save-image-define file xml [{--running | --paused}]
**Syntax:**
-.. code-block:: shell
+.. code-block::
save-image-dumpxml file [--security-info]
**Syntax:**
-.. code-block:: shell
+.. code-block::
save-image-edit file [{--running | --paused}]
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh save-image-dumpxml state-file > state-file.xml
vi state-file.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
schedinfo domain [[--config] [--live] | [--current]] [[--set] parameter=value]...
schedinfo [--weight number] [--cap number] domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
screenshot domain [imagefilepath] [--screen screenID]
**Syntax:**
-.. code-block:: shell
+.. code-block::
send-key domain [--codeset codeset] [--holdtime holdtime] keycode...
**Examples:**
-.. code-block:: shell
+.. code-block::
# send three strokes 'k', 'e', 'y', using xt codeset. these
# are all pressed simultaneously and may be received by the guest
**Syntax:**
-.. code-block:: shell
+.. code-block::
send-process-signal domain-id pid signame
The *signame* argument may be either an integer signal constant number,
or one of the symbolic names:
-.. code-block:: shell
+.. code-block::
"nop", "hup", "int", "quit", "ill",
"trap", "abrt", "bus", "fpe", "kill",
**Examples:**
-.. code-block:: shell
+.. code-block::
virsh send-process-signal myguest 1 15
virsh send-process-signal myguest 1 term
**Syntax:**
-.. code-block:: shell
+.. code-block::
set-lifecycle-action domain type action
[[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
set-user-password domain user password [--encrypted]
**Syntax:**
-.. code-block:: shell
+.. code-block::
setmaxmem domain size [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
setmem domain size [[--config] [--live] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
setvcpus domain count [--maximum] [[--config] [--live] | [--current]] [--guest] [--hotpluggable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
setvcpu domain vcpulist [--enable] | [--disable]
[[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
shutdown domain [--mode MODE-LIST]
**Syntax:**
-.. code-block:: shell
+.. code-block::
start domain-name-or-uuid [--console] [--paused]
[--autodestroy] [--bypass-cache] [--force-boot]
**Syntax:**
-.. code-block:: shell
+.. code-block::
suspend domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
ttyconsole domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
undefine domain [--managed-save] [--snapshots-metadata]
[--checkpoints-metadata] [--nvram] [--keep-nvram]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vcpucount domain [{--maximum | --active}
{--config | --live | --current}] [--guest]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vcpuinfo domain [--pretty]
**Example:**
-.. code-block:: shell
+.. code-block::
$ virsh vcpuinfo fedora
VCPU: 0
**Syntax:**
-.. code-block:: shell
+.. code-block::
vcpupin domain [vcpu] [cpulist] [[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vncdisplay domain
**Syntax:**
-.. code-block:: shell
+.. code-block::
attach-device domain FILE [[[--live] [--config] | [--current]] | [--persistent]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
attach-disk domain source target [[[--live] [--config] |
[--current]] | [--persistent]] [--targetbus bus]
**Syntax:**
-.. code-block:: shell
+.. code-block::
attach-interface domain type source [[[--live]
[--config] | [--current]] | [--persistent]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
detach-device domain FILE [[[--live] [--config] |
[--current]] | [--persistent]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
detach-device-alias domain alias [[[--live] [--config] | [--current]]]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
detach-disk domain target [[[--live] [--config] |
[--current]] | [--persistent]] [--print-xml]
**Syntax:**
-.. code-block:: shell
+.. code-block::
detach-interface domain type [--mac mac]
[[[--live] [--config] | [--current]] | [--persistent]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
update-device domain file [--force] [[[--live]
[--config] | [--current]] | [--persistent]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
change-media domain path [--eject] [--insert]
[--update] [source] [--force] [[--live] [--config] |
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-create FILE
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-destroy device
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-detach nodedev [--driver backend_driver]
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-dumpxml device
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-list cap --tree
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-reattach nodedev
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-reset nodedev
**Syntax:**
-.. code-block:: shell
+.. code-block::
nodedev-event {[nodedev] event [--loop] [--timeout seconds] [--timestamp] | --list}
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-autostart network [--disable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-create file
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-define file
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-destroy network
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-dumpxml network [--inactive]
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-edit network
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh net-dumpxml --inactive network > network.xml
vi network.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-event {[network] event [--loop] [--timeout seconds] [--timestamp] | --list}
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-info network
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-list [--inactive | --all]
{ [--table] | --name | --uuid }
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-name network-UUID
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-start network
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-undefine network
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-uuid network-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-update network command section xml
[--parent-index index] [[--live] [--config] | [--current]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-dhcp-leases network [mac]
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-port-list { [--table] | --uuid } network
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-port-create network file
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-port-dumpxml network port
**Syntax:**
-.. code-block:: shell
+.. code-block::
net-port-delete network port
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-bridge interface bridge [--no-stp] [delay] [--no-start]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-define file
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-destroy interface
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-dumpxml interface [--inactive]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-edit interface
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh iface-dumpxml iface > iface.xml
vi iface.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-list [--inactive | --all]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-name interface
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-mac interface
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-start interface
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-unbridge bridge [--no-start]
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-undefine interface
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-begin
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-commit
**Syntax:**
-.. code-block:: shell
+.. code-block::
iface-rollback
**Syntax:**
-.. code-block:: shell
+.. code-block::
find-storage-pool-sources type [srcSpec]
**Syntax:**
-.. code-block:: shell
+.. code-block::
find-storage-pool-sources-as type [host] [port] [initiator]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-autostart pool-or-uuid [--disable]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-build pool-or-uuid [--overwrite] [--no-overwrite]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-create file [--build] [[--overwrite] | [--no-overwrite]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-create-as name type
[--source-host hostname] [--source-path path] [--source-dev path]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-define file
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-define-as name type
[--source-host hostname] [--source-path path] [--source-dev path]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-destroy pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-delete pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-dumpxml [--inactive] pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-edit pool-or-uuid
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh pool-dumpxml pool > pool.xml
vi pool.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-info [--bytes] pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-list [--inactive] [--all]
[--persistent] [--transient]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-name uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-refresh pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-start pool-or-uuid [--build] [[--overwrite] | [--no-overwrite]]
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-undefine pool-or-uuid
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-uuid pool
**Syntax:**
-.. code-block:: shell
+.. code-block::
pool-event {[pool] event [--loop] [--timeout seconds] [--timestamp] | --list}
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-create pool-or-uuid FILE [--prealloc-metadata]
**Example:**
-.. code-block:: shell
+.. code-block::
virsh vol-dumpxml --pool storagepool1 appvolume1 > newvolume.xml
vi newvolume.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-create-from pool-or-uuid FILE vol-name-or-key-or-path
[--inputpool pool-or-uuid] [--prealloc-metadata] [--reflink]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-create-as pool-or-uuid name capacity [--allocation size] [--format string]
[--backing-vol vol-name-or-key-or-path]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-clone vol-name-or-key-or-path name
[--pool pool-or-uuid] [--prealloc-metadata] [--reflink]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-delete vol-name-or-key-or-path [--pool pool-or-uuid] [--delete-snapshots]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-upload vol-name-or-key-or-path local-file
[--pool pool-or-uuid] [--offset bytes]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-download vol-name-or-key-or-path local-file
[--pool pool-or-uuid] [--offset bytes] [--length bytes]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-wipe vol-name-or-key-or-path [--pool pool-or-uuid] [--algorithm algorithm]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-dumpxml vol-name-or-key-or-path [--pool pool-or-uuid]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-info vol-name-or-key-or-path [--pool pool-or-uuid] [--bytes] [--physical]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-list [--pool pool-or-uuid] [--details]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-pool vol-key-or-path [--uuid]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-path vol-name-or-key [--pool pool-or-uuid]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-name vol-key-or-path
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-key vol-name-or-path [--pool pool-or-uuid]
**Syntax:**
-.. code-block:: shell
+.. code-block::
vol-resize vol-name-or-path capacity [--pool pool-or-uuid] [--allocate] [--delta] [--shrink]
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-define file
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-dumpxml secret
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-event {[secret] event [--loop] [--timeout seconds] [--timestamp] | --list}
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-set-value secret base64
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-get-value secret
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-undefine secret
**Syntax:**
-.. code-block:: shell
+.. code-block::
secret-list [--ephemeral] [--no-ephemeral]
[--private] [--no-private]
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-create domain [xmlfile] {[--redefine [--current]] |
[--no-metadata] [--halt] [--disk-only] [--reuse-external]
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-create-as domain {[--print-xml] [--no-metadata]
[--halt] [--reuse-external]} [name]
For example, a diskspec of "vda,snapshot=external,file=/path/to,,new"
results in the following XML:
-.. code-block:: xml
+.. code-block::
<disk name='vda' snapshot='external'>
<source file='/path/to,new'/>
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-current domain {[--name] | [--security-info] | [snapshotname]}
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-edit domain [snapshotname] [--current] {[--rename] | [--clone]}
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh snapshot-dumpxml dom name > snapshot.xml
vi snapshot.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-info domain {snapshot | --current}
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-list domain [--metadata] [--no-metadata]
[{--parent | --roots | [{--tree | --name}]}] [--topological]
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-dumpxml domain snapshot [--security-info]
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-parent domain {snapshot | --current}
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-revert domain {snapshot | --current} [{--running | --paused}] [--force]
**Syntax:**
-.. code-block:: shell
+.. code-block::
snapshot-delete domain {snapshot | --current}
[--metadata] [{--children | --children-only}]
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-create domain [xmlfile] { --redefine | [--quiesce]}
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-create-as domain [--print-xml] [name]
[description] [--quiesce] [--diskspec] diskspec]...
For example, a diskspec of "vda,checkpoint=bitmap,bitmap=map1"
results in the following XML:
-.. code-block:: xml
+.. code-block::
<disk name='vda' checkpoint='bitmap' bitmap='map1'/>
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-edit domain checkpointname
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh checkpoint-dumpxml dom name > checkpoint.xml
vi checkpoint.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-info domain checkpoint
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-list domain [{--parent | --roots |
[{--tree | --name}]}] [--topological]
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-dumpxml domain checkpoint [--security-info] [--no-domain] [--size]
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-parent domain checkpoint
**Syntax:**
-.. code-block:: shell
+.. code-block::
checkpoint-delete domain checkpoint
[--metadata] [{--children | --children-only}]
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-define xmlfile
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-undefine nwfilter-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-list
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-dumpxml nwfilter-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-edit nwfilter-name
This is equivalent to:
-.. code-block:: shell
+.. code-block::
virsh nwfilter-dumpxml myfilter > myfilter.xml
vi myfilter.xml (or make changes with your other text editor)
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-binding-create xmlfile
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-binding-delete port-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-binding-list
**Syntax:**
-.. code-block:: shell
+.. code-block::
nwfilter-binding-dumpxml port-name
**Syntax:**
-.. code-block:: shell
+.. code-block::
qemu-attach pid
using the UNIX driver. Ideally the process will also have had the
'-name' argument specified.
-.. code-block:: shell
+.. code-block::
$ qemu-kvm -cdrom ~/demo.iso \
-monitor unix:/tmp/demo,server,nowait \
**Syntax:**
-.. code-block:: shell
+.. code-block::
qemu-monitor-command domain { [--hmp] | [--pretty] } command...
**Syntax:**
-.. code-block:: shell
+.. code-block::
qemu-agent-command domain [--timeout seconds | --async | --block] command...
**Syntax:**
-.. code-block:: shell
+.. code-block::
qemu-monitor-event [domain] [--event event-name]
[--loop] [--timeout seconds] [--pretty] [--regex] [--no-case]
**Syntax:**
-.. code-block:: shell
+.. code-block::
lxc-enter-namespace domain [--noseclabel] --
/path/to/binary [arg1, [arg2, ...]]