[libvirt PATCH v2] docs: use "::" instead of ".. code-block::"
by Daniel P. Berrangé
The former is a short hand for the latter and is already widely used in
the docs. Using the short hand avoids incompatibility with the alternate
impl of rst2html5.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Changed in v2:
- Simplify to use "::" instead of adding a language to
".. code-block::" because the latter didn't work on macOS
builds due to problems with pygments integration in homebrew
docs/manpages/libvirtd.rst | 4 +-
docs/manpages/virsh.rst | 582 ++++++++++++++---------------
docs/manpages/virt-admin.rst | 52 +--
docs/manpages/virt-login-shell.rst | 8 +-
docs/manpages/virtlockd.rst | 4 +-
docs/manpages/virtlogd.rst | 4 +-
6 files changed, 327 insertions(+), 327 deletions(-)
diff --git a/docs/manpages/libvirtd.rst b/docs/manpages/libvirtd.rst
index c88e2dd7e1..cd9976c5e4 100644
--- a/docs/manpages/libvirtd.rst
+++ b/docs/manpages/libvirtd.rst
@@ -199,7 +199,7 @@ EXAMPLES
To retrieve the version of libvirtd:
-.. code-block::
+::
# libvirtd --version
libvirtd (libvirt) 0.8.2
@@ -207,7 +207,7 @@ To retrieve the version of libvirtd:
To start libvirtd, instructing it to daemonize and create a PID file:
-.. code-block::
+::
# libvirtd -d
# ls -la @RUNSTATEDIR(a)/libvirtd.pid
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 9ac379a4b8..c855269041 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -38,7 +38,7 @@ KVM, LXC, OpenVZ, VirtualBox and VMware ESX.
The basic structure of most virsh usage is:
-.. code-block::
+::
virsh [OPTION]... <command> <domain> [ARG]...
@@ -185,7 +185,7 @@ historical reasons, some commands default to bytes, while other
commands default to kibibytes). The following case-insensitive
suffixes can be used to select a specific scale:
-.. code-block::
+::
b, byte byte 1
KB kilobyte 1,000
@@ -214,7 +214,7 @@ help
**Syntax:**
-.. code-block::
+::
help [command-or-group]
@@ -228,7 +228,7 @@ group as an option. For example:
**Example 1:**
-.. code-block::
+::
virsh # help host
@@ -250,7 +250,7 @@ option instead. For example:
**Example 2:**
-.. code-block::
+::
virsh # help list
NAME
@@ -272,7 +272,7 @@ quit, exit
**Syntax:**
-.. code-block::
+::
quit
exit
@@ -286,7 +286,7 @@ version
**Syntax:**
-.. code-block::
+::
version [--daemon]
@@ -296,7 +296,7 @@ is included in the output.
**Example:**
-.. code-block::
+::
$ virsh version
Compiled against library: libvirt 1.2.3
@@ -317,7 +317,7 @@ cd
**Syntax:**
-.. code-block::
+::
cd [directory]
@@ -334,7 +334,7 @@ pwd
**Syntax:**
-.. code-block::
+::
pwd
@@ -347,7 +347,7 @@ connect
**Syntax:**
-.. code-block::
+::
connect [URI] [--readonly]
@@ -388,7 +388,7 @@ uri
**Syntax:**
-.. code-block::
+::
uri
@@ -400,7 +400,7 @@ hostname
**Syntax:**
-.. code-block::
+::
hostname
@@ -412,7 +412,7 @@ sysinfo
**Syntax:**
-.. code-block::
+::
sysinfo
@@ -424,7 +424,7 @@ nodeinfo
**Syntax:**
-.. code-block::
+::
nodeinfo
@@ -440,7 +440,7 @@ nodecpumap
**Syntax:**
-.. code-block::
+::
nodecpumap [--pretty]
@@ -456,7 +456,7 @@ nodecpustats
**Syntax:**
-.. code-block::
+::
nodecpustats [cpu] [--percent]
@@ -471,7 +471,7 @@ nodememstats
**Syntax:**
-.. code-block::
+::
nodememstats [cell]
@@ -484,7 +484,7 @@ nodesuspend
**Syntax:**
-.. code-block::
+::
nodesuspend [target] [duration]
@@ -503,7 +503,7 @@ node-memory-tune
**Syntax:**
-.. code-block::
+::
node-memory-tune [shm-pages-to-scan] [shm-sleep-millisecs] [shm-merge-across-nodes]
@@ -525,7 +525,7 @@ capabilities
**Syntax:**
-.. code-block::
+::
capabilities
@@ -545,7 +545,7 @@ domcapabilities
**Syntax:**
-.. code-block::
+::
domcapabilities [virttype] [emulatorbin] [arch] [machine]
@@ -588,7 +588,7 @@ pool-capabilities
**Syntax:**
-.. code-block::
+::
pool-capabilities
@@ -605,7 +605,7 @@ inject-nmi
**Syntax:**
-.. code-block::
+::
inject-nmi domain
@@ -617,7 +617,7 @@ list
**Syntax:**
-.. code-block::
+::
list [--inactive | --all]
[--managed-save] [--title]
@@ -637,7 +637,7 @@ specified it prints out information about running domains.
An example format for the list is as follows:
-.. code-block::
+::
``virsh`` list
Id Name State
@@ -775,7 +775,7 @@ printed in an extra column. This flag is usable only with the default
**Example 2:**
-.. code-block::
+::
$ virsh list --title
Id Name State Title
@@ -790,7 +790,7 @@ freecell
**Syntax:**
-.. code-block::
+::
freecell [{ [--cellno] cellno | --all }]
@@ -809,7 +809,7 @@ freepages
**Syntax:**
-.. code-block::
+::
freepages [{ [--cellno] cellno [--pagesize] pagesize | --all }]
@@ -824,7 +824,7 @@ allocpages
**Syntax:**
-.. code-block::
+::
allocpages [--pagesize] pagesize [--pagecount] pagecount [[--cellno] cellno] [--add] [--all]
@@ -843,7 +843,7 @@ cpu-baseline
**Syntax:**
-.. code-block::
+::
cpu-baseline FILE [--features] [--migratable]
@@ -864,7 +864,7 @@ cpu-compare
**Syntax:**
-.. code-block::
+::
cpu-compare FILE [--error]
@@ -890,7 +890,7 @@ cpu-models
**Syntax:**
-.. code-block::
+::
cpu-models arch
@@ -909,7 +909,7 @@ echo
**Syntax:**
-.. code-block::
+::
echo [--shell] [--xml] [err...] [arg...]
@@ -926,7 +926,7 @@ hypervisor-cpu-compare
**Syntax:**
-.. code-block::
+::
hypervisor-cpu-compare FILE [virttype] [emulator] [arch] [machine] [--error]
@@ -958,7 +958,7 @@ hypervisor-cpu-baseline
**Syntax:**
-.. code-block::
+::
hypervisor-cpu-baseline FILE [virttype] [emulator] [arch] [machine] [--features] [--migratable]
@@ -1005,7 +1005,7 @@ autostart
**Syntax:**
-.. code-block::
+::
autostart [--disable] domain
@@ -1020,7 +1020,7 @@ blkdeviotune
**Syntax:**
-.. code-block::
+::
blkdeviotune domain device [[--config] [--live] | [--current]]
[[total-bytes-sec] | [read-bytes-sec] [write-bytes-sec]]
@@ -1103,7 +1103,7 @@ blkiotune
**Syntax:**
-.. code-block::
+::
blkiotune domain [--weight weight] [--device-weights device-weights]
[--device-read-iops-sec device-read-iops-sec]
@@ -1165,7 +1165,7 @@ blockcommit
**Syntax:**
-.. code-block::
+::
blockcommit domain path [bandwidth] [--bytes] [base]
[--shallow] [top] [--delete] [--keep-relative]
@@ -1223,7 +1223,7 @@ blockcopy
**Syntax:**
-.. code-block::
+::
blockcopy domain path { dest [format] [--blockdev] | --xml file }
[--shallow] [--reuse-external] [bandwidth]
@@ -1295,7 +1295,7 @@ blockjob
**Syntax:**
-.. code-block::
+::
blockjob domain path { [--abort] [--async] [--pivot] |
[--info] [--raw] [--bytes] | [bandwidth] }
@@ -1345,7 +1345,7 @@ blockpull
**Syntax:**
-.. code-block::
+::
blockpull domain path [bandwidth] [--bytes] [base]
[--wait [--verbose] [--timeout seconds] [--async]]
@@ -1386,7 +1386,7 @@ blockresize
**Syntax:**
-.. code-block::
+::
blockresize domain path size
@@ -1407,7 +1407,7 @@ console
**Syntax:**
-.. code-block::
+::
console domain [devname] [--safe] [--force]
@@ -1428,7 +1428,7 @@ cpu-stats
**Syntax:**
-.. code-block::
+::
cpu-stats domain [--total] [start] [count]
@@ -1444,7 +1444,7 @@ create
**Syntax:**
-.. code-block::
+::
create FILE [--console] [--paused] [--autodestroy]
[--pass-fds N,M,...] [--validate]
@@ -1475,7 +1475,7 @@ is only supported with container based virtualization.
#. prepare a template from an existing domain (skip directly to 3a if writing
one from scratch)
- .. code-block::
+ ::
# virsh dumpxml <domain> > domain.xml
@@ -1484,7 +1484,7 @@ is only supported with container based virtualization.
a. DO CHANGE! <name> and <uuid> (<uuid> can also be removed), or
b. DON'T CHANGE! either <name> or <uuid>
- .. code-block::
+ ::
# $EDITOR domain.xml
@@ -1495,7 +1495,7 @@ is only supported with container based virtualization.
b. an existing persistent guest will run with a modified one-time
configuration
- .. code-block::
+ ::
# virsh create domain.xml
@@ -1505,7 +1505,7 @@ define
**Syntax:**
-.. code-block::
+::
define FILE [--validate]
@@ -1521,7 +1521,7 @@ desc
**Syntax:**
-.. code-block::
+::
desc domain [[--live] [--config] |
[--current]] [--title] [--edit] [--new-desc
@@ -1553,7 +1553,7 @@ destroy
**Syntax:**
-.. code-block::
+::
destroy domain [--graceful]
@@ -1581,7 +1581,7 @@ domblkerror
**Syntax:**
-.. code-block::
+::
domblkerror domain
@@ -1597,7 +1597,7 @@ domblkinfo
**Syntax:**
-.. code-block::
+::
domblkinfo domain [block-device --all] [--human]
@@ -1617,7 +1617,7 @@ domblklist
**Syntax:**
-.. code-block::
+::
domblklist domain [--inactive] [--details]
@@ -1637,7 +1637,7 @@ domblkstat
**Syntax:**
-.. code-block::
+::
domblkstat domain [block-device] [--human]
@@ -1674,7 +1674,7 @@ domblkthreshold
**Syntax:**
-.. code-block::
+::
domblkthreshold domain dev threshold
@@ -1689,7 +1689,7 @@ domcontrol
**Syntax:**
-.. code-block::
+::
domcontrol domain
@@ -1703,7 +1703,7 @@ domdisplay
**Syntax:**
-.. code-block::
+::
domdisplay domain [--include-password] [[--type] type] [--all]
@@ -1720,7 +1720,7 @@ domfsfreeze
**Syntax:**
-.. code-block::
+::
domfsfreeze domain [[--mountpoint] mountpoint...]
@@ -1742,7 +1742,7 @@ domfsinfo
**Syntax:**
-.. code-block::
+::
domfsinfo domain
@@ -1759,7 +1759,7 @@ domfsthaw
**Syntax:**
-.. code-block::
+::
domfsthaw domain [[--mountpoint] mountpoint...]
@@ -1776,7 +1776,7 @@ domfstrim
**Syntax:**
-.. code-block::
+::
domfstrim domain [--minimum bytes] [--mountpoint mountPoint]
@@ -1797,7 +1797,7 @@ domhostname
**Syntax:**
-.. code-block::
+::
domhostname domain [--source lease|agent]
@@ -1814,7 +1814,7 @@ domid
**Syntax:**
-.. code-block::
+::
domid domain-name-or-uuid
@@ -1826,7 +1826,7 @@ domif-getlink
**Syntax:**
-.. code-block::
+::
domif-getlink domain interface-device [--config]
@@ -1842,7 +1842,7 @@ domif-setlink
**Syntax:**
-.. code-block::
+::
domif-setlink domain interface-device state [--config]
@@ -1858,7 +1858,7 @@ domifaddr
**Syntax:**
-.. code-block::
+::
domifaddr domain [interface] [--full]
[--source lease|agent|arp]
@@ -1885,7 +1885,7 @@ backup-begin
**Syntax:**
-.. code-block::
+::
backup-begin domain [backupxml] [checkpointxml] [--reuse-external]
@@ -1919,7 +1919,7 @@ backup-dumpxml
**Syntax:**
-.. code-block::
+::
backup-dumpxml domain
@@ -1931,7 +1931,7 @@ domiflist
**Syntax:**
-.. code-block::
+::
domiflist domain [--inactive]
@@ -1948,7 +1948,7 @@ domifstat
**Syntax:**
-.. code-block::
+::
domifstat domain interface-device
@@ -1965,7 +1965,7 @@ domiftune
**Syntax:**
-.. code-block::
+::
domiftune domain interface-device [[--config] [--live] | [--current]]
[*--inbound average,peak,burst,floor*]
@@ -2000,7 +2000,7 @@ dominfo
**Syntax:**
-.. code-block::
+::
dominfo domain
@@ -2012,7 +2012,7 @@ domjobabort
**Syntax:**
-.. code-block::
+::
domjobabort domain
@@ -2024,7 +2024,7 @@ domjobinfo
**Syntax:**
-.. code-block::
+::
domjobinfo domain [--completed [--keep-completed]] [--anystats] [--rawstats]
@@ -2051,7 +2051,7 @@ dommemstat
**Syntax:**
-.. code-block::
+::
dommemstat domain [--period seconds] [[--config] [--live] | [--current]]
@@ -2106,7 +2106,7 @@ domname
**Syntax:**
-.. code-block::
+::
domname domain-id-or-uuid
@@ -2118,7 +2118,7 @@ dompmsuspend
**Syntax:**
-.. code-block::
+::
dompmsuspend domain target [--duration]
@@ -2149,7 +2149,7 @@ dompmwakeup
**Syntax:**
-.. code-block::
+::
dompmwakeup domain
@@ -2164,7 +2164,7 @@ domrename
**Syntax:**
-.. code-block::
+::
domrename domain new-name
@@ -2179,7 +2179,7 @@ domstate
**Syntax:**
-.. code-block::
+::
domstate domain [--reason]
@@ -2192,7 +2192,7 @@ domstats
**Syntax:**
-.. code-block::
+::
domstats [--raw] [--enforce] [--backing] [--nowait] [--state]
[--cpu-total] [--balloon] [--vcpu] [--interface]
@@ -2426,7 +2426,7 @@ domtime
**Syntax:**
-.. code-block::
+::
domtime domain { [--now] [--pretty] [--sync] [--time time] }
@@ -2451,7 +2451,7 @@ domuuid
**Syntax:**
-.. code-block::
+::
domuuid domain-name-or-id
@@ -2463,7 +2463,7 @@ domxml-from-native
**Syntax:**
-.. code-block::
+::
domxml-from-native format config
@@ -2481,7 +2481,7 @@ domxml-to-native
**Syntax:**
-.. code-block::
+::
domxml-to-native format { [--xml] xml | --domain domain-name-or-id-or-uuid }
@@ -2496,7 +2496,7 @@ dump
**Syntax:**
-.. code-block::
+::
dump domain corefilepath [--bypass-cache]
{ [--live] | [--crash] | [--reset] }
@@ -2538,7 +2538,7 @@ dumpxml
**Syntax:**
-.. code-block::
+::
dumpxml domain [--inactive] [--security-info] [--update-cpu] [--migratable]
@@ -2559,7 +2559,7 @@ edit
**Syntax:**
-.. code-block::
+::
edit domain
@@ -2568,7 +2568,7 @@ next boot of the guest.
This is equivalent to:
-.. code-block::
+::
virsh dumpxml --inactive --security-info domain > domain.xml
vi domain.xml (or make changes with your other text editor)
@@ -2585,7 +2585,7 @@ emulatorpin
**Syntax:**
-.. code-block::
+::
emulatorpin domain [cpulist] [[--live] [--config] | [--current]]
@@ -2608,7 +2608,7 @@ event
**Syntax:**
-.. code-block::
+::
event {[domain] { event | --all } [--loop] [--timeout seconds] [--timestamp] | --list}
@@ -2635,7 +2635,7 @@ guest-agent-timeout
**Syntax:**
-.. code-block::
+::
guest-agent-timeout domain [--timeout value]
@@ -2655,7 +2655,7 @@ guestinfo
**Syntax:**
-.. code-block::
+::
guestinfo domain [--user] [--os] [--timezone] [--hostname] [--filesystem]
@@ -2731,7 +2731,7 @@ guestvcpus
**Syntax:**
-.. code-block::
+::
guestvcpus domain [[--enable] | [--disable]] [cpulist]
@@ -2750,7 +2750,7 @@ iothreadadd
**Syntax:**
-.. code-block::
+::
iothreadadd domain iothread_id [[--config] [--live] | [--current]]
@@ -2770,7 +2770,7 @@ iothreaddel
**Syntax:**
-.. code-block::
+::
iothreaddel domain iothread_id [[--config] [--live] | [--current]]
@@ -2792,7 +2792,7 @@ iothreadinfo
**Syntax:**
-.. code-block::
+::
iothreadinfo domain [[--live] [--config] | [--current]]
@@ -2813,7 +2813,7 @@ iothreadpin
**Syntax:**
-.. code-block::
+::
iothreadpin domain iothread cpulist [[--live] [--config] | [--current]]
@@ -2846,7 +2846,7 @@ iothreadset
**Syntax:**
-.. code-block::
+::
iothreadset domain iothread_id [[--poll-max-ns ns] [--poll-grow factor]
[--poll-shrink divisor]]
@@ -2878,7 +2878,7 @@ managedsave
**Syntax:**
-.. code-block::
+::
managedsave domain [--bypass-cache] [{--running | --paused}] [--verbose]
@@ -2907,7 +2907,7 @@ managedsave-define
**Syntax:**
-.. code-block::
+::
managedsave-define domain xml [{--running | --paused}]
@@ -2927,7 +2927,7 @@ managedsave-dumpxml
**Syntax:**
-.. code-block::
+::
managedsave-dumpxml domain [--security-info]
@@ -2941,7 +2941,7 @@ managedsave-edit
**Syntax:**
-.. code-block::
+::
managedsave-edit domain [{--running | --paused}]
@@ -2955,7 +2955,7 @@ will allow overriding which state the ``restore`` should use.
This is equivalent to:
-.. code-block::
+::
virsh managedsave-dumpxml domain-name > state-file.xml
vi state-file.xml (or make changes with your other text editor)
@@ -2972,7 +2972,7 @@ managedsave-remove
**Syntax:**
-.. code-block::
+::
managedsave-remove domain
@@ -2985,7 +2985,7 @@ maxvcpus
**Syntax:**
-.. code-block::
+::
maxvcpus [type]
@@ -2999,7 +2999,7 @@ memtune
**Syntax:**
-.. code-block::
+::
memtune domain [--hard-limit size] [--soft-limit size] [--swap-hard-limit size]
[--min-guarantee size] [[--config] [--live] | [--current]]
@@ -3058,7 +3058,7 @@ metadata
**Syntax:**
-.. code-block::
+::
metadata domain [[--live] [--config] | [--current]]
[--edit] [uri] [key] [set] [--remove]
@@ -3097,7 +3097,7 @@ migrate
**Syntax:**
-.. code-block::
+::
migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]]
[--persistent] [--undefinesource] [--suspend] [--copy-storage-all]
@@ -3240,7 +3240,7 @@ and/or libvirt does not have network access to the remote side you can use a
UNIX transport in the URI and specify a socket path in the query, for example
with the qemu driver you could use this:
-.. code-block::
+::
qemu+unix:///system?socket=/path/to/socket
@@ -3274,7 +3274,7 @@ There are a few scenarios where specifying *migrateuri* may help:
should not guess a *migrateuri* and it should be specified using
UNIX socket path URI:
-.. code-block::
+::
unix:///path/to/socket
@@ -3289,7 +3289,7 @@ connected to and needs to connect through a proxy, *graphicsuri* may be used
to specify the address the client should connect to. The URI is formed as
follows:
-.. code-block::
+::
protocol://hostname[:port]/[?parameters]
@@ -3297,7 +3297,7 @@ where protocol is either "spice" or "vnc" and parameters is a list of protocol
specific parameters separated by '&'. Currently recognized parameters are
"tlsPort" and "tlsSubject". For example,
-.. code-block::
+::
spice://target.host.com:1234/?tlsPort=4567
@@ -3327,7 +3327,7 @@ migrate-compcache
**Syntax:**
-.. code-block::
+::
migrate-compcache domain [--size bytes]
@@ -3347,7 +3347,7 @@ migrate-getmaxdowntime
**Syntax:**
-.. code-block::
+::
migrate-getmaxdowntime domain
@@ -3362,7 +3362,7 @@ migrate-getspeed
**Syntax:**
-.. code-block::
+::
migrate-getspeed domain [--postcopy]
@@ -3376,7 +3376,7 @@ migrate-postcopy
**Syntax:**
-.. code-block::
+::
migrate-postcopy domain
@@ -3389,7 +3389,7 @@ migrate-setmaxdowntime
**Syntax:**
-.. code-block::
+::
migrate-setmaxdowntime domain downtime
@@ -3403,7 +3403,7 @@ migrate-setspeed
**Syntax:**
-.. code-block::
+::
migrate-setspeed domain bandwidth [--postcopy]
@@ -3421,7 +3421,7 @@ numatune
**Syntax:**
-.. code-block::
+::
numatune domain [--mode mode] [--nodeset nodeset]
[[--config] [--live] | [--current]]
@@ -3459,7 +3459,7 @@ perf
**Syntax:**
-.. code-block::
+::
perf domain [--enable eventSpec] [--disable eventSpec]
[[--config] [--live] | [--current]]
@@ -3548,7 +3548,7 @@ reboot
**Syntax:**
-.. code-block::
+::
reboot domain [--mode MODE-LIST]
@@ -3574,7 +3574,7 @@ reset
**Syntax:**
-.. code-block::
+::
reset domain
@@ -3590,7 +3590,7 @@ restore
**Syntax:**
-.. code-block::
+::
restore state-file [--bypass-cache] [--xml file]
[{--running | --paused}]
@@ -3622,7 +3622,7 @@ resume
**Syntax:**
-.. code-block::
+::
resume domain
@@ -3636,7 +3636,7 @@ save
**Syntax:**
-.. code-block::
+::
save domain state-file [--bypass-cache] [--xml file]
[{--running | --paused}] [--verbose]
@@ -3680,7 +3680,7 @@ save-image-define
**Syntax:**
-.. code-block::
+::
save-image-define file xml [{--running | --paused}]
@@ -3702,7 +3702,7 @@ save-image-dumpxml
**Syntax:**
-.. code-block::
+::
save-image-dumpxml file [--security-info]
@@ -3716,7 +3716,7 @@ save-image-edit
**Syntax:**
-.. code-block::
+::
save-image-edit file [{--running | --paused}]
@@ -3730,7 +3730,7 @@ will allow overriding which state the ``restore`` should use.
This is equivalent to:
-.. code-block::
+::
virsh save-image-dumpxml state-file > state-file.xml
vi state-file.xml (or make changes with your other text editor)
@@ -3747,7 +3747,7 @@ schedinfo
**Syntax:**
-.. code-block::
+::
schedinfo domain [[--config] [--live] | [--current]] [[--set] parameter=value]...
schedinfo [--weight number] [--cap number] domain
@@ -3790,7 +3790,7 @@ screenshot
**Syntax:**
-.. code-block::
+::
screenshot domain [imagefilepath] [--screen screenID]
@@ -3807,7 +3807,7 @@ send-key
**Syntax:**
-.. code-block::
+::
send-key domain [--codeset codeset] [--holdtime holdtime] keycode...
@@ -3904,7 +3904,7 @@ distinct keypresses, you must use multiple send-key invocations.
**Examples:**
-.. code-block::
+::
# send three strokes 'k', 'e', 'y', using xt codeset. these
# are all pressed simultaneously and may be received by the guest
@@ -3924,7 +3924,7 @@ send-process-signal
**Syntax:**
-.. code-block::
+::
send-process-signal domain-id pid signame
@@ -3935,7 +3935,7 @@ domain namespace.
The *signame* argument may be either an integer signal constant number,
or one of the symbolic names:
-.. code-block::
+::
"nop", "hup", "int", "quit", "ill",
"trap", "abrt", "bus", "fpe", "kill",
@@ -3955,7 +3955,7 @@ may be in uppercase or lowercase.
**Examples:**
-.. code-block::
+::
virsh send-process-signal myguest 1 15
virsh send-process-signal myguest 1 term
@@ -3968,7 +3968,7 @@ set-lifecycle-action
**Syntax:**
-.. code-block::
+::
set-lifecycle-action domain type action
[[--config] [--live] | [--current]]
@@ -3985,7 +3985,7 @@ set-user-password
**Syntax:**
-.. code-block::
+::
set-user-password domain user password [--encrypted]
@@ -4003,7 +4003,7 @@ setmaxmem
**Syntax:**
-.. code-block::
+::
setmaxmem domain size [[--config] [--live] | [--current]]
@@ -4035,7 +4035,7 @@ setmem
**Syntax:**
-.. code-block::
+::
setmem domain size [[--config] [--live] | [--current]]
@@ -4071,7 +4071,7 @@ setvcpus
**Syntax:**
-.. code-block::
+::
setvcpus domain count [--maximum] [[--config] [--live] | [--current]] [--guest] [--hotpluggable]
@@ -4123,7 +4123,7 @@ setvcpu
**Syntax:**
-.. code-block::
+::
setvcpu domain vcpulist [--enable] | [--disable]
[[--live] [--config] | [--current]]
@@ -4151,7 +4151,7 @@ shutdown
**Syntax:**
-.. code-block::
+::
shutdown domain [--mode MODE-LIST]
@@ -4183,7 +4183,7 @@ start
**Syntax:**
-.. code-block::
+::
start domain-name-or-uuid [--console] [--paused]
[--autodestroy] [--bypass-cache] [--force-boot]
@@ -4212,7 +4212,7 @@ suspend
**Syntax:**
-.. code-block::
+::
suspend domain
@@ -4225,7 +4225,7 @@ ttyconsole
**Syntax:**
-.. code-block::
+::
ttyconsole domain
@@ -4238,7 +4238,7 @@ undefine
**Syntax:**
-.. code-block::
+::
undefine domain [--managed-save] [--snapshots-metadata]
[--checkpoints-metadata] [--nvram] [--keep-nvram]
@@ -4304,7 +4304,7 @@ vcpucount
**Syntax:**
-.. code-block::
+::
vcpucount domain [{--maximum | --active}
{--config | --live | --current}] [--guest]
@@ -4335,7 +4335,7 @@ vcpuinfo
**Syntax:**
-.. code-block::
+::
vcpuinfo domain [--pretty]
@@ -4346,7 +4346,7 @@ With *--pretty*, cpu affinities are shown as ranges.
**Example:**
-.. code-block::
+::
$ virsh vcpuinfo fedora
VCPU: 0
@@ -4399,7 +4399,7 @@ vcpupin
**Syntax:**
-.. code-block::
+::
vcpupin domain [vcpu] [cpulist] [[--live] [--config] | [--current]]
@@ -4428,7 +4428,7 @@ vncdisplay
**Syntax:**
-.. code-block::
+::
vncdisplay domain
@@ -4451,7 +4451,7 @@ attach-device
**Syntax:**
-.. code-block::
+::
attach-device domain FILE [[[--live] [--config] | [--current]] | [--persistent]]
@@ -4488,7 +4488,7 @@ attach-disk
**Syntax:**
-.. code-block::
+::
attach-disk domain source target [[[--live] [--config] |
[--current]] | [--persistent]] [--targetbus bus]
@@ -4556,7 +4556,7 @@ attach-interface
**Syntax:**
-.. code-block::
+::
attach-interface domain type source [[[--live]
[--config] | [--current]] | [--persistent]]
@@ -4648,7 +4648,7 @@ detach-device
**Syntax:**
-.. code-block::
+::
detach-device domain FILE [[[--live] [--config] |
[--current]] | [--persistent]]
@@ -4695,7 +4695,7 @@ detach-device-alias
**Syntax:**
-.. code-block::
+::
detach-device-alias domain alias [[[--live] [--config] | [--current]]]]
@@ -4717,7 +4717,7 @@ detach-disk
**Syntax:**
-.. code-block::
+::
detach-disk domain target [[[--live] [--config] |
[--current]] | [--persistent]] [--print-xml]
@@ -4751,7 +4751,7 @@ detach-interface
**Syntax:**
-.. code-block::
+::
detach-interface domain type [--mac mac]
[[[--live] [--config] | [--current]] | [--persistent]]
@@ -4784,7 +4784,7 @@ update-device
**Syntax:**
-.. code-block::
+::
update-device domain file [--force] [[[--live]
[--config] | [--current]] | [--persistent]]
@@ -4819,7 +4819,7 @@ change-media
**Syntax:**
-.. code-block::
+::
change-media domain path [--eject] [--insert]
[--update] [source] [--force] [[--live] [--config] |
@@ -4889,7 +4889,7 @@ nodedev-create
**Syntax:**
-.. code-block::
+::
nodedev-create FILE
@@ -4905,7 +4905,7 @@ nodedev-destroy
**Syntax:**
-.. code-block::
+::
nodedev-destroy device
@@ -4920,7 +4920,7 @@ nodedev-detach
**Syntax:**
-.. code-block::
+::
nodedev-detach nodedev [--driver backend_driver]
@@ -4940,7 +4940,7 @@ nodedev-dumpxml
**Syntax:**
-.. code-block::
+::
nodedev-dumpxml device
@@ -4957,7 +4957,7 @@ nodedev-list
**Syntax:**
-.. code-block::
+::
nodedev-list cap --tree
@@ -4976,7 +4976,7 @@ nodedev-reattach
**Syntax:**
-.. code-block::
+::
nodedev-reattach nodedev
@@ -4991,7 +4991,7 @@ nodedev-reset
**Syntax:**
-.. code-block::
+::
nodedev-reset nodedev
@@ -5006,7 +5006,7 @@ nodedev-event
**Syntax:**
-.. code-block::
+::
nodedev-event {[nodedev] event [--loop] [--timeout seconds] [--timestamp] | --list}
@@ -5042,7 +5042,7 @@ net-autostart
**Syntax:**
-.. code-block::
+::
net-autostart network [--disable]
@@ -5055,7 +5055,7 @@ net-create
**Syntax:**
-.. code-block::
+::
net-create file
@@ -5070,7 +5070,7 @@ net-define
**Syntax:**
-.. code-block::
+::
net-define file
@@ -5083,7 +5083,7 @@ net-destroy
**Syntax:**
-.. code-block::
+::
net-destroy network
@@ -5096,7 +5096,7 @@ net-dumpxml
**Syntax:**
-.. code-block::
+::
net-dumpxml network [--inactive]
@@ -5111,7 +5111,7 @@ net-edit
**Syntax:**
-.. code-block::
+::
net-edit network
@@ -5119,7 +5119,7 @@ Edit the XML configuration file for a network.
This is equivalent to:
-.. code-block::
+::
virsh net-dumpxml --inactive network > network.xml
vi network.xml (or make changes with your other text editor)
@@ -5136,7 +5136,7 @@ net-event
**Syntax:**
-.. code-block::
+::
net-event {[network] event [--loop] [--timeout seconds] [--timestamp] | --list}
@@ -5161,7 +5161,7 @@ net-info
**Syntax:**
-.. code-block::
+::
net-info network
@@ -5173,7 +5173,7 @@ net-list
**Syntax:**
-.. code-block::
+::
net-list [--inactive | --all]
{ [--table] | --name | --uuid }
@@ -5204,7 +5204,7 @@ net-name
**Syntax:**
-.. code-block::
+::
net-name network-UUID
@@ -5216,7 +5216,7 @@ net-start
**Syntax:**
-.. code-block::
+::
net-start network
@@ -5228,7 +5228,7 @@ net-undefine
**Syntax:**
-.. code-block::
+::
net-undefine network
@@ -5241,7 +5241,7 @@ net-uuid
**Syntax:**
-.. code-block::
+::
net-uuid network-name
@@ -5253,7 +5253,7 @@ net-update
**Syntax:**
-.. code-block::
+::
net-update network command section xml
[--parent-index index] [[--live] [--config] | [--current]]
@@ -5301,7 +5301,7 @@ net-dhcp-leases
**Syntax:**
-.. code-block::
+::
net-dhcp-leases network [mac]
@@ -5326,7 +5326,7 @@ net-port-list
**Syntax:**
-.. code-block::
+::
net-port-list { [--table] | --uuid } network
@@ -5343,7 +5343,7 @@ net-port-create
**Syntax:**
-.. code-block::
+::
net-port-create network file
@@ -5356,7 +5356,7 @@ net-port-dumpxml
**Syntax:**
-.. code-block::
+::
net-port-dumpxml network port
@@ -5368,7 +5368,7 @@ net-port-delete
**Syntax:**
-.. code-block::
+::
net-port-delete network port
@@ -5397,7 +5397,7 @@ iface-bridge
**Syntax:**
-.. code-block::
+::
iface-bridge interface bridge [--no-stp] [delay] [--no-start]
@@ -5416,7 +5416,7 @@ iface-define
**Syntax:**
-.. code-block::
+::
iface-define file
@@ -5429,7 +5429,7 @@ iface-destroy
**Syntax:**
-.. code-block::
+::
iface-destroy interface
@@ -5442,7 +5442,7 @@ iface-dumpxml
**Syntax:**
-.. code-block::
+::
iface-dumpxml interface [--inactive]
@@ -5456,7 +5456,7 @@ iface-edit
**Syntax:**
-.. code-block::
+::
iface-edit interface
@@ -5464,7 +5464,7 @@ Edit the XML configuration file for a host interface.
This is equivalent to:
-.. code-block::
+::
virsh iface-dumpxml iface > iface.xml
vi iface.xml (or make changes with your other text editor)
@@ -5481,7 +5481,7 @@ iface-list
**Syntax:**
-.. code-block::
+::
iface-list [--inactive | --all]
@@ -5495,7 +5495,7 @@ iface-name
**Syntax:**
-.. code-block::
+::
iface-name interface
@@ -5510,7 +5510,7 @@ iface-mac
**Syntax:**
-.. code-block::
+::
iface-mac interface
@@ -5524,7 +5524,7 @@ iface-start
**Syntax:**
-.. code-block::
+::
iface-start interface
@@ -5536,7 +5536,7 @@ iface-unbridge
**Syntax:**
-.. code-block::
+::
iface-unbridge bridge [--no-start]
@@ -5554,7 +5554,7 @@ iface-undefine
**Syntax:**
-.. code-block::
+::
iface-undefine interface
@@ -5566,7 +5566,7 @@ iface-begin
**Syntax:**
-.. code-block::
+::
iface-begin
@@ -5584,7 +5584,7 @@ iface-commit
**Syntax:**
-.. code-block::
+::
iface-commit
@@ -5598,7 +5598,7 @@ iface-rollback
**Syntax:**
-.. code-block::
+::
iface-rollback
@@ -5624,7 +5624,7 @@ find-storage-pool-sources
**Syntax:**
-.. code-block::
+::
find-storage-pool-sources type [srcSpec]
@@ -5662,7 +5662,7 @@ find-pool-sources-as
**Syntax:**
-.. code-block::
+::
find-storage-pool-sources-as type [host] [port] [initiator]
@@ -5686,7 +5686,7 @@ pool-autostart
**Syntax:**
-.. code-block::
+::
pool-autostart pool-or-uuid [--disable]
@@ -5698,7 +5698,7 @@ pool-build
**Syntax:**
-.. code-block::
+::
pool-build pool-or-uuid [--overwrite] [--no-overwrite]
@@ -5740,7 +5740,7 @@ pool-create
**Syntax:**
-.. code-block::
+::
pool-create file [--build] [[--overwrite] | [--no-overwrite]]
@@ -5758,7 +5758,7 @@ pool-create-as
**Syntax:**
-.. code-block::
+::
pool-create-as name type
[--source-host hostname] [--source-path path] [--source-dev path]
@@ -5848,7 +5848,7 @@ pool-define
**Syntax:**
-.. code-block::
+::
pool-define file
@@ -5861,7 +5861,7 @@ pool-define-as
**Syntax:**
-.. code-block::
+::
pool-define-as name type
[--source-host hostname] [--source-path path] [--source-dev path]
@@ -5887,7 +5887,7 @@ pool-destroy
**Syntax:**
-.. code-block::
+::
pool-destroy pool-or-uuid
@@ -5902,7 +5902,7 @@ pool-delete
**Syntax:**
-.. code-block::
+::
pool-delete pool-or-uuid
@@ -5916,7 +5916,7 @@ pool-dumpxml
**Syntax:**
-.. code-block::
+::
pool-dumpxml [--inactive] pool-or-uuid
@@ -5930,7 +5930,7 @@ pool-edit
**Syntax:**
-.. code-block::
+::
pool-edit pool-or-uuid
@@ -5938,7 +5938,7 @@ Edit the XML configuration file for a storage pool.
This is equivalent to:
-.. code-block::
+::
virsh pool-dumpxml pool > pool.xml
vi pool.xml (or make changes with your other text editor)
@@ -5955,7 +5955,7 @@ pool-info
**Syntax:**
-.. code-block::
+::
pool-info [--bytes] pool-or-uuid
@@ -5968,7 +5968,7 @@ pool-list
**Syntax:**
-.. code-block::
+::
pool-list [--inactive] [--all]
[--persistent] [--transient]
@@ -6008,7 +6008,7 @@ pool-name
**Syntax:**
-.. code-block::
+::
pool-name uuid
@@ -6020,7 +6020,7 @@ pool-refresh
**Syntax:**
-.. code-block::
+::
pool-refresh pool-or-uuid
@@ -6032,7 +6032,7 @@ pool-start
**Syntax:**
-.. code-block::
+::
pool-start pool-or-uuid [--build] [[--overwrite] | [--no-overwrite]]
@@ -6060,7 +6060,7 @@ pool-undefine
**Syntax:**
-.. code-block::
+::
pool-undefine pool-or-uuid
@@ -6072,7 +6072,7 @@ pool-uuid
**Syntax:**
-.. code-block::
+::
pool-uuid pool
@@ -6084,7 +6084,7 @@ pool-event
**Syntax:**
-.. code-block::
+::
pool-event {[pool] event [--loop] [--timeout seconds] [--timestamp] | --list}
@@ -6112,7 +6112,7 @@ vol-create
**Syntax:**
-.. code-block::
+::
vol-create pool-or-uuid FILE [--prealloc-metadata]
@@ -6131,7 +6131,7 @@ only slightly higher initial disk space usage.
**Example:**
-.. code-block::
+::
virsh vol-dumpxml --pool storagepool1 appvolume1 > newvolume.xml
vi newvolume.xml (or make changes with your other text editor)
@@ -6143,7 +6143,7 @@ vol-create-from
**Syntax:**
-.. code-block::
+::
vol-create-from pool-or-uuid FILE vol-name-or-key-or-path
[--inputpool pool-or-uuid] [--prealloc-metadata] [--reflink]
@@ -6174,7 +6174,7 @@ vol-create-as
**Syntax:**
-.. code-block::
+::
vol-create-as pool-or-uuid name capacity [--allocation size] [--format string]
[--backing-vol vol-name-or-key-or-path]
@@ -6223,7 +6223,7 @@ vol-clone
**Syntax:**
-.. code-block::
+::
vol-clone vol-name-or-key-or-path name
[--pool pool-or-uuid] [--prealloc-metadata] [--reflink]
@@ -6256,7 +6256,7 @@ vol-delete
**Syntax:**
-.. code-block::
+::
vol-delete vol-name-or-key-or-path [--pool pool-or-uuid] [--delete-snapshots]
@@ -6280,7 +6280,7 @@ vol-upload
**Syntax:**
-.. code-block::
+::
vol-upload vol-name-or-key-or-path local-file
[--pool pool-or-uuid] [--offset bytes]
@@ -6318,7 +6318,7 @@ vol-download
**Syntax:**
-.. code-block::
+::
vol-download vol-name-or-key-or-path local-file
[--pool pool-or-uuid] [--offset bytes] [--length bytes]
@@ -6349,7 +6349,7 @@ vol-wipe
**Syntax:**
-.. code-block::
+::
vol-wipe vol-name-or-key-or-path [--pool pool-or-uuid] [--algorithm algorithm]
@@ -6408,7 +6408,7 @@ vol-dumpxml
**Syntax:**
-.. code-block::
+::
vol-dumpxml vol-name-or-key-or-path [--pool pool-or-uuid]
@@ -6428,7 +6428,7 @@ vol-info
**Syntax:**
-.. code-block::
+::
vol-info vol-name-or-key-or-path [--pool pool-or-uuid] [--bytes] [--physical]
@@ -6457,7 +6457,7 @@ vol-list
**Syntax:**
-.. code-block::
+::
vol-list [--pool pool-or-uuid] [--details]
@@ -6474,7 +6474,7 @@ vol-pool
**Syntax:**
-.. code-block::
+::
vol-pool vol-key-or-path [--uuid]
@@ -6492,7 +6492,7 @@ vol-path
**Syntax:**
-.. code-block::
+::
vol-path vol-name-or-key [--pool pool-or-uuid]
@@ -6511,7 +6511,7 @@ vol-name
**Syntax:**
-.. code-block::
+::
vol-name vol-key-or-path
@@ -6525,7 +6525,7 @@ vol-key
**Syntax:**
-.. code-block::
+::
vol-key vol-name-or-path [--pool pool-or-uuid]
@@ -6545,7 +6545,7 @@ vol-resize
**Syntax:**
-.. code-block::
+::
vol-resize vol-name-or-path capacity [--pool pool-or-uuid] [--allocate] [--delta] [--shrink]
@@ -6590,7 +6590,7 @@ secret-define
**Syntax:**
-.. code-block::
+::
secret-define file
@@ -6605,7 +6605,7 @@ secret-dumpxml
**Syntax:**
-.. code-block::
+::
secret-dumpxml secret
@@ -6617,7 +6617,7 @@ secret-event
**Syntax:**
-.. code-block::
+::
secret-event {[secret] event [--loop] [--timeout seconds] [--timestamp] | --list}
@@ -6642,7 +6642,7 @@ secret-set-value
**Syntax:**
-.. code-block::
+::
secret-set-value secret (--file filename [--plain] | --interactive | base64)
@@ -6665,7 +6665,7 @@ secret-get-value
**Syntax:**
-.. code-block::
+::
secret-get-value [--plain] secret
@@ -6682,7 +6682,7 @@ secret-undefine
**Syntax:**
-.. code-block::
+::
secret-undefine secret
@@ -6696,7 +6696,7 @@ secret-list
**Syntax:**
-.. code-block::
+::
secret-list [--ephemeral] [--no-ephemeral]
[--private] [--no-private]
@@ -6723,7 +6723,7 @@ snapshot-create
**Syntax:**
-.. code-block::
+::
snapshot-create domain [xmlfile] {[--redefine [--current]] |
[--no-metadata] [--halt] [--disk-only] [--reuse-external]
@@ -6804,7 +6804,7 @@ snapshot-create-as
**Syntax:**
-.. code-block::
+::
snapshot-create-as domain {[--print-xml] [--no-metadata]
[--halt] [--reuse-external]} [name]
@@ -6843,7 +6843,7 @@ all three of *domain*, *name*, and *description* are also present.
For example, a diskspec of "vda,snapshot=external,file=/path/to,,new"
results in the following XML:
-.. code-block::
+::
<disk name='vda' snapshot='external'>
<source file='/path/to,new'/>
@@ -6886,7 +6886,7 @@ snapshot-current
**Syntax:**
-.. code-block::
+::
snapshot-current domain {[--name] | [--security-info] | [snapshotname]}
@@ -6905,7 +6905,7 @@ snapshot-edit
**Syntax:**
-.. code-block::
+::
snapshot-edit domain [snapshotname] [--current] {[--rename] | [--clone]}
@@ -6917,7 +6917,7 @@ snapshot.
This is equivalent to:
-.. code-block::
+::
virsh snapshot-dumpxml dom name > snapshot.xml
vi snapshot.xml (or make changes with your other text editor)
@@ -6942,7 +6942,7 @@ snapshot-info
**Syntax:**
-.. code-block::
+::
snapshot-info domain {snapshot | --current}
@@ -6955,7 +6955,7 @@ snapshot-list
**Syntax:**
-.. code-block::
+::
snapshot-list domain [--metadata] [--no-metadata]
[{--parent | --roots | [{--tree | --name}]}] [--topological]
@@ -7024,7 +7024,7 @@ snapshot-dumpxml
**Syntax:**
-.. code-block::
+::
snapshot-dumpxml domain snapshot [--security-info]
@@ -7038,7 +7038,7 @@ snapshot-parent
**Syntax:**
-.. code-block::
+::
snapshot-parent domain {snapshot | --current}
@@ -7051,7 +7051,7 @@ snapshot-revert
**Syntax:**
-.. code-block::
+::
snapshot-revert domain {snapshot | --current} [{--running | --paused}] [--force]
@@ -7101,7 +7101,7 @@ snapshot-delete
**Syntax:**
-.. code-block::
+::
snapshot-delete domain {snapshot | --current}
[--metadata] [{--children | --children-only}]
@@ -7135,7 +7135,7 @@ checkpoint-create
**Syntax:**
-.. code-block::
+::
checkpoint-create domain [xmlfile] { --redefine | [--quiesce]}
@@ -7174,7 +7174,7 @@ checkpoint-create-as
**Syntax:**
-.. code-block::
+::
checkpoint-create-as domain [--print-xml] [name]
[description] [--quiesce] [--diskspec] diskspec]...
@@ -7194,7 +7194,7 @@ all three of *domain*, *name*, and *description* are also present.
For example, a diskspec of "vda,checkpoint=bitmap,bitmap=map1"
results in the following XML:
-.. code-block::
+::
<disk name='vda' checkpoint='bitmap' bitmap='map1'/>
@@ -7212,7 +7212,7 @@ checkpoint-edit
**Syntax:**
-.. code-block::
+::
checkpoint-edit domain checkpointname
@@ -7220,7 +7220,7 @@ Edit the XML configuration file for *checkpointname* of a domain.
This is equivalent to:
-.. code-block::
+::
virsh checkpoint-dumpxml dom name > checkpoint.xml
vi checkpoint.xml (or make changes with your other text editor)
@@ -7238,7 +7238,7 @@ checkpoint-info
**Syntax:**
-.. code-block::
+::
checkpoint-info domain checkpoint
@@ -7250,7 +7250,7 @@ checkpoint-list
**Syntax:**
-.. code-block::
+::
checkpoint-list domain [{--parent | --roots |
[{--tree | --name}]}] [--topological]
@@ -7296,7 +7296,7 @@ checkpoint-dumpxml
**Syntax:**
-.. code-block::
+::
checkpoint-dumpxml domain checkpoint [--security-info] [--no-domain] [--size]
@@ -7316,7 +7316,7 @@ checkpoint-parent
**Syntax:**
-.. code-block::
+::
checkpoint-parent domain checkpoint
@@ -7328,7 +7328,7 @@ checkpoint-delete
**Syntax:**
-.. code-block::
+::
checkpoint-delete domain checkpoint
[--metadata] [{--children | --children-only}]
@@ -7365,7 +7365,7 @@ nwfilter-define
**Syntax:**
-.. code-block::
+::
nwfilter-define xmlfile
@@ -7382,7 +7382,7 @@ nwfilter-undefine
**Syntax:**
-.. code-block::
+::
nwfilter-undefine nwfilter-name
@@ -7395,7 +7395,7 @@ nwfilter-list
**Syntax:**
-.. code-block::
+::
nwfilter-list
@@ -7407,7 +7407,7 @@ nwfilter-dumpxml
**Syntax:**
-.. code-block::
+::
nwfilter-dumpxml nwfilter-name
@@ -7419,7 +7419,7 @@ nwfilter-edit
**Syntax:**
-.. code-block::
+::
nwfilter-edit nwfilter-name
@@ -7427,7 +7427,7 @@ Edit the XML of a network filter.
This is equivalent to:
-.. code-block::
+::
virsh nwfilter-dumpxml myfilter > myfilter.xml
vi myfilter.xml (or make changes with your other text editor)
@@ -7458,7 +7458,7 @@ nwfilter-binding-create
**Syntax:**
-.. code-block::
+::
nwfilter-binding-create xmlfile
@@ -7477,7 +7477,7 @@ nwfilter-binding-delete
**Syntax:**
-.. code-block::
+::
nwfilter-binding-delete port-name
@@ -7495,7 +7495,7 @@ nwfilter-binding-list
**Syntax:**
-.. code-block::
+::
nwfilter-binding-list
@@ -7507,7 +7507,7 @@ nwfilter-binding-dumpxml
**Syntax:**
-.. code-block::
+::
nwfilter-binding-dumpxml port-name
@@ -7531,7 +7531,7 @@ qemu-attach
**Syntax:**
-.. code-block::
+::
qemu-attach pid
@@ -7540,7 +7540,7 @@ The QEMU process must have been created with a monitor connection
using the UNIX driver. Ideally the process will also have had the
'-name' argument specified.
-.. code-block::
+::
$ qemu-kvm -cdrom ~/demo.iso \
-monitor unix:/tmp/demo,server,nowait \
@@ -7561,7 +7561,7 @@ qemu-monitor-command
**Syntax:**
-.. code-block::
+::
qemu-monitor-command domain { [--hmp] | [--pretty] [--return-value] } command...
@@ -7588,7 +7588,7 @@ qemu-agent-command
**Syntax:**
-.. code-block::
+::
qemu-agent-command domain [--timeout seconds | --async | --block] command...
@@ -7606,7 +7606,7 @@ qemu-monitor-event
**Syntax:**
-.. code-block::
+::
qemu-monitor-event [domain] [--event event-name]
[--loop] [--timeout seconds] [--pretty] [--regex] [--no-case]
@@ -7637,7 +7637,7 @@ lxc-enter-namespace
**Syntax:**
-.. code-block::
+::
lxc-enter-namespace domain [--noseclabel] --
/path/to/binary [arg1, [arg2, ...]]
diff --git a/docs/manpages/virt-admin.rst b/docs/manpages/virt-admin.rst
index d5cb23a1c5..940a38bfce 100644
--- a/docs/manpages/virt-admin.rst
+++ b/docs/manpages/virt-admin.rst
@@ -28,7 +28,7 @@ as for monitoring and managing all clients connected to the daemon.
The basic structure of most virt-admin usage is:
-.. code-block::
+::
virt-admin [OPTION]... <command> [ARG]...
@@ -107,7 +107,7 @@ help
**Syntax:**
-.. code-block::
+::
help [command-or-group]
@@ -124,7 +124,7 @@ quit, exit
**Syntax:**
-.. code-block::
+::
quit
exit
@@ -136,7 +136,7 @@ version
**Syntax:**
-.. code-block::
+::
version
@@ -146,7 +146,7 @@ the version of the daemon.
**Example:**
-.. code-block::
+::
$ virt-admin version
Compiled against library: libvirt 1.2.21
@@ -160,7 +160,7 @@ cd
**Syntax:**
-.. code-block::
+::
cd [directory]
@@ -175,7 +175,7 @@ pwd
**Syntax:**
-.. code-block::
+::
pwd
@@ -187,7 +187,7 @@ connect
**Syntax:**
-.. code-block::
+::
connect [URI]
@@ -206,7 +206,7 @@ uri
**Syntax:**
-.. code-block::
+::
uri
@@ -230,7 +230,7 @@ server-list
**Syntax:**
-.. code-block::
+::
server-list
@@ -243,7 +243,7 @@ daemon-log-filters
**Syntax:**
-.. code-block::
+::
daemon-log-filters [--filters string]
@@ -264,7 +264,7 @@ space. Each filter must conform to the form described in detail by
To define a filter which suppresses all e.g. 'virObjectUnref' DEBUG
messages, use the following:
-.. code-block::
+::
$ virt-admin daemon-log-filters "4:util.object"
@@ -277,7 +277,7 @@ daemon-log-outouts
**Syntax:**
-.. code-block::
+::
daemon-log-outputs [--outputs string]
@@ -298,13 +298,13 @@ space. Each output must conform to the form described in detail by
To replace the current setting for logging outputs with one that writes to
a file while logging errors only, the following could be used:
-.. code-block::
+::
$ virt-admin daemon-log-outputs "4:file:<absolute_path_to_the_file>"
To define multiple outputs at once they need to be delimited by spaces:
-.. code-block::
+::
$ virt-admin daemon-log-outputs "4:stderr 2:syslog:<msg_ident>"
@@ -320,7 +320,7 @@ server-threadpool-info
**Syntax:**
-.. code-block::
+::
server-threadpool-info server
@@ -355,7 +355,7 @@ that, unlike tasks carried out by normal workers, are within libvirt's full
control and libvirt guarantees that such a task cannot hang, thus will always
finish. An example of such a task this would be destroying a domain:
-.. code-block::
+::
$ virsh destroy <domain>.
@@ -365,7 +365,7 @@ server-threadpool-set
**Syntax:**
-.. code-block::
+::
server-threadpool-set server [--min-workers count] [--max-workers count] [--priority-workers count]
@@ -394,7 +394,7 @@ server-clients-info
**Syntax:**
-.. code-block::
+::
server-clients-info server
@@ -407,7 +407,7 @@ runtime values, more specifically, the current number of clients connected to
**Example:**
-.. code-block::
+::
# virt-admin server-clients-info libvirtd
nclients_max : 120
@@ -421,7 +421,7 @@ server-clients-set
**Syntax:**
-.. code-block::
+::
server-clients-set server [--max-clients count] [--max-unauth-clients count]
@@ -447,7 +447,7 @@ server-update-tls
**Syntax:**
-.. code-block::
+::
server-update-tls server
@@ -474,7 +474,7 @@ client-list
**Syntax:**
-.. code-block::
+::
client-list server
@@ -488,7 +488,7 @@ client-info
**Syntax:**
-.. code-block::
+::
client-info server client
@@ -504,7 +504,7 @@ enabled within daemon).
**Examples:**
-.. code-block::
+::
# virt-admin client-info libvirtd 1
id : 1
@@ -530,7 +530,7 @@ client-disconnect
**Syntax:**
-.. code-block::
+::
client-disconnect server client
diff --git a/docs/manpages/virt-login-shell.rst b/docs/manpages/virt-login-shell.rst
index 3833a3e912..bc0215294b 100644
--- a/docs/manpages/virt-login-shell.rst
+++ b/docs/manpages/virt-login-shell.rst
@@ -29,7 +29,7 @@ configured in ``/etc/libvirt/virt-login-shell.conf``.
The basic structure of most ``virt-login-shell`` usage is:
-.. code-block::
+::
virt-login-shell
@@ -58,7 +58,7 @@ By default, ``virt-login-shell`` will execute the ``/bin/sh`` program for
the user. You can modify this behaviour by defining the shell variable in
``/etc/libvirt/virt-login-shell.conf``. e.g.
-.. code-block::
+::
shell = [ "/bin/bash" ]
@@ -68,7 +68,7 @@ detect the shell from ``/etc/password`` inside the container. This should only
be done if the container has a separate ``/etc`` directory from the host,
otherwise it will end up recursively invoking ``virt-login-shell``. e.g.
-.. code-block::
+::
auto_shell = 1
@@ -77,7 +77,7 @@ By default no users are allowed to use virt-login-shell, if you want to allow
certain users to use virt-login-shell, you need to modify the allowed_users
variable in /etc/libvirt/virt-login-shell.conf. e.g.
-.. code-block::
+::
allowed_users = [ "tom", "dick", "harry" ]
diff --git a/docs/manpages/virtlockd.rst b/docs/manpages/virtlockd.rst
index ea37b25d05..8ca231d14f 100644
--- a/docs/manpages/virtlockd.rst
+++ b/docs/manpages/virtlockd.rst
@@ -120,14 +120,14 @@ EXAMPLES
To retrieve the version of ``virtlockd``:
-.. code-block::
+::
# virtlockd --version
virtlockd (libvirt) 1.1.1
To start ``virtlockd``, instructing it to daemonize and create a PID file:
-.. code-block::
+::
# virtlockd -d
# ls -la @RUNSTATEDIR(a)/virtlockd.pid
diff --git a/docs/manpages/virtlogd.rst b/docs/manpages/virtlogd.rst
index edf8288230..4b749fe18e 100644
--- a/docs/manpages/virtlogd.rst
+++ b/docs/manpages/virtlogd.rst
@@ -121,14 +121,14 @@ EXAMPLES
To retrieve the version of ``virtlogd``:
-.. code-block::
+::
# virtlogd --version
virtlogd (libvirt) 1.1.1
To start ``virtlogd``, instructing it to daemonize and create a PID file:
-.. code-block::
+::
# virtlogd -d
# ls -la @RUNSTATEDIR(a)/virtlogd.pid
--
2.26.2
4 years, 1 month
[libvirt PATCH 0/4] vbox: use g_new0 (glib chronicles)
by Ján Tomko
Ján Tomko (4):
vbox: use g_new0 in vboxDumpAudio
vbox: invert condition in vboxSnapshotGetReadOnlyDisks
vbox: refactor vboxNetworkGetXMLDesc a bit
vbox: use g_new0 instead of VIR_ALLOC
src/vbox/vbox_common.c | 119 ++++++++++++----------------------
src/vbox/vbox_network.c | 107 ++++++++++++++----------------
src/vbox/vbox_snapshot_conf.c | 48 ++++++--------
3 files changed, 110 insertions(+), 164 deletions(-)
--
2.26.2
4 years, 1 month
[libvirt PATCH 0/4] vz: use g_new0 (glib chronicles)
by Ján Tomko
Ján Tomko (4):
vz: separate if conditions in vzEatCookie
vz: vzEatCookie: use distinct 'tmp' variables
vz: vzEatCookie: separate allocation
vz: use g_new0 instead of VIR_ALLOC
src/vz/vz_driver.c | 49 ++++++++++++++++++++++------------------------
src/vz/vz_sdk.c | 46 +++++++++++++------------------------------
src/vz/vz_utils.c | 3 +--
3 files changed, 38 insertions(+), 60 deletions(-)
--
2.26.2
4 years, 1 month
[libvirt PATCH] vmware: use g_new0 instead of VIR_ALLOC (glib chronicles)
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/vmware/vmware_driver.c | 6 ++---
src/vmx/vmx.c | 46 ++++++++++----------------------------
2 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index e82edf2a11..087664a341 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -97,8 +97,7 @@ vmwareDataAllocFunc(void *opaque G_GNUC_UNUSED)
{
vmwareDomainPtr dom;
- if (VIR_ALLOC(dom) < 0)
- return NULL;
+ dom = g_new0(vmwareDomain, 1);
dom->vmxPath = NULL;
dom->gui = true;
@@ -184,8 +183,7 @@ vmwareConnectOpen(virConnectPtr conn,
/* We now know the URI is definitely for this driver, so beyond
* here, don't return DECLINED, always use ERROR */
- if (VIR_ALLOC(driver) < 0)
- return VIR_DRV_OPEN_ERROR;
+ driver = g_new0(struct vmware_driver, 1);
/* Find vmrun, which is what this driver uses to communicate to
* the VMware hypervisor. We look this up first since we use it
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 9894d5c0ce..0e8a690d0d 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -637,8 +637,7 @@ virVMXEscapeHex(const char *string, char escape, const char *special)
++length;
}
- if (VIR_ALLOC_N(escaped, length) < 0)
- return NULL;
+ escaped = g_new0(char, length);
tmp1 = string; /* reading from this one */
tmp2 = escaped; /* writing to this one */
@@ -1150,8 +1149,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def,
int count = 0;
int *autodetectedModels;
- if (VIR_ALLOC_N(autodetectedModels, def->ndisks) < 0)
- return -1;
+ autodetectedModels = g_new0(int, def->ndisks);
for (i = 0; i < def->ncontrollers; ++i) {
controller = def->controllers[i];
@@ -1611,9 +1609,7 @@ virVMXParseConfig(virVMXContext *ctx,
/* FIXME */
/* def:graphics */
- if (VIR_ALLOC_N(def->graphics, 1) < 0)
- goto cleanup;
-
+ def->graphics = g_new0(virDomainGraphicsDefPtr, 1);
def->ngraphics = 0;
if (virVMXParseVNC(conf, &def->graphics[def->ngraphics]) < 0)
@@ -1623,9 +1619,7 @@ virVMXParseConfig(virVMXContext *ctx,
++def->ngraphics;
/* def:disks: 4 * 15 scsi + 2 * 2 ide + 2 floppy = 66 */
- if (VIR_ALLOC_N(def->disks, 66) < 0)
- goto cleanup;
-
+ def->disks = g_new0(virDomainDiskDefPtr, 66);
def->ndisks = 0;
/* def:disks (scsi) */
@@ -1733,9 +1727,7 @@ virVMXParseConfig(virVMXContext *ctx,
if (sharedFolder_maxNum > 0) {
int number;
- if (VIR_ALLOC_N(def->fss, sharedFolder_maxNum) < 0)
- goto cleanup;
-
+ def->fss = g_new0(virDomainFSDefPtr, sharedFolder_maxNum);
def->nfss = 0;
for (number = 0; number < sharedFolder_maxNum; ++number) {
@@ -1767,9 +1759,7 @@ virVMXParseConfig(virVMXContext *ctx,
/* FIXME */
/* def:videos */
- if (VIR_ALLOC_N(def->videos, 1) < 0)
- goto cleanup;
-
+ def->videos = g_new0(virDomainVideoDefPtr, 1);
def->nvideos = 0;
if (virVMXParseSVGA(conf, &def->videos[def->nvideos]) < 0)
@@ -1784,9 +1774,7 @@ virVMXParseConfig(virVMXContext *ctx,
/* FIXME */
/* def:serials */
- if (VIR_ALLOC_N(def->serials, 4) < 0)
- goto cleanup;
-
+ def->serials = g_new0(virDomainChrDefPtr, 4);
def->nserials = 0;
for (port = 0; port < 4; ++port) {
@@ -1800,9 +1788,7 @@ virVMXParseConfig(virVMXContext *ctx,
}
/* def:parallels */
- if (VIR_ALLOC_N(def->parallels, 3) < 0)
- goto cleanup;
-
+ def->parallels = g_new0(virDomainChrDefPtr, 3);
def->nparallels = 0;
for (port = 0; port < 3; ++port) {
@@ -1819,10 +1805,7 @@ virVMXParseConfig(virVMXContext *ctx,
if (ctx->datacenterPath || ctx->moref) {
struct virVMXDomainDefNamespaceData *nsdata = NULL;
- if (VIR_ALLOC(nsdata) < 0) {
- virVMXDomainDefNamespaceFree(nsdata);
- goto cleanup;
- }
+ nsdata = g_new0(struct virVMXDomainDefNamespaceData, 1);
nsdata->datacenterPath = g_strdup(ctx->datacenterPath);
@@ -1891,9 +1874,7 @@ virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def)
if (! enabled)
return 0;
- if (VIR_ALLOC(*def) < 0)
- goto failure;
-
+ *def = g_new0(virDomainGraphicsDef, 1);
(*def)->type = VIR_DOMAIN_GRAPHICS_TYPE_VNC;
if (virVMXGetConfigLong(conf, "RemoteDisplay.vnc.port", &port, -1,
@@ -2588,8 +2569,7 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
if (! present/* && ! startConnected*/)
return 0;
- if (VIR_ALLOC(*def) < 0)
- return -1;
+ *def = g_new0(virDomainNetDef, 1);
/* vmx:connectionType -> def:type */
if (virVMXGetConfigString(conf, connectionType_name, &connectionType,
@@ -3040,9 +3020,7 @@ virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def)
return -1;
}
- if (VIR_ALLOC(*def) < 0)
- return -1;
-
+ *def = g_new0(virDomainVideoDef, 1);
(*def)->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA;
/* vmx:vramSize */
--
2.26.2
4 years, 1 month
[libvirt PATCH] API: discourage usage of non-ListAll APIs
by Ján Tomko
They require the caller to provide the maximum number
of array elements upfront, leading to either incomplete
results or violations of the zero-one-infinity rule.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/libvirt-domain-snapshot.c | 6 ++++--
src/libvirt-domain.c | 8 ++++----
src/libvirt-interface.c | 6 ++++--
src/libvirt-network.c | 6 ++++--
src/libvirt-nodedev.c | 3 ++-
src/libvirt-nwfilter.c | 3 +++
src/libvirt-secret.c | 3 +++
src/libvirt-storage.c | 9 ++++++---
8 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c
index f856e5b9b8..74d5e16281 100644
--- a/src/libvirt-domain-snapshot.c
+++ b/src/libvirt-domain-snapshot.c
@@ -378,8 +378,10 @@ virDomainSnapshotNum(virDomainPtr domain, unsigned int flags)
* snapshots were listed if the return is less than @nameslen. Likewise,
* you should be prepared for virDomainSnapshotLookupByName() to fail when
* converting a name from this call into a snapshot object, if another
- * connection deletes the snapshot in the meantime. For more control over
- * the results, see virDomainListAllSnapshots().
+ * connection deletes the snapshot in the meantime.
+ *
+ * The use of this function in new code is discouraged. Instead, use
+ * virDomainListAllSnapshots().
*
* Returns the number of domain snapshots found or -1 in case of error.
* The caller is responsible to call free() for each member of the array.
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 415482a526..03eca1196a 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -41,8 +41,8 @@ VIR_LOG_INIT("libvirt.domain");
*
* Collect the list of active domains, and store their IDs in array @ids
*
- * For inactive domains, see virConnectListDefinedDomains(). For more
- * control over the results, see virConnectListAllDomains().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllDomains().
*
* Returns the number of domains found or -1 in case of error. Note that
* this command is inherently racy; a domain can be started between a
@@ -6366,8 +6366,8 @@ virConnectNumOfDefinedDomains(virConnectPtr conn)
* list the defined but inactive domains, stores the pointers to the names
* in @names
*
- * For active domains, see virConnectListDomains(). For more control over
- * the results, see virConnectListAllDomains().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllDomains().
*
* Returns the number of names provided in the array or -1 in case of error.
* Note that this command is inherently racy; a domain can be defined between
diff --git a/src/libvirt-interface.c b/src/libvirt-interface.c
index 5eb5980483..271f21b7b5 100644
--- a/src/libvirt-interface.c
+++ b/src/libvirt-interface.c
@@ -150,7 +150,8 @@ virConnectNumOfInterfaces(virConnectPtr conn)
* Collect the list of active physical host interfaces,
* and store their names in @names
*
- * For more control over the results, see virConnectListAllInterfaces().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllInterfaces().
*
* Returns the number of interfaces found or -1 in case of error. Note that
* this command is inherently racy; a interface can be started between a call
@@ -227,7 +228,8 @@ virConnectNumOfDefinedInterfaces(virConnectPtr conn)
* Collect the list of defined (inactive) physical host interfaces,
* and store their names in @names.
*
- * For more control over the results, see virConnectListAllInterfaces().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllInterfaces().
*
* Returns the number of names provided in the array or -1 in case of error.
* Note that this command is inherently racy; a interface can be defined between
diff --git a/src/libvirt-network.c b/src/libvirt-network.c
index f691b672c7..e6ea66a234 100644
--- a/src/libvirt-network.c
+++ b/src/libvirt-network.c
@@ -159,7 +159,8 @@ virConnectNumOfNetworks(virConnectPtr conn)
*
* Collect the list of active networks, and store their names in @names
*
- * For more control over the results, see virConnectListAllNetworks().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllNetworks().
*
* Returns the number of networks found or -1 in case of error. Note that
* this command is inherently racy; a network can be started between a call
@@ -235,7 +236,8 @@ virConnectNumOfDefinedNetworks(virConnectPtr conn)
*
* list the inactive networks, stores the pointers to the names in @names
*
- * For more control over the results, see virConnectListAllNetworks().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllNetworks().
*
* Returns the number of names provided in the array or -1 in case of error.
* Note that this command is inherently racy; a network can be defined between
diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c
index 28765b9c30..6b1e03c531 100644
--- a/src/libvirt-nodedev.c
+++ b/src/libvirt-nodedev.c
@@ -151,7 +151,8 @@ virConnectListAllNodeDevices(virConnectPtr conn,
*
* Collect the list of node devices, and store their names in @names
*
- * For more control over the results, see virConnectListAllNodeDevices().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllNodeDevices().
*
* If the optional 'cap' argument is non-NULL, then the count
* will be restricted to devices with the specified capability
diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c
index e299385895..11397f2f4c 100644
--- a/src/libvirt-nwfilter.c
+++ b/src/libvirt-nwfilter.c
@@ -117,6 +117,9 @@ virConnectListAllNWFilters(virConnectPtr conn,
*
* Collect the list of network filters, and store their names in @names
*
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListALLNWFilters().
+ *
* Returns the number of network filters found or -1 in case of error
*/
int
diff --git a/src/libvirt-secret.c b/src/libvirt-secret.c
index 75d40f53dc..c836a09ce7 100644
--- a/src/libvirt-secret.c
+++ b/src/libvirt-secret.c
@@ -156,6 +156,9 @@ virConnectListAllSecrets(virConnectPtr conn,
*
* List UUIDs of defined secrets, store pointers to names in uuids.
*
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllSecrets().
+ *
* Returns the number of UUIDs provided in the array, or -1 on failure.
*/
int
diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c
index 2a7cdca234..6b2f612cac 100644
--- a/src/libvirt-storage.c
+++ b/src/libvirt-storage.c
@@ -179,7 +179,8 @@ virConnectNumOfStoragePools(virConnectPtr conn)
* If there are more than maxnames, the remaining names will be silently
* ignored.
*
- * For more control over the results, see virConnectListAllStoragePools().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllStoragePools().
*
* Returns the number of pools found or -1 in case of error. Note that
* this command is inherently racy; a pool can be started between a call to
@@ -259,7 +260,8 @@ virConnectNumOfDefinedStoragePools(virConnectPtr conn)
* If there are more than maxnames, the remaining names will be silently
* ignored.
*
- * For more control over the results, see virConnectListAllStoragePools().
+ * The use of this function in new code is discouraged. Instead, use
+ * virConnectListAllStoragePools().
*
* Returns the number of names provided in the array or -1 in case of error.
* Note that this command is inherently racy; a pool can be defined between
@@ -1254,7 +1256,8 @@ virStoragePoolNumOfVolumes(virStoragePoolPtr pool)
* Fetch list of storage volume names, limiting to
* at most maxnames.
*
- * To list the volume objects directly, see virStoragePoolListAllVolumes().
+ * The use of this function in new code is discouraged. Instead, use
+ * virStoragePoolListAllVolumes().
*
* Returns the number of names fetched, or -1 on error
*/
--
2.26.2
4 years, 1 month
[PATCH 00/15] virbitmap: Refactor bitmap allocation
by Peter Krempa
Peter Krempa (15):
virQEMUCapsFlagsString: Remove unused function
virBitmapToString: Remove unused 'prefix' and 'trim' arguments
virBitmapToString|virBitmapNewString: Clarify semantics of the
'string'
virBitmapToString: Properly handle empty bitmaps
virbitmaptest: test13: Refactor memory cleanup
virbitmaptest: Use g_auto(free) for cleanup
virbitmaptest: Remove unnecessary error/cleanup labels
util: virbitmap: Don't forbid 0 size bitmap
virbitmaptest: Add few more cases for virBitmapToString
virBitmapNewQuiet: Don't fail on unlikely overflow scenario
util: bitmap: Remove virBitmapNewQuiet
virBitmapNew: Don't force return value check
util: bitmp: Remove virBitmapNewEmpty
qemuSlirpNew: Use g_new0 to allocate the slirp object
virBitmapNew: Don't check return value
src/conf/capabilities.c | 7 +-
src/conf/checkpoint_conf.c | 3 +-
src/conf/domain_addr.c | 6 +-
src/conf/domain_conf.c | 12 +-
src/conf/node_device_conf.c | 6 +-
src/conf/numa_conf.c | 2 +-
src/conf/storage_conf.c | 3 +-
src/conf/virnetworkobj.c | 3 +-
src/libvirt_private.syms | 2 -
src/libxl/libxl_capabilities.c | 4 -
src/libxl/libxl_driver.c | 6 +-
src/lxc/lxc_controller.c | 3 -
src/qemu/qemu_capabilities.c | 9 +-
src/qemu/qemu_capabilities.h | 2 -
src/qemu/qemu_conf.c | 3 +-
src/qemu/qemu_domain_address.c | 5 +-
src/qemu/qemu_driver.c | 11 +-
src/qemu/qemu_hotplug.c | 3 +-
src/qemu/qemu_migration_cookie.c | 5 +-
src/qemu/qemu_migration_params.c | 12 +-
src/qemu/qemu_monitor.c | 3 +-
src/qemu/qemu_namespace.c | 5 +-
src/qemu/qemu_process.c | 5 +-
src/qemu/qemu_slirp.c | 7 +-
src/qemu/qemu_snapshot.c | 3 +-
src/test/test_driver.c | 12 +-
src/util/virbitmap.c | 102 +++-----
src/util/virbitmap.h | 6 +-
src/util/vircommand.c | 3 +-
src/util/virdnsmasq.c | 7 +-
src/util/virhostcpu.c | 14 +-
src/util/virjson.c | 3 +-
src/util/virnetdev.c | 3 +-
src/util/virnuma.c | 8 +-
src/util/virportallocator.c | 6 +-
src/util/virprocess.c | 6 +-
src/util/virresctrl.c | 12 +-
src/util/virstoragefile.c | 3 +-
src/util/virtpm.c | 2 +-
src/vmx/vmx.c | 2 -
src/vz/vz_sdk.c | 3 +-
tests/qemumonitorjsontest.c | 3 -
tests/testutils.c | 11 +-
tests/virbitmaptest.c | 410 +++++++++++++-----------------
tools/virsh-domain.c | 9 +-
tools/virt-host-validate-common.c | 4 +-
46 files changed, 271 insertions(+), 488 deletions(-)
--
2.26.2
4 years, 1 month
[PATCH] rpm: Simplify qemu+kvm conditionals and eliminate duplication
by Neal Gompa
The conditionals for enabling qemu+kvm were unnecessarily complex.
In practice, there were far fewer cases where the functionality would
be disabled than what the conditional logic expressed, and this change
simplifies it to the realistic set of options.
Signed-off-by: Neal Gompa <ngompa13(a)gmail.com>
---
libvirt.spec.in | 49 +++++++++++++++++++++++--------------------------
1 file changed, 23 insertions(+), 26 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index c4a7c30737..6940066de9 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -20,31 +20,12 @@
%define with_qemu_tcg %{with_qemu}
-%define qemu_kvm_arches %{ix86} x86_64
-
-%if 0%{?fedora}
- %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
-%endif
-
-%if 0%{?rhel}
- %define with_qemu_tcg 0
- %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
-%endif
-
# On RHEL 7 and older macro _vpath_builddir is not defined.
%if 0%{?rhel} && 0%{?rhel} <= 7
%define _vpath_builddir %{_target_platform}
%endif
-%ifarch %{qemu_kvm_arches}
- %define with_qemu_kvm %{with_qemu}
-%else
- %define with_qemu_kvm 0
-%endif
-
-%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
- %define with_qemu 0
-%endif
+%define with_qemu_kvm %{with_qemu}
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
%define with_openvz 0%{!?_without_openvz:1}
@@ -61,12 +42,6 @@
%endif
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
-%ifnarch %{qemu_kvm_arches}
- # gluster is only built where qemu driver is enabled on RHEL 8
- %if 0%{?rhel} >= 8
- %define with_storage_gluster 0
- %endif
-%endif
%define with_numactl 0%{!?_without_numactl:1}
@@ -97,6 +72,11 @@
# Finally set the OS / architecture specific special cases
+# KVM is available on most architectures
+%ifnarch %{ix86} x86_64 %{power64} s390x %{arm} aarch64
+ %define with_qemu_kvm 0
+%endif
+
# Xen is available only on i386 x86_64 ia64
%ifnarch %{ix86} x86_64 ia64
%define with_libxl 0
@@ -122,6 +102,23 @@
%define with_storage_rbd 0
%endif
+# RHEL does not ship qemu-tcg
+%if 0%{?rhel}
+ %define with_qemu_tcg 0
+%endif
+
+# In the event that qemu-tcg and qemu-kvm are unavailable, don't ship qemu
+%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
+ %define with_qemu 0
+%endif
+
+%if ! %{with_qemu_kvm}
+ # gluster is only built where qemu driver is enabled on RHEL 8
+ %if 0%{?rhel} >= 8
+ %define with_storage_gluster 0
+ %endif
+%endif
+
# RHEL doesn't ship OpenVZ, VBox, PowerHypervisor,
# VMware, libxenlight (Xen 4.1 and newer),
# or HyperV.
--
2.26.2
4 years, 1 month
[PATCH] qemu: Taint cpu host-passthrough only after migration
by Cole Robinson
>From a discussion last year[1], Dan recommended libvirt drop the tain
flag for cpu host-passthrough, unless the VM has been migrated.
This repurposes the existing host-cpu taint flag to do just that.
[1]: https://www.redhat.com/archives/virt-tools-list/2019-February/msg00041.html
https://bugzilla.redhat.com/show_bug.cgi?id=1673098
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_domain.c | 7 +++++--
src/qemu/qemu_domain.h | 3 ++-
src/qemu/qemu_process.c | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9a44315519..450686dfb5 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2736,7 +2736,7 @@ typedef enum {
VIR_DOMAIN_TAINT_SHELL_SCRIPTS, /* Network configuration using opaque shell scripts */
VIR_DOMAIN_TAINT_DISK_PROBING, /* Relying on potentially unsafe disk format probing */
VIR_DOMAIN_TAINT_EXTERNAL_LAUNCH, /* Externally launched guest domain */
- VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use */
+ VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use after migration */
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specified */
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 0331fd55e0..ed4bdbd7fb 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6115,7 +6115,8 @@ void qemuDomainObjTaint(virQEMUDriverPtr driver,
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
virDomainObjPtr obj,
- qemuDomainLogContextPtr logCtxt)
+ qemuDomainLogContextPtr logCtxt,
+ bool incomingMigration)
{
size_t i;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
@@ -6144,7 +6145,9 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
VIR_DOMAIN_TAINT_CUSTOM_HYPERVISOR_FEATURE, logCtxt);
}
- if (obj->def->cpu && obj->def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
+ if (obj->def->cpu &&
+ obj->def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH &&
+ incomingMigration)
qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HOST_CPU, logCtxt);
for (i = 0; i < obj->def->ndisks; i++)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index ec776ced72..9bf32e16c9 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -567,7 +567,8 @@ void qemuDomainObjTaint(virQEMUDriverPtr driver,
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
virDomainObjPtr obj,
- qemuDomainLogContextPtr logCtxt);
+ qemuDomainLogContextPtr logCtxt,
+ bool incomingMigration);
void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
virDomainObjPtr obj,
virDomainDiskDefPtr disk,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 9122069cc9..57d764014a 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6856,7 +6856,7 @@ qemuProcessLaunch(virConnectPtr conn,
qemuLogOperation(vm, "starting up", cmd, logCtxt);
- qemuDomainObjCheckTaint(driver, vm, logCtxt);
+ qemuDomainObjCheckTaint(driver, vm, logCtxt, incoming != NULL);
qemuDomainLogContextMarkPosition(logCtxt);
--
2.28.0
4 years, 1 month
[libvirt PATCH] news: move section about downscript to v6.4.0
by Ján Tomko
The feature was merged in v6.3.0-175-g61ba6f09b1
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: 4eda71a8d05d968e73ab9b0fdc8a90123c57d39e
---
NEWS.rst | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/NEWS.rst b/NEWS.rst
index f6074d9fe8..5da6174e42 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -404,6 +404,12 @@ v6.4.0 (2020-06-02)
``virsh capabilities`` will now include information about the host CPU when
run on ARM machines.
+ * qemu: support network interface downscript
+
+ QEMU has the ability to run a script when a NIC is brought up and down.
+ Libvirt only enables use of the up script. Now add support for postscript
+ when NIC is down/detached.
+
* **Improvements**
* qemu: stricter validation for disk type='lun'
@@ -454,12 +460,6 @@ v6.3.0 (2020-05-05)
* **New features**
- * qemu: support network interface downscript
-
- QEMU has the ability to run a script when a NIC is brought up and down.
- Libvirt only enables use of the up script. Now add support for postscript
- when NIC is down/detached.
-
* qemu: support disabling hotplug/unplug of PCIe devices
libvirt can now set the "hotplug" option for pcie-root-ports and
--
2.26.2
4 years, 1 month
[libvirt PATCH] API: virDomainLookupByID: s/UUId/UUID/
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/libvirt-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 415482a526..a7266ccd88 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -284,7 +284,7 @@ virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
*
* Try to find a domain based on the hypervisor ID number
* Note that this won't work for inactive domains which have an ID of -1,
- * in that case a lookup based on the Name or UUId need to be done instead.
+ * in that case a lookup based on the Name or UUID need to be done instead.
*
* virDomainFree should be used to free the resources after the
* domain object is no longer needed.
--
2.26.2
4 years, 1 month