aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx536
1 files changed, 389 insertions, 147 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index d94e2cb..1a425b2 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -38,8 +38,12 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" nvdimm=on|off controls NVDIMM support (default=off)\n"
" memory-encryption=@var{} memory encryption object to use (default=none)\n"
" hmat=on|off controls ACPI HMAT support (default=off)\n"
+#ifdef CONFIG_POSIX
+ " aux-ram-share=on|off allocate auxiliary guest RAM as shared (default: off)\n"
+#endif
" memory-backend='backend-id' specifies explicitly provided backend for main RAM (default=none)\n"
- " cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]\n",
+ " cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]\n"
+ " smp-cache.0.cache=cachename,smp-cache.0.topology=topologylevel\n",
QEMU_ARCH_ALL)
SRST
``-machine [type=]name[,prop=value[,...]]``
@@ -101,6 +105,16 @@ SRST
Enables or disables ACPI Heterogeneous Memory Attribute Table
(HMAT) support. The default is off.
+ ``aux-ram-share=on|off``
+ Allocate auxiliary guest RAM as an anonymous file that is
+ shareable with an external process. This option applies to
+ memory allocated as a side effect of creating various devices.
+ It does not apply to memory-backend-objects, whether explicitly
+ specified on the command line, or implicitly created by the -m
+ command line option. The default is off.
+
+ To use the cpr-transfer migration mode, you must set aux-ram-share=on.
+
``memory-backend='id'``
An alternative to legacy ``-mem-path`` and ``mem-prealloc`` options.
Allows to use a memory backend as main RAM.
@@ -159,6 +173,33 @@ SRST
::
-machine cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.targets.1=cxl.1,cxl-fmw.0.size=128G,cxl-fmw.0.interleave-granularity=512
+
+ ``smp-cache.0.cache=cachename,smp-cache.0.topology=topologylevel``
+ Define cache properties for SMP system.
+
+ ``cache=cachename`` specifies the cache that the properties will be
+ applied on. This field is the combination of cache level and cache
+ type. It supports ``l1d`` (L1 data cache), ``l1i`` (L1 instruction
+ cache), ``l2`` (L2 unified cache) and ``l3`` (L3 unified cache).
+
+ ``topology=topologylevel`` sets the cache topology level. It accepts
+ CPU topology levels including ``core``, ``module``, ``cluster``, ``die``,
+ ``socket``, ``book``, ``drawer`` and a special value ``default``. If
+ ``default`` is set, then the cache topology will follow the architecture's
+ default cache topology model. If another topology level is set, the cache
+ will be shared at corresponding CPU topology level. For example,
+ ``topology=core`` makes the cache shared by all threads within a core.
+ The omitting cache will default to using the ``default`` level.
+
+ The default cache topology model for an i386 PC machine is as follows:
+ ``l1d``, ``l1i``, and ``l2`` caches are per ``core``, while the ``l3``
+ cache is per ``die``.
+
+ Example:
+
+ ::
+
+ -machine smp-cache.0.cache=l1d,smp-cache.0.topology=core,smp-cache.1.cache=l1i,smp-cache.1.topology=core
ERST
DEF("M", HAS_ARG, QEMU_OPTION_M,
@@ -924,7 +965,7 @@ SRST
Sets the period length in microseconds.
``in|out.try-poll=on|off``
- Attempt to use poll mode with the device. Default is on.
+ Attempt to use poll mode with the device. Default is off.
``threshold=threshold``
Threshold (in microseconds) when playback starts. Default is 0.
@@ -961,7 +1002,7 @@ SRST
``in|out.buffer-count=count``
Sets the count of the buffers.
- ``in|out.try-poll=on|of``
+ ``in|out.try-poll=on|off``
Attempt to use poll mode with the device. Default is on.
``try-mmap=on|off``
@@ -1102,7 +1143,7 @@ SRST
external entity that provides the IPMI services.
A connection is made to an external BMC simulator. If you do this,
- it is strongly recommended that you use the "reconnect=" chardev
+ it is strongly recommended that you use the "reconnect-ms=" chardev
option to reconnect to the simulator if the connection is lost. Note
that if this is not used carefully, it can be a security issue, as
the interface has the ability to send resets, NMIs, and power off
@@ -1766,29 +1807,18 @@ DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
" [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
" [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n"
" [[,throttling.iops-size=is]]\n"
- "-fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly=on]\n"
- "-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly=on]\n"
"-fsdev synth,id=id\n",
QEMU_ARCH_ALL)
SRST
``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]``
\
-``-fsdev proxy,id=id,socket=socket[,writeout=writeout][,readonly=on]``
- \
-``-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=writeout][,readonly=on]``
- \
``-fsdev synth,id=id[,readonly=on]``
Define a new file system device. Valid options are:
``local``
Accesses to the filesystem are done by QEMU.
- ``proxy``
- Accesses to the filesystem are done by virtfs-proxy-helper(1). This
- option is deprecated (since QEMU 8.1) and will be removed in a future
- version of QEMU. Use ``local`` instead.
-
``synth``
Synthetic filesystem, only used by QTests.
@@ -1813,8 +1843,6 @@ SRST
security model is same as passthrough except the sever won't
report failures if it fails to set file attributes like
ownership. Security model is mandatory only for local fsdriver.
- Other fsdrivers (like proxy) don't take security model as a
- parameter.
``writeout=writeout``
This is an optional argument. The only supported value is
@@ -1827,16 +1855,6 @@ SRST
Enables exporting 9p share as a readonly mount for guests. By
default read-write access is given.
- ``socket=socket``
- Enables proxy filesystem driver to use passed socket file for
- communicating with virtfs-proxy-helper(1).
-
- ``sock_fd=sock_fd``
- Enables proxy filesystem driver to use passed socket descriptor
- for communicating with virtfs-proxy-helper(1). Usually a helper
- like libvirt will create socketpair and pass one of the fds as
- sock\_fd.
-
``fmode=fmode``
Specifies the default mode for newly created files on the host.
Works only with security models "mapped-xattr" and
@@ -1889,18 +1907,12 @@ ERST
DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
"-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n"
" [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n"
- "-virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly=on]\n"
- "-virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly=on]\n"
"-virtfs synth,mount_tag=tag[,id=id][,readonly=on]\n",
QEMU_ARCH_ALL)
SRST
``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly=on] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]``
\
-``-virtfs proxy,socket=socket,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
- \
-``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
- \
``-virtfs synth,mount_tag=mount_tag``
Define a new virtual filesystem device and expose it to the guest using
a virtio-9p-device (a.k.a. 9pfs), which essentially means that a certain
@@ -1917,11 +1929,6 @@ SRST
``local``
Accesses to the filesystem are done by QEMU.
- ``proxy``
- Accesses to the filesystem are done by virtfs-proxy-helper(1).
- This option is deprecated (since QEMU 8.1) and will be removed in a
- future version of QEMU. Use ``local`` instead.
-
``synth``
Synthetic filesystem, only used by QTests.
@@ -1946,8 +1953,6 @@ SRST
security model is same as passthrough except the sever won't
report failures if it fails to set file attributes like
ownership. Security model is mandatory only for local fsdriver.
- Other fsdrivers (like proxy) don't take security model as a
- parameter.
``writeout=writeout``
This is an optional argument. The only supported value is
@@ -1960,16 +1965,6 @@ SRST
Enables exporting 9p share as a readonly mount for guests. By
default read-write access is given.
- ``socket=socket``
- Enables proxy filesystem driver to use passed socket file for
- communicating with virtfs-proxy-helper(1). Usually a helper like
- libvirt will create socketpair and pass one of the fds as
- sock\_fd.
-
- ``sock_fd``
- Enables proxy filesystem driver to use passed 'sock\_fd' as the
- socket descriptor for interfacing with virtfs-proxy-helper(1).
-
``fmode=fmode``
Specifies the default mode for newly created files on the host.
Works only with security models "mapped-xattr" and
@@ -1984,32 +1979,37 @@ SRST
Specifies the tag name to be used by the guest to mount this
export point.
- ``multidevs=multidevs``
- Specifies how to deal with multiple devices being shared with a
- 9p export. Supported behaviours are either "remap", "forbid" or
- "warn". The latter is the default behaviour on which virtfs 9p
- expects only one device to be shared with the same export, and
- if more than one device is shared and accessed via the same 9p
- export then only a warning message is logged (once) by qemu on
- host side. In order to avoid file ID collisions on guest you
- should either create a separate virtfs export for each device to
- be shared with guests (recommended way) or you might use "remap"
- instead which allows you to share multiple devices with only one
- export instead, which is achieved by remapping the original
- inode numbers from host to guest in a way that would prevent
- such collisions. Remapping inodes in such use cases is required
+ ``multidevs=remap|forbid|warn``
+ Specifies how to deal with multiple devices being shared with
+ the same 9p export in order to avoid file ID collisions on guest.
+ Supported behaviours are either "remap" (default), "forbid" or
+ "warn".
+
+ ``remap`` : assumes the possibility that more than one device is
+ shared with the same 9p export. Therefore inode numbers from host
+ are remapped for guest in a way that would prevent file ID
+ collisions on guest. Remapping inodes in such cases is required
because the original device IDs from host are never passed and
exposed on guest. Instead all files of an export shared with
- virtfs always share the same device id on guest. So two files
+ virtfs always share the same device ID on guest. So two files
with identical inode numbers but from actually different devices
on host would otherwise cause a file ID collision and hence
- potential misbehaviours on guest. "forbid" on the other hand
- assumes like "warn" that only one device is shared by the same
- export, however it will not only log a warning message but also
- deny access to additional devices on guest. Note though that
- "forbid" does currently not block all possible file access
- operations (e.g. readdir() would still return entries from other
- devices).
+ potential severe misbehaviours on guest.
+
+ ``warn`` : virtfs 9p expects only one device to be shared with
+ the same export. If however more than one device is shared and
+ accessed via the same 9p export then only a warning message is
+ logged (once) by qemu on host side. No further action is performed
+ in this case that would prevent file ID collisions on guest. This
+ could thus lead to severe misbehaviours in this case like wrong
+ files being accessed and data corruption on the exported tree.
+
+ ``forbid`` : assumes like "warn" that only one device is shared
+ by the same 9p export, however it will not only log a warning
+ message but also deny access to additional devices on guest. Note
+ though that "forbid" does currently not block all possible file
+ access operations (e.g. readdir() would still return entries from
+ other devices).
ERST
DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi,
@@ -2377,22 +2377,6 @@ SRST
pick the first available. (Since 2.9)
ERST
-DEF("portrait", 0, QEMU_OPTION_portrait,
- "-portrait rotate graphical output 90 deg left (only PXA LCD)\n",
- QEMU_ARCH_ALL)
-SRST
-``-portrait``
- Rotate graphical output 90 deg left (only PXA LCD).
-ERST
-
-DEF("rotate", HAS_ARG, QEMU_OPTION_rotate,
- "-rotate <deg> rotate graphical output some deg left (only PXA LCD)\n",
- QEMU_ARCH_ALL)
-SRST
-``-rotate deg``
- Rotate graphical output some deg left (only PXA LCD).
-ERST
-
DEF("vga", HAS_ARG, QEMU_OPTION_vga,
"-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]\n"
" select video card type\n", QEMU_ARCH_ALL)
@@ -2812,6 +2796,26 @@ DEFHEADING()
DEFHEADING(Network options:)
DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
+#ifdef CONFIG_PASST
+ "-netdev passt,id=str[,path=file][,quiet=on|off][,vhost-user=on|off]\n"
+ "[,mtu=mtu][,address=addr][,netmask=mask][,mac=addr][,gateway=addr]\n"
+ " [,interface=name][,outbound=address][,outbound-if4=name]\n"
+ " [,outbound-if6=name][,dns=addr][,search=list][,fqdn=name]\n"
+ " [,dhcp-dns=on|off][,dhcp-search=on|off][,map-host-loopback=addr]\n"
+ " [,map-guest-addr=addr][,dns-forward=addr][,dns-host=addr]\n"
+ " [,tcp=on|off][,udp=on|off][,icmp=on|off][,dhcp=on|off]\n"
+ " [,ndp=on|off][,dhcpv6=on|off][,ra=on|off][,freebind=on|off]\n"
+ " [,ipv4=on|off][,ipv6=on|off][,tcp-ports=spec][,udp-ports=spec]\n"
+ " [,param=list]\n"
+ " configure a passt network backend with ID 'str'\n"
+ " if 'path' is not provided 'passt' will be started according to PATH\n"
+ " by default, informational message of passt are not displayed (quiet=on)\n"
+ " to display this message, use 'quiet=off'\n"
+ " by default, passt will be started in socket-based mode, to enable vhost-mode,\n"
+ " use 'vhost-user=on'\n"
+ " for details on other options, refer to passt(1)\n"
+ " 'param' allows to pass any option defined by passt(1)\n"
+#endif
#ifdef CONFIG_SLIRP
"-netdev user,id=str[,ipv4=on|off][,net=addr[/mask]][,host=addr]\n"
" [,ipv6=on|off][,ipv6-net=addr[/int]][,ipv6-host=addr]\n"
@@ -2895,9 +2899,9 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
"-netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port]\n"
" configure a network backend to connect to another network\n"
" using an UDP tunnel\n"
- "-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off][,reconnect=seconds]\n"
- "-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off][,reconnect=seconds]\n"
- "-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect=seconds]\n"
+ "-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off][,reconnect-ms=milliseconds]\n"
+ "-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off][,reconnect-ms=milliseconds]\n"
+ "-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect-ms=milliseconds]\n"
" configure a network backend to connect to another network\n"
" using a socket connection in stream mode.\n"
"-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.host=addr]\n"
@@ -2968,6 +2972,9 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
" configure a hub port on the hub with ID 'n'\n", QEMU_ARCH_ALL)
DEF("nic", HAS_ARG, QEMU_OPTION_nic,
"-nic [tap|bridge|"
+#ifdef CONFIG_PASST
+ "passt|"
+#endif
#ifdef CONFIG_SLIRP
"user|"
#endif
@@ -3000,6 +3007,9 @@ DEF("net", HAS_ARG, QEMU_OPTION_net,
" configure or create an on-board (or machine default) NIC and\n"
" connect it to hub 0 (please use -nic unless you need a hub)\n"
"-net ["
+#ifdef CONFIG_PASST
+ "passt|"
+#endif
#ifdef CONFIG_SLIRP
"user|"
#endif
@@ -3021,7 +3031,7 @@ DEF("net", HAS_ARG, QEMU_OPTION_net,
" old way to initialize a host network interface\n"
" (use the -netdev option if possible instead)\n", QEMU_ARCH_ALL)
SRST
-``-nic [tap|bridge|user|l2tpv3|vde|netmap|af-xdp|vhost-user|socket][,...][,mac=macaddr][,model=mn]``
+``-nic [tap|passt|bridge|user|l2tpv3|vde|netmap|af-xdp|vhost-user|socket][,...][,mac=macaddr][,model=mn]``
This option is a shortcut for configuring both the on-board
(default) guest NIC hardware and the host network backend in one go.
The host backend options are the same as with the corresponding
@@ -3043,6 +3053,129 @@ SRST
network backend) which is activated if no other networking options
are provided.
+``-netdev passt,id=str[,option][,...]``
+ Configure a passt network backend which requires no administrator
+ privilege to run. Valid options are:
+
+ ``id=id``
+ Assign symbolic name for use in monitor commands.
+
+ ``path=file``
+ Filename of the passt program to run. If it is not provided,
+ passt command will be started with the help of the PATH environment
+ variable.
+
+ ``quiet=on|off``
+ By default, ``quiet=on`` to disable informational message from
+ passt. ``quiet=on`` is passed as ``--quiet`` to passt.
+
+ ``vhost-user=on|off``
+ By default, ``vhost-user=off`` and QEMU uses the stream network
+ backend to communicate with passt. If ``vhost-user=on``, passt is
+ started with ``--vhost-user`` and QEMU uses the vhost-user network
+ backend to communicate with passt.
+
+ ``@mtu``
+ Assign MTU via DHCP/NDP
+
+ ``address``
+ IPv4 or IPv6 address
+
+ ``netmask``
+ IPv4 mask
+
+ ``mac``
+ source MAC address
+
+ ``gateway``
+ IPv4 or IPv6 address as gateway
+
+ ``interface``
+ Interface for addresses and routes
+
+ ``outbound``
+ Bind to address as outbound source
+
+ ``outbound-if4``
+ Bind to outbound interface for IPv4
+
+ ``outbound-if6``
+ Bind to outbound interface for IPv6
+
+ ``dns``
+ IPv4 or IPv6 address as DNS
+
+ ``search``
+ Search domains
+
+ ``fqdn``
+ FQDN to configure client with
+
+ ``dhcp-dns``
+ Enable/disable DNS list in DHCP/DHCPv6/NDP
+
+ ``dhcp-search``
+ Enable/disable list in DHCP/DHCPv6/NDP
+
+ ``map-host-loopback``
+ Addresse to refer to host
+
+ ``map-guest-addr``
+ Addr to translate to guest's address
+
+ ``dns-forward``
+ Forward DNS queries sent to
+
+ ``dns-host``
+ Host nameserver to direct queries to
+
+ ``tcp``
+ Enable/disable TCP
+
+ ``udp``
+ Enable/disable UDP
+
+ ``icmp``
+ Enable/disable ICMP
+
+ ``dhcp``
+ Enable/disable DHCP
+
+ ``ndp``
+ Enable/disable NDP
+
+ ``dhcpv6``
+ Enable/disable DHCPv6
+
+ ``ra``
+ Enable/disable route advertisements
+
+ ``freebind``
+ Bind to any address for forwarding
+
+ ``ipv4``
+ Enable/disable IPv4
+
+ ``ipv6``
+ Enable/disable IPv6
+
+ ``tcp-ports``
+ TCP ports to forward
+
+ ``udp-ports``
+ UDP ports to forward
+
+ ``param=string``
+ ``string`` will be passed to passt has a command line parameter,
+ we can have multiple occurences of the ``param`` parameter to
+ pass multiple parameters to passt.
+
+ For instance, to pass ``--trace --log=trace.log``:
+
+ .. parsed-literal::
+
+ |qemu_system| -nic passt,param=--trace,param=--log=trace.log
+
``-netdev user,id=id[,option][,option][,...]``
Configure user mode host network backend which requires no
administrator privilege to run. Valid options are:
@@ -3353,7 +3486,7 @@ SRST
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
-netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
-``-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off][,reconnect=seconds]``
+``-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off][,reconnect-ms=milliseconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a TCP/IP socket.
``server=on|off``
@@ -3380,8 +3513,8 @@ SRST
``ipv6=on|off``
whether to accept IPv6 addresses, default to try both IPv4 and IPv6
- ``reconnect=seconds``
- for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of seconds.
+ ``reconnect-ms=milliseconds``
+ for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of milliseconds.
Setting this to zero disables this function. (default: 0)
Example (two guests connected using a TCP/IP socket):
@@ -3395,9 +3528,9 @@ SRST
# second VM
|qemu_system| linux.img \\
-device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
- -netdev stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234,reconnect=5
+ -netdev stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234,reconnect-ms=5000
-``-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off][,reconnect=seconds]``
+``-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off][,reconnect-ms=milliseconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a stream oriented unix domain socket.
``server=on|off``
@@ -3412,8 +3545,8 @@ SRST
``tight=on|off``
if false, pad an abstract socket address with enough null bytes to make it fill struct sockaddr_un member sun_path.
- ``reconnect=seconds``
- for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of seconds.
+ ``reconnect-ms=milliseconds``
+ for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of milliseconds.
Setting this to zero disables this function. (default: 0)
Example (using passt as a replacement of -netdev user):
@@ -3439,9 +3572,9 @@ SRST
# second VM
|qemu_system| linux.img \\
-device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
- -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0,reconnect=5
+ -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0,reconnect-ms=5000
-``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect=seconds]``
+``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect-ms=milliseconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a stream oriented socket file descriptor.
``server=on|off``
@@ -3450,8 +3583,8 @@ SRST
``addr.str=file-descriptor``
file descriptor number to use as a socket
- ``reconnect=seconds``
- for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of seconds.
+ ``reconnect-ms=milliseconds``
+ for a client socket, if a socket is disconnected, then attempt a reconnect after the given number of milliseconds.
Setting this to zero disables this function. (default: 0)
``-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.host=addr]``
@@ -3727,7 +3860,7 @@ SRST
Use ``-net nic,model=help`` for a list of available devices for your
target.
-``-net user|tap|bridge|socket|l2tpv3|vde[,...][,name=name]``
+``-net user|passt|tap|bridge|socket|l2tpv3|vde[,...][,name=name]``
Configure a host network backend (with the options corresponding to
the same ``-netdev`` option) and connect it to the emulated hub 0
(the default hub). Use name to specify the name of the hub port.
@@ -3741,9 +3874,9 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
"-chardev help\n"
"-chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
"-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,nodelay=on|off]\n"
- " [,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds][,mux=on|off]\n"
+ " [,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect-ms=milliseconds][,mux=on|off]\n"
" [,logfile=PATH][,logappend=on|off][,tls-creds=ID][,tls-authz=ID] (tcp)\n"
- "-chardev socket,id=id,path=path[,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds]\n"
+ "-chardev socket,id=id,path=path[,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect-ms=milliseconds]\n"
" [,mux=on|off][,logfile=PATH][,logappend=on|off][,abstract=on|off][,tight=on|off] (unix)\n"
"-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
" [,localport=localport][,ipv4=on|off][,ipv6=on|off][,mux=on|off]\n"
@@ -3758,7 +3891,7 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
"-chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
"-chardev serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
#else
- "-chardev pty,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
+ "-chardev pty,id=id[,path=path][,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
"-chardev stdio,id=id[,mux=on|off][,signal=on|off][,logfile=PATH][,logappend=on|off]\n"
#endif
#ifdef CONFIG_BRLAPI
@@ -3782,7 +3915,7 @@ SRST
The general form of a character device option is:
``-chardev backend,id=id[,mux=on|off][,options]``
- Backend is one of: ``null``, ``socket``, ``udp``, ``msmouse``,
+ Backend is one of: ``null``, ``socket``, ``udp``, ``msmouse``, ``hub``,
``vc``, ``ringbuf``, ``file``, ``pipe``, ``console``, ``serial``,
``pty``, ``stdio``, ``braille``, ``parallel``,
``spicevmc``, ``spiceport``. The specific backend will determine the
@@ -3839,9 +3972,10 @@ The general form of a character device option is:
the QEMU monitor, and ``-nographic`` also multiplexes the console
and the monitor to stdio.
- There is currently no support for multiplexing in the other
- direction (where a single QEMU front end takes input and output from
- multiple chardevs).
+ If you need to aggregate data in the opposite direction (where one
+ QEMU frontend interface receives input and output from multiple
+ backend chardev devices), please refer to the paragraph below
+ regarding chardev ``hub`` aggregator device configuration.
Every backend supports the ``logfile`` option, which supplies the
path to a file to record all data transmitted via the backend. The
@@ -3854,7 +3988,7 @@ The available backends are:
A void device. This device will not emit any data, and will drop any
data it receives. The null backend does not take any options.
-``-chardev socket,id=id[,TCP options or unix options][,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds][,tls-creds=id][,tls-authz=id]``
+``-chardev socket,id=id[,TCP options or unix options][,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect-ms=milliseconds][,tls-creds=id][,tls-authz=id]``
Create a two-way stream socket, which can be either a TCP or a unix
socket. A unix socket will be created if ``path`` is specified.
Behaviour is undefined if TCP options are specified for a unix
@@ -3871,9 +4005,9 @@ The available backends are:
``websocket=on|off`` specifies that the socket uses WebSocket protocol for
communication.
- ``reconnect`` sets the timeout for reconnecting on non-server
+ ``reconnect-ms`` sets the timeout for reconnecting on non-server
sockets when the remote end goes away. qemu will delay this many
- seconds and then attempt to reconnect. Zero disables reconnecting,
+ milliseconds and then attempt to reconnect. Zero disables reconnecting,
and is the default.
``tls-creds`` requests enablement of the TLS protocol for
@@ -3941,6 +4075,46 @@ The available backends are:
Forward QEMU's emulated msmouse events to the guest. ``msmouse``
does not take any options.
+``-chardev hub,id=id,chardevs.0=id[,chardevs.N=id]``
+ Explicitly create chardev backend hub device with the possibility
+ to aggregate input from multiple backend devices and forward it to
+ a single frontend device. Additionally, ``hub`` device takes the
+ output from the frontend device and sends it back to all the
+ connected backend devices. This allows for seamless interaction
+ between different backend devices and a single frontend
+ interface. Aggregation supported for up to 4 chardev
+ devices. (Since 10.0)
+
+ For example, the following is a use case of 2 backend devices:
+ virtual console ``vc0`` and a pseudo TTY ``pty0`` connected to
+ a single virtio hvc console frontend device with a hub ``hub0``
+ help. Virtual console renders text to an image, which can be
+ shared over the VNC protocol. In turn, pty backend provides
+ bidirectional communication to the virtio hvc console over the
+ pseudo TTY file. The example configuration can be as follows:
+
+ ::
+
+ -chardev pty,path=/tmp/pty,id=pty0 \
+ -chardev vc,id=vc0 \
+ -chardev hub,id=hub0,chardevs.0=pty0,chardevs.1=vc0 \
+ -device virtconsole,chardev=hub0 \
+ -vnc 0.0.0.0:0
+
+ Once QEMU starts VNC client and any TTY emulator can be used to
+ control a single hvc console:
+
+ ::
+
+ # Start TTY emulator
+ tio /tmp/pty
+
+ # Start VNC client and switch to virtual console Ctrl-Alt-2
+ vncviewer :0
+
+ Several frontend devices is not supported. Stacking of multiplexers
+ and hub devices is not supported as well.
+
``-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]``
Connect to a QEMU text console. ``vc`` may optionally be given a
specific size.
@@ -3997,12 +4171,22 @@ The available backends are:
``path`` specifies the name of the serial device to open.
-``-chardev pty,id=id``
- Create a new pseudo-terminal on the host and connect to it. ``pty``
- does not take any options.
+``-chardev pty,id=id[,path=path]``
+ Create a new pseudo-terminal on the host and connect to it.
``pty`` is not available on Windows hosts.
+ If ``path`` is specified, QEMU will create a symbolic link at
+ that location which points to the new PTY device.
+
+ This avoids having to make QMP or HMP monitor queries to find out
+ what the new PTY device path is.
+
+ Note that while QEMU will remove the symlink when it exits
+ gracefully, it will not do so in case of crashes or on certain
+ startup errors. It is recommended that the user checks and removes
+ the symlink after QEMU terminates to account for this.
+
``-chardev stdio,id=id[,signal=on|off]``
Connect to standard input and standard output of the QEMU process.
@@ -4197,6 +4381,13 @@ SRST
or in multiboot format.
ERST
+DEF("shim", HAS_ARG, QEMU_OPTION_shim, \
+ "-shim shim.efi use 'shim.efi' to boot the kernel\n", QEMU_ARCH_ALL)
+SRST
+``-shim shim.efi``
+ Use 'shim.efi' to boot the kernel
+ERST
+
DEF("append", HAS_ARG, QEMU_OPTION_append, \
"-append cmdline use 'cmdline' as kernel command line\n", QEMU_ARCH_ALL)
SRST
@@ -4360,8 +4551,19 @@ SRST
vc:80Cx24C
- ``pty``
- [Linux only] Pseudo TTY (a new PTY is automatically allocated)
+ ``pty[:path]``
+ [Linux only] Pseudo TTY (a new PTY is automatically allocated).
+
+ If ``path`` is specified, QEMU will create a symbolic link at
+ that location which points to the new PTY device.
+
+ This avoids having to make QMP or HMP monitor queries to find
+ out what the new PTY device path is.
+
+ Note that while QEMU will remove the symlink when it exits
+ gracefully, it will not do so in case of crashes or on certain
+ startup errors. It is recommended that the user checks and
+ removes the symlink after QEMU terminates to account for this.
``none``
No device is allocated. Note that for machine types which
@@ -4431,14 +4633,14 @@ SRST
``telnet options:``
localhost 5555
- ``tcp:[host]:port[,server=on|off][,wait=on|off][,nodelay=on|off][,reconnect=seconds]``
+ ``tcp:[host]:port[,server=on|off][,wait=on|off][,nodelay=on|off][,reconnect-ms=milliseconds]``
The TCP Net Console has two modes of operation. It can send the
serial I/O to a location or wait for a connection from a
location. By default the TCP Net Console is sent to host at the
port. If you use the ``server=on`` option QEMU will wait for a client
socket application to connect to the port before continuing,
unless the ``wait=on|off`` option was specified. The ``nodelay=on|off``
- option disables the Nagle buffering algorithm. The ``reconnect=on``
+ option disables the Nagle buffering algorithm. The ``reconnect-ms``
option only applies if ``server=no`` is set, if the connection goes
down it will attempt to reconnect at the given interval. If host
is omitted, 0.0.0.0 is assumed. Only one TCP connection at a
@@ -4468,7 +4670,7 @@ SRST
The WebSocket protocol is used instead of raw tcp socket. The
port acts as a WebSocket server. Client mode is not supported.
- ``unix:path[,server=on|off][,wait=on|off][,reconnect=seconds]``
+ ``unix:path[,server=on|off][,wait=on|off][,reconnect-ms=milliseconds]``
A unix domain socket is used instead of a tcp socket. The option
works the same as if you had specified ``-serial tcp`` except
the unix domain socket path is used for connections.
@@ -4607,21 +4809,25 @@ SRST
ERST
DEF("overcommit", HAS_ARG, QEMU_OPTION_overcommit,
- "-overcommit [mem-lock=on|off][cpu-pm=on|off]\n"
+ "-overcommit [mem-lock=on|off|on-fault][cpu-pm=on|off]\n"
" run qemu with overcommit hints\n"
- " mem-lock=on|off controls memory lock support (default: off)\n"
+ " mem-lock=on|off|on-fault controls memory lock support (default: off)\n"
" cpu-pm=on|off controls cpu power management (default: off)\n",
QEMU_ARCH_ALL)
SRST
-``-overcommit mem-lock=on|off``
+``-overcommit mem-lock=on|off|on-fault``
\
``-overcommit cpu-pm=on|off``
Run qemu with hints about host resource overcommit. The default is
to assume that host overcommits all resources.
Locking qemu and guest memory can be enabled via ``mem-lock=on``
- (disabled by default). This works when host memory is not
- overcommitted and reduces the worst-case latency for guest.
+ or ``mem-lock=on-fault`` (disabled by default). This works when
+ host memory is not overcommitted and reduces the worst-case latency for
+ guest. The on-fault option is better for reducing the memory footprint
+ since it makes allocations lazy, but the pages still get locked in place
+ once faulted by the guest or QEMU. Note that the two options are mutually
+ exclusive.
Guest ability to manage power state of host cpus (increasing latency
for other processes on the same host cpu, but decreasing latency for
@@ -4805,7 +5011,7 @@ SRST
Start right away with a saved state (``loadvm`` in monitor)
ERST
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(EMSCRIPTEN)
DEF("daemonize", 0, QEMU_OPTION_daemonize, \
"-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
#endif
@@ -4879,13 +5085,13 @@ SRST
with actual performance.
When the virtual cpu is sleeping, the virtual time will advance at
- default speed unless ``sleep=on`` is specified. With
- ``sleep=on``, the virtual time will jump to the next timer
+ default speed unless ``sleep=off`` is specified. With
+ ``sleep=off``, the virtual time will jump to the next timer
deadline instantly whenever the virtual cpu goes to sleep mode and
will not advance if no timer is enabled. This behavior gives
deterministic execution times from the guest point of view.
- The default if icount is enabled is ``sleep=off``.
- ``sleep=on`` cannot be used together with either ``shift=auto``
+ The default if icount is enabled is ``sleep=on``.
+ ``sleep=off`` cannot be used together with either ``shift=auto``
or ``align=on``.
``align=on`` will activate the delay algorithm which will try to
@@ -4963,10 +5169,18 @@ DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
"-incoming exec:cmdline\n" \
" accept incoming migration on given file descriptor\n" \
" or from given external command\n" \
+ "-incoming <channel>\n" \
+ " accept incoming migration on the migration channel\n" \
"-incoming defer\n" \
" wait for the URI to be specified via migrate_incoming\n",
QEMU_ARCH_ALL)
SRST
+The -incoming option specifies the migration channel for an incoming
+migration. It may be used multiple times to specify multiple
+migration channel types. The channel type is specified in <channel>,
+or is 'main' for all other forms of -incoming. If multiple -incoming
+options are specified for a channel type, the last one takes precedence.
+
``-incoming tcp:[host]:port[,to=maxport][,ipv4=on|off][,ipv6=on|off]``
\
``-incoming rdma:host:port[,ipv4=on|off][,ipv6=on|off]``
@@ -4986,6 +5200,19 @@ SRST
Accept incoming migration as an output from specified external
command.
+``-incoming <channel>``
+ Accept incoming migration on the migration channel. For the syntax
+ of <channel>, see the QAPI documentation of ``MigrationChannel``.
+ Examples:
+ ::
+
+ -incoming '{"channel-type": "main",
+ "addr": { "transport": "socket",
+ "type": "unix",
+ "path": "my.sock" }}'
+
+ -incoming main,addr.transport=socket,addr.type=unix,addr.path=my.sock
+
``-incoming defer``
Wait for the URI to be specified via migrate\_incoming. The monitor
can be used to change settings (such as migration parameters) prior
@@ -5010,19 +5237,6 @@ SRST
``-nodefaults`` option will disable all those default devices.
ERST
-#ifndef _WIN32
-DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
- "-runas user change to user id user just before starting the VM\n" \
- " user can be numeric uid:gid instead\n",
- QEMU_ARCH_ALL)
-#endif
-SRST
-``-runas user``
- Immediately before starting guest execution, drop root privileges,
- switching to the specified user. This option is deprecated, use
- ``-run-with user=...`` instead.
-ERST
-
DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
"-prom-env variable=value\n"
" set OpenBIOS nvram variables\n",
@@ -5184,7 +5398,7 @@ HXCOMM Internal use
DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
-#ifdef CONFIG_POSIX
+#if defined(CONFIG_POSIX) && !defined(EMSCRIPTEN)
DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
"-run-with [async-teardown=on|off][,chroot=dir][user=username|uid:gid]\n"
" Set miscellaneous QEMU process lifecycle options:\n"
@@ -5210,7 +5424,7 @@ SRST
``chroot=dir`` can be used for doing a chroot to the specified directory
immediately before starting the guest execution. This is especially useful
- in combination with -runas.
+ in combination with ``user=...``.
``user=username`` or ``user=uid:gid`` can be used to drop root privileges
before starting guest execution. QEMU will use the ``setuid`` and ``setgid``
@@ -5927,6 +6141,34 @@ SRST
-machine ...,memory-encryption=sev0 \\
.....
+ ``-object igvm-cfg,file=file``
+ Create an IGVM configuration object that defines the initial state
+ of the guest using a file in that conforms to the Independent Guest
+ Virtual Machine (IGVM) file format.
+
+ This is currently only supported by ``-machine q35`` and
+ ``-machine pc``.
+
+ The ``file`` parameter is used to specify the IGVM file to load.
+ When provided, the IGVM file is used to populate the initial
+ memory of the virtual machine and, depending on the platform, can
+ define the initial processor state, memory map and parameters.
+
+ The IGVM file is expected to contain the firmware for the virtual
+ machine, therefore an ``igvm-cfg`` object cannot be provided along
+ with other ways of specifying firmware, such as the ``-bios``
+ parameter on x86 machines.
+
+ e.g to launch a machine providing the firmware in an IGVM file
+
+ .. parsed-literal::
+
+ # |qemu_system_x86| \\
+ ...... \\
+ -object igvm-cfg,id=igvm0,file=bios.igvm \\
+ -machine ...,igvm-cfg=igvm0 \\
+ .....
+
``-object authz-simple,id=id,identity=string``
Create an authorization object that will control access to
network services.