neulab/tldr huggingface dataset:
-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val] Add a KCS IPMI interafce on the ISA bus. This also adds a corresponding ACPI and SMBIOS entries, if appropriate.
bmc=id The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
ioport=val Define the I/O address of the interface. The default is 0xca0 for KCS.
irq=val Define the interrupt to use. The default is 5. To disable interrupts, set this to 0.
-device isa-ipmi-bt,bmc=id[,ioport=val][,irq=val] Like the KCS interface, but defines a BT interface. The default port is 0xe4 and the default interrupt is 5.
-device pci-ipmi-kcs,bmc=id Add a KCS IPMI interafce on the PCI bus.
-device pci-ipmi-bt,bmc=id Like the KCS interface, but defines a BT interface on the PCI bus.
-device intel-iommu[,option=...] This is only supported by -machine q35, which will enable Intel VT-d emulation within the guest.  It supports below options:
intremap=on|off (default: auto) This enables interrupt remapping feature.  It's required to enable complete x2apic.  Currently it only supports kvm kernel-irqchip modes off or split, while full kernel-irqchip is not yet supported.  The default value is "auto", which will be decided by the mode of kernel-irqchip.
caching-mode=on|off (default: off) This enables caching mode for the VT-d emulated device. When caching-mode is enabled, each guest DMA buffer mapping will generate an IOTLB invalidation from the guest IOMMU driver to the vIOMMU device in a synchronous way.  It is required for -device vfio-pci to work with the VT-d device, because host assigned devices requires to setup the DMA mapping on the host before guest DMA starts.
device-iotlb=on|off (default: off) This enables device-iotlb capability for the emulated VT-d device.  So far virtio/vhost should be the only real user for this parameter, paired with ats=on configured for the device.
aw-bits=39|48 (default: 39) This decides the address width of IOVA address space.  The address space has 39 bits width for 3-level IOMMU page tables, and 48 bits for 4-level IOMMU page tables.
Please also refer to the wiki page for general scenarios of VT-d emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
-name name Sets the name of the guest. This name will be displayed in the SDL window caption. The name will also be used for the VNC server. Also optionally set the top visible process name in Linux. Naming of individual threads can also be enabled on Linux to aid debugging.
-uuid uuid Set system UUID.
Block device options -fda file
-fdb file Use file as floppy disk 0/1 image (see the disk images chapter in the System Emulation Users Guide).
-hda file
-hdb file
-hdc file
-hdd file Use file as hard disk 0, 1, 2 or 3 image (see the disk images chapter in the System Emulation Users Guide).
-cdrom file Use file as CD-ROM image (you cannot use -hdc and -cdrom at the same time). You can use the host CD-ROM by using /dev/cdrom as filename.
-blockdev option[,option[,option[,...]]] Define a new block driver node. Some of the options apply to all block drivers, other options are only accepted for a specific block driver. See below for a list of generic options and options for the most common block drivers.
Options that expect a reference to another node (e.g. file) can be given in two ways. Either you specify the node name of an already existing node (file=node-name), or you define a new node inline, adding options for the referenced node after a dot (file.filename=path,file.aio=native).
A block driver node created with -blockdev can be used for a guest device by specifying its node name for the drive property in a -device argument that defines a block device.
Valid options for any block driver node:
driver Specifies the block driver to use for the given node.
node-name This defines the name of the block driver node by which it will be referenced later. The name must be unique, i.e. it must not match the name of a different block driver node, or (if you use -drive as well) the ID of a drive.
If no node name is specified, it is automatically generated.  The generated node name is not intended to be predictable and changes between QEMU invocations. For the top level, an explicit node name must be specified.
read-only Open the node read-only. Guest write attempts will fail.
Note that some block drivers support only read-only access, either generally or in certain configurations. In this case, the default value read-only=off does not work and the option must be specified explicitly.
auto-read-only If auto-read-only=on is set, QEMU may fall back to read-only usage even when read-only=off is requested, or even switch between modes as needed, e.g. depending on whether the image file is writable or whether a writing user is attached to the node.
force-share Override the image locking system of QEMU by forcing the node to utilize weaker shared access for permissions where it would normally request exclusive access. When there is the potential for multiple instances to have the same file open (whether this invocation of QEMU is the first or the second instance), both instances must permit shared access for the second instance to succeed at opening the file.
Enabling force-share=on requires read-only=on.
cache.direct The host page cache can be avoided with cache.direct=on.  This will attempt to do disk IO directly to the guest's memory. QEMU may still perform an internal copy of the data.
cache.no-flush In case you don't care about data integrity over host failures, you can use cache.no-flush=on. This option tells QEMU that it never needs to write any data to the disk but can instead keep things in cache. If anything goes wrong, like your host losing power, the disk storage getting disconnected accidentally, etc. your image will most probably be rendered unusable.
discard=discard discard is one of "ignore" (or "off") or "unmap" (or "on") and controls whether discard (also known as trim or unmap) requests are ignored or passed to the filesystem.  Some machine types may not support discard requests.
detect-zeroes=detect-zeroes detect-zeroes is "off", "on" or "unmap" and enables the automatic conversion of plain zero writes by the OS to driver specific optimized zero write commands. You may even choose "unmap" if discard is set to "unmap" to allow a zero write to be converted to an unmap operation.
Driver-specific options for file This is the protocol-level block driver for accessing regular files.
filename The path to the image file in the local filesystem
aio    Specifies the AIO backend (threads/native/io_uring, default: threads)
locking Specifies whether the image file is protected with Linux OFD / POSIX locks. The default is to use the Linux Open File Descriptor API if available, otherwise no lock is applied.  (auto/on/off, default: auto)
-blockdev driver=file,node-name=disk,filename=disk.img
Driver-specific options for raw This is the image format block driver for raw images. It is usually stacked on top of a protocol level block driver such as file.
file   Reference to or definition of the data source block driver node (e.g. a file driver node)
-blockdev driver=file,node-name=disk_file,filename=disk.img -blockdev driver=raw,node-name=disk,file=disk_file
-blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
Driver-specific options for qcow2 This is the image format block driver for qcow2 images. It is usually stacked on top of a protocol level block driver such as file.
backing Reference to or definition of the backing file block device (default is taken from the image file). It is allowed to pass null here in order to disable the default backing file.
lazy-refcounts Whether to enable the lazy refcounts feature (on/off; default is taken from the image file)
cache-size The maximum total size of the L2 table and refcount block caches in bytes (default: the sum of l2-cache-size and refcount-cache-size)
l2-cache-size The maximum size of the L2 table cache in bytes (default: if cache-size is not specified - 32M on Linux platforms, and 8M on non-Linux platforms; otherwise, as large as possible within the cache-size, while permitting the requested or the minimal refcount cache size)
refcount-cache-size The maximum size of the refcount block cache in bytes (default: 4 times the cluster size; or if cache-size is specified, the part of it which is not used for the L2 cache)
cache-clean-interval Clean unused entries in the L2 and refcount caches. The interval is in seconds. The default value is 600 on supporting platforms, and 0 on other platforms. Setting it to 0 disables this feature.
pass-discard-request Whether discard requests to the qcow2 device should be forwarded to the data source (on/off; default: on if discard=unmap is specified, off otherwise)
pass-discard-snapshot Whether discard requests for the data source should be issued when a snapshot operation (e.g. deleting a snapshot) frees clusters in the qcow2 file (on/off; default: on)
pass-discard-other Whether discard requests for the data source should be issued on other occasions where a cluster gets freed (on/off; default: off)
overlap-check Which overlap checks to perform for writes to the image (none/constant/cached/all; default: cached). For details or finer granularity control refer to the QAPI documentation of blockdev-add.
-blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2 -blockdev driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
-blockdev driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
Driver-specific options for other drivers Please refer to the QAPI documentation of the blockdev-add QMP command.
-drive option[,option[,option[,...]]] Define a new drive. This includes creating a block driver node (the backend) as well as a guest device, and is mostly a shortcut for defining the corresponding -blockdev and -device options.
-drive accepts all options that are accepted by -blockdev.  In addition, it knows the following options:
file=file This option defines which disk image (see the disk images chapter in the System Emulation Users Guide) to use with this drive.  If the filename contains comma, you must double it (for instance, "file=my,,file" to use file "my,file").
Special files such as iSCSI devices can be specified using protocol specific URLs. See the section for "Device URL Syntax" for more information.
if=interface This option defines on which type on interface the drive is connected. Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio, none.
bus=bus,unit=unit These options define where is connected the drive by defining the bus number and the unit id.
index=index This option defines where is connected the drive by using an index in the list of available connectors of a given interface type.
media=media This option defines the type of the media: disk or cdrom.
snapshot=snapshot snapshot is "on" or "off" and controls snapshot mode for the given drive (see -snapshot).
cache=cache cache is "none", "writeback", "unsafe", "directsync" or "writethrough" and controls how the host cache is used to access block data. This is a shortcut that sets the cache.direct and cache.no-flush options (as in -blockdev), and additionally cache.writeback, which provides a default for the write-cache option of block guest devices (as in -device). The modes correspond to the following settings:
┌─────────────┬─────────────────┬──────────────┬────────────────┐ │             │ cache.writeback │ cache.direct │ cache.no-flush │ ├─────────────┼─────────────────┼──────────────┼────────────────┤ │writeback    │ on              │ off          │ off            │ ├─────────────┼─────────────────┼──────────────┼────────────────┤ │none         │ on              │ on           │ off            │ ├─────────────┼─────────────────┼──────────────┼────────────────┤ │writethrough │ off             │ off          │ off            │ ├─────────────┼─────────────────┼──────────────┼────────────────┤ │directsync   │ off             │ on           │ off            │ ├─────────────┼─────────────────┼──────────────┼────────────────┤ │unsafe       │ on              │ off          │ on             │ └─────────────┴─────────────────┴──────────────┴────────────────┘
The default mode is cache=writeback.
aio=aio aio is "threads", "native", or "io_uring" and selects between pthread based disk I/O, native Linux AIO, or Linux io_uring API.
format=format Specify which disk format will be used rather than detecting the format. Can be used to specify format=raw to avoid interpreting an untrusted format header.
werror=action,rerror=action Specify which action to take on write and read errors. Valid actions are: "ignore" (ignore the error and try to continue), "stop" (pause QEMU), "report" (report the error to the guest), "enospc" (pause QEMU only if the host disk is full; report the error to the guest otherwise). The default setting is werror=enospc and rerror=report.
copy-on-read=copy-on-read copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file.
bps=b,bps_rd=r,bps_wr=w Specify bandwidth throttling limits in bytes per second, either for all request types or for reads or writes only. Small values can lead to timeouts or hangs inside the guest. A safe minimum for disks is 2 MB/s.
bps_max=bm,bps_rd_max=rm,bps_wr_max=wm Specify bursts in bytes per second, either for all request types or for reads or writes only. Bursts allow the guest I/O to spike above the limit temporarily.
iops=i,iops_rd=r,iops_wr=w Specify request rate limits in requests per second, either for all request types or for reads or writes only.
iops_max=bm,iops_rd_max=rm,iops_wr_max=wm Specify bursts in requests per second, either for all request types or for reads or writes only. Bursts allow the guest I/O to spike above the limit temporarily.
iops_size=is Let every is bytes of a request count as a new request for iops throttling purposes. Use this option to prevent guests from circumventing iops limits by sending fewer but larger requests.
group=g Join a throttling quota group with given name g. All drives that are members of the same group are accounted for together. Use this option to prevent guests from circumventing throttling limits by using many small disks instead of a single larger disk.
By default, the cache.writeback=on mode is used. It will report data writes as completed as soon as the data is present in the host page cache. This is safe as long as your guest OS makes sure to correctly flush disk caches where needed. If your guest OS does not handle volatile disk write caches correctly and your host crashes or loses power, then the guest may experience data corruption.
For such guests, you should consider using cache.writeback=off. This means that the host page cache will be used to read and write data, but write notification will be sent to the guest only after QEMU has made sure to flush each write to the disk. Be aware that this has a major impact on performance.
When using the -snapshot option, unsafe caching is always used.
Copy-on-read avoids accessing the same backing file sectors repeatedly and is useful when the backing file is over a slow network. By default copy-on-read is off.
Instead of -cdrom you can use:
qemu-system-x86_64 -drive file=file,index=2,media=cdrom
Instead of -hda, -hdb, -hdc, -hdd, you can use:
qemu-system-x86_64 -drive file=file,index=0,media=disk qemu-system-x86_64 -drive file=file,index=1,media=disk qemu-system-x86_64 -drive file=file,index=2,media=disk qemu-system-x86_64 -drive file=file,index=3,media=disk
You can connect a CDROM to the slave of ide0:
qemu-system-x86_64 -drive file=file,if=ide,index=1,media=cdrom
If you don't specify the "file=" argument, you define an empty drive:
qemu-system-x86_64 -drive if=ide,index=1,media=cdrom
Instead of -fda, -fdb, you can use:
qemu-system-x86_64 -drive file=file,index=0,if=floppy qemu-system-x86_64 -drive file=file,index=1,if=floppy
By default, interface is "ide" and index is automatically incremented:
qemu-system-x86_64 -drive file=a -drive file=b"
is interpreted like:
qemu-system-x86_64 -hda a -hdb b
-mtdblock file Use file as on-board Flash memory image.
-sd file Use file as SecureDigital card image.
-pflash file Use file as a parallel flash image.
-snapshot Write to temporary files instead of disk image files. In this case, the raw disk image you use is not written back. You can however force the write back by pressing C-a s (see the disk images chapter in the System Emulation Users Guide).
-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).
synth  Synthetic filesystem, only used by QTests.
id=id  Specifies identifier for this device.
path=path Specifies the export path for the file system device. Files under this path will be available to the 9p client on the guest.
security_model=security_model Specifies the security model to be used for this export path.  Supported security models are "passthrough", "mapped-xattr", "mapped-file" and "none". In "passthrough" security model, files are stored using the same credentials as they are created on the guest. This requires QEMU to run as root. In "mapped-xattr" security model, some of the file attributes like uid, gid, mode bits and link target are stored as file attributes. For "mapped-file" these attributes are stored in the hidden .virtfs_metadata directory. Directories exported by this security model cannot interact with other unix tools. "none" 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 "immediate". This means that host page cache will be used to read and write data but write notification will be sent to the guest only when the data has been reported as written by the storage subsystem.
readonly=on 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 "mapped-file".
dmode=dmode Specifies the default mode for newly created directories on the host. Works only with security models "mapped-xattr" and "mapped-file".
throttling.bps-total=b,throttling.bps-read=r,throttling.bps-write=w Specify bandwidth throttling limits in bytes per second, either for all request types or for reads or writes only.
throttling.bps-total-max=bm,bps-read-max=rm,bps-write-max=wm Specify bursts in bytes per second, either for all request types or for reads or writes only. Bursts allow the guest I/O to spike above the limit temporarily.
throttling.iops-total=i,throttling.iops-read=r, throttling.iops-write=w Specify request rate limits in requests per second, either for all request types or for reads or writes only.
throttling.iops-total-max=im,throttling.iops-read-max=irm, throttling.iops-write-max=iwm Specify bursts in requests per second, either for all request types or for reads or writes only. Bursts allow the guest I/O to spike above the limit temporarily.
throttling.iops-size=is Let every is bytes of a request count as a new request for iops throttling purposes.
-fsdev option is used along with -device driver "virtio-9p-...".
-device virtio-9p-type,fsdev=id,mount_tag=mount_tag Options for virtio-9p-... driver are:
type   Specifies the variant to be used. Supported values are "pci", "ccw" or "device", depending on the machine type.
fsdev=id Specifies the id value specified along with -fsdev option.
mount_tag=mount_tag Specifies the tag name to be used by the guest to mount this export point.
-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 directory on host is made directly accessible by guest as a pass-through file system by using the 9P network protocol for communication between host and guests, if desired even accessible, shared by several guests simultaniously.
Note that -virtfs is actually just a convenience shortcut for its generalized form -fsdev -device virtio-9p-pci.
The general form of pass-through file system options are:
id=id  Specifies identifier for the filesystem device
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).
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 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 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).
-iscsi Configure iSCSI session parameters.
USB convenience options -usb   Enable USB emulation on machine types with an on-board USB host controller (if not enabled by default). Note that on-board USB host controllers may not support USB 3.0. In this case -device qemu-xhci can be used instead on machines with PCI.
-usbdevice devname Add the USB device devname, and enable an on-board USB controller if possible and necessary (just like it can be done via -machine usb=on). Note that this option is mainly intended for the user's convenience only. More fine-grained control can be achieved by selecting a USB host controller (if necessary) and the desired USB device via the -device option instead. For example, instead of using -usbdevice mouse it is possible to use -device qemu-xhci -device usb-mouse to connect the USB mouse to a USB 3.0 controller instead (at least on machines that support PCI and do not have an USB controller enabled by default yet).  For more details, see the chapter about Connecting USB devices in the System Emulation Users Guide.  Possible devices for devname are:
braille Braille device. This will use BrlAPI to display the braille output on a real or fake device (i.e. it also creates a corresponding braille chardev automatically beside the usb-braille USB device).
keyboard Standard USB keyboard. Will override the PS/2 keyboard (if present).
mouse  Virtual Mouse. This will override the PS/2 mouse emulation when activated.
tablet Pointer device that uses absolute coordinates (like a touchscreen). This means QEMU is able to report the mouse position without having to grab the mouse. Also overrides the PS/2 mouse emulation when activated.
wacom-tablet Wacom PenPartner USB tablet.
Display options -display type Select type of display to use. This option is a replacement for the old style -sdl/-curses/... options. Use -display help to list the available display types. Valid values for type are
spice-app[,gl=on|off] Start QEMU as a Spice server and launch the default Spice client application. The Spice server will redirect the serial consoles and QEMU monitors. (Since 4.0)
sdl    Display video output via SDL (usually in a separate graphics window; see the SDL documentation for other possibilities).  Valid parameters are:
alt_grab=on|off : Use Control+Alt+Shift-g to toggle mouse grabbing
ctrl_grab=on|off : Use Right-Control-g to toggle mouse grabbing
gl=on|off|core|es : Use OpenGL for displaying
show-cursor=on|off :  Force showing the mouse cursor
window-close=on|off : Allow to quit qemu with window close button
gtk    Display video output in a GTK window. This interface provides drop-down menus and other UI elements to configure and control the VM during runtime. Valid parameters are:
full-screen=on|off : Start in fullscreen mode
gl=on|off : Use OpenGL for displaying
grab-on-hover=on|off : Grab keyboard input on mouse hover
curses[,charset=<encoding>] Display video output via curses. For graphics device models which support a text mode, QEMU can display this output using a curses/ncurses interface. Nothing is displayed when the graphics device is in graphical mode or if the graphics device does not support a text mode. Generally only the VGA device models support text mode. The font charset used by the guest can be specified with the charset option, for example charset=CP850 for IBM CP850 encoding. The default is CP437.
egl-headless[,rendernode=<file>] Offload all OpenGL operations to a local DRI device. For any graphical display, this display needs to be paired with either VNC or SPICE displays.
vnc=<display> Start a VNC server on display <display>
none   Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the QEMU user. This option differs from the -nographic option in that it only affects what is done with video output; -nographic also changes the destination of the serial and parallel port data.
-nographic Normally, if QEMU is compiled with graphical window support, it displays output such as guest graphics, guest console, and the QEMU monitor in a window. With this option, you can totally disable graphical output so that QEMU is a simple command line application.  The emulated serial port is redirected on the console and muxed with the monitor (unless redirected elsewhere explicitly). Therefore, you can still use QEMU to debug a Linux kernel with a serial console.  Use C-a h for help on switching between the console and monitor.
-curses Normally, if QEMU is compiled with graphical window support, it displays output such as guest graphics, guest console, and the QEMU monitor in a window. With this option, QEMU can display the VGA output when in text mode using a curses/ncurses interface. Nothing is displayed in graphical mode.
-alt-grab Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also affects the special keys (for fullscreen, monitor-mode switching, etc).
-ctrl-grab Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also affects the special keys (for fullscreen, monitor-mode switching, etc).
-no-quit Disable window close capability (SDL and GTK only). This option is deprecated, please use -display ...,window-close=off instead.
-sdl   Enable SDL.
-spice option[,option[,...]] Enable the spice remote desktop protocol. Valid options are
port=<nr> Set the TCP port spice is listening on for plaintext channels.
addr=<addr> Set the IP address spice is listening on. Default is any address.
ipv4=on|off; ipv6=on|off; unix=on|off Force using the specified IP version.
password=<string> Set the password you need to authenticate.
This option is deprecated and insecure because it leaves the password visible in the process listing. Use password-secret instead.
password-secret=<secret-id> Set the ID of the secret object containing the password you need to authenticate.
sasl=on|off Require that the client use SASL to authenticate with the spice.  The exact choice of authentication method used is controlled from the system / user's SASL configuration file for the 'qemu' service. This is typically found in /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user, an environment variable SASL_CONF_PATH can be used to make it search alternate locations for the service config. While some SASL auth methods can also provide data encryption (eg GSSAPI), it is recommended that SASL always be combined with the 'tls' and 'x509' settings to enable use of SSL and server certificates. This ensures a data encryption preventing compromise of authentication credentials.
disable-ticketing=on|off Allow client connects without authentication.
disable-copy-paste=on|off Disable copy paste between the client and the guest.
disable-agent-file-xfer=on|off Disable spice-vdagent based file-xfer between the client and the guest.
tls-port=<nr> Set the TCP port spice is listening on for encrypted channels.
x509-dir=<dir> Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir
x509-key-file=<file>; x509-key-password=<file>; x509-cert-file=<file>; x509-cacert-file=<file>; x509-dh-key-file=<file> The x509 file names can also be configured individually.
tls-ciphers=<list> Specify which ciphers to use.
tls-channel=[main|display|cursor|inputs|record|playback]; plaintext-channel=[main|display|cursor|inputs|record|playback] Force specific channel to be used with or without TLS encryption. The options can be specified multiple times to configure multiple channels. The special name "default" can be used to set the default mode. For channels which are not explicitly forced into one mode the spice client is allowed to pick tls/plaintext as he pleases.
image-compression=[auto_glz|auto_lz|quic|glz|lz|off] Configure image compression (lossless). Default is auto_glz.
jpeg-wan-compression=[auto|never|always]; zlib-glz-wan-compression=[auto|never|always] Configure wan image compression (lossy for slow links). Default is auto.
streaming-video=[off|all|filter] Configure video stream detection. Default is off.
agent-mouse=[on|off] Enable/disable passing mouse events via vdagent. Default is on.
playback-compression=[on|off] Enable/disable audio stream compression (using celt 0.5.1). Default is on.
seamless-migration=[on|off] Enable/disable spice seamless migration. Default is off.
gl=[on|off] Enable/disable OpenGL context. Default is off.
rendernode=<file> DRM render node for OpenGL rendering. If not specified, it will pick the first available. (Since 2.9)
-portrait Rotate graphical output 90 deg left (only PXA LCD).
-rotate deg Rotate graphical output some deg left (only PXA LCD).
-vga type Select type of VGA card to emulate. Valid values for type are
cirrus Cirrus Logic GD5446 Video card. All Windows versions starting from Windows 95 should recognize and use this graphic card. For optimal performances, use 16 bit color depth in the guest and the host OS. (This card was the default before QEMU 2.2)
std    Standard VGA card with Bochs VBE extensions. If your guest OS supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want to use high resolution modes (>= 1280x1024x16) then you should use this option. (This card is the default since QEMU 2.2)
vmware VMWare SVGA-II compatible adapter. Use it if you have sufficiently recent XFree86/XOrg server or Windows guest with a driver for this card.
qxl    QXL paravirtual graphic card. It is VGA compatible (including VESA 2.0 VBE support). Works best with qxl guest drivers installed though. Recommended choice when using the spice protocol.
tcx    (sun4m only) Sun TCX framebuffer. This is the default framebuffer for sun4m machines and offers both 8-bit and 24-bit colour depths at a fixed resolution of 1024x768.
cg3    (sun4m only) Sun cgthree framebuffer. This is a simple 8-bit framebuffer for sun4m machines available in both 1024x768 (OpenBIOS) and 1152x900 (OBP) resolutions aimed at people wishing to run older Solaris versions.
virtio Virtio VGA card.
none   Disable VGA card.
-full-screen Start in full screen.
-g widthxheight[xdepth] Set the initial graphical resolution and depth (PPC, SPARC only).
For PPC the default is 800x600x32.
For SPARC with the TCX graphics device, the default is 1024x768x8 with the option of 1024x768x24. For cgthree, the default is 1024x768x8 with the option of 1152x900x8 for people who wish to use OBP.
-vnc display[,option[,option[,...]]] Normally, if QEMU is compiled with graphical window support, it displays output such as guest graphics, guest console, and the QEMU monitor in a window. With this option, you can have QEMU listen on VNC display display and redirect the VGA display over the VNC session. It is very useful to enable the usb tablet device when using this option (option -device usb-tablet). When using the VNC display, you must use the -k parameter to set the keyboard layout if you are not using en-us. Valid syntax for the display is
to=L   With this option, QEMU will try next available VNC displays, until the number L, if the origianlly defined "-vnc display" is not available, e.g. port 5900+display is already used by another application. By default, to=0.
host:d TCP connections will only be allowed from host on display d. By convention the TCP port is 5900+d. Optionally, host can be omitted in which case the server will accept connections from any host.
unix:path Connections will be allowed over UNIX domain sockets where path is the location of a unix socket to listen for connections on.
none   VNC is initialized but not started. The monitor change command can be used to later start the VNC server.
Following the display value there may be one or more option flags separated by commas. Valid options are
reverse=on|off Connect to a listening VNC client via a "reverse" connection.  The client is specified by the display. For reverse network connections (host:d,``reverse``), the d argument is a TCP port number, not a display number.
websocket=on|off Opens an additional TCP listening port dedicated to VNC Websocket connections. If a bare websocket option is given, the Websocket port is 5700+display. An alternative port can be specified with the syntax websocket=port.
If host is specified connections will only be allowed from this host. It is possible to control the websocket listen address independently, using the syntax websocket=host:port.
If no TLS credentials are provided, the websocket connection runs in unencrypted mode. If TLS credentials are provided, the websocket connection requires encrypted client connections.
password=on|off Require that password based authentication is used for client connections.
The password must be set separately using the set_password command in the QEMU monitor. The syntax to change your password is: set_password <protocol> <password> where <protocol> could be either "vnc" or "spice".
If you would like to change <protocol> password expiration, you should use expire_password <protocol> <expiration-time> where expiration time could be one of the following options: now, never, +seconds or UNIX time of expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800 to make password expire on "Mon Apr 23 12:00:00 EDT 2012" (UNIX time for this date and time).
You can also use keywords "now" or "never" for the expiration time to allow <protocol> password to expire immediately or never expire.
password-secret=<secret-id> Require that password based authentication is used for client connections, using the password provided by the secret object identified by secret-id.
tls-creds=ID Provides the ID of a set of TLS credentials to use to secure the VNC server. They will apply to both the normal VNC server socket and the websocket socket (if enabled). Setting TLS credentials will cause the VNC server socket to enable the VeNCrypt auth mechanism. The credentials should have been previously created using the -object tls-creds argument.
tls-authz=ID Provides the ID of the QAuthZ authorization object against which the client's x509 distinguished name will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
sasl=on|off Require that the client use SASL to authenticate with the VNC server. The exact choice of authentication method used is controlled from the system / user's SASL configuration file for the 'qemu' service. This is typically found in /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user, an environment variable SASL_CONF_PATH can be used to make it search alternate locations for the service config. While some SASL auth methods can also provide data encryption (eg GSSAPI), it is recommended that SASL always be combined with the 'tls' and 'x509' settings to enable use of SSL and server certificates. This ensures a data encryption preventing compromise of authentication credentials. See the VNC security section in the System Emulation Users Guide for details on using SASL authentication.
sasl-authz=ID Provides the ID of the QAuthZ authorization object against which the client's SASL username will validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the VNC server is active. If missing, it will default to denying access.
acl=on|off Legacy method for enabling authorization of clients against the x509 distinguished name and SASL username. It results in the creation of two authz-list objects with IDs of vnc.username and vnc.x509dname. The rules for these objects must be configured with the HMP ACL commands.
This option is deprecated and should no longer be used. The new sasl-authz and tls-authz options are a replacement.
lossy=on|off Enable lossy compression methods (gradient, JPEG, ...). If this option is set, VNC client may receive lossy framebuffer updates depending on its encoding settings. Enabling this option can save a lot of bandwidth at the expense of quality.
non-adaptive=on|off Disable adaptive encodings. Adaptive encodings are enabled by default. An adaptive encoding will try to detect frequently updated screen regions, and send updates in these regions using a lossy encoding (like JPEG). This can be really helpful to save bandwidth when playing videos. Disabling adaptive encodings restores the original static behavior of encodings like Tight.
share=[allow-exclusive|force-shared|ignore] Set display sharing policy. 'allow-exclusive' allows clients to ask for exclusive access. As suggested by the rfb spec this is implemented by dropping other connections. Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch). This is the default.  'force-shared' disables exclusive client access. Useful for shared desktop sessions, where you don't want someone forgetting specify -shared disconnect everybody else. 'ignore' completely ignores the shared flag and allows everybody connect unconditionally. Doesn't conform to the rfb spec but is traditional QEMU behavior.
key-delay-ms Set keyboard delay, for key down and key up events, in milliseconds. Default is 10. Keyboards are low-bandwidth devices, so this slowdown can help the device and guest to keep up and not lose events in case events are arriving in bulk.  Possible causes for the latter are flaky network connections, or scripts for automated testing.
audiodev=audiodev Use the specified audiodev when the VNC client requests audio transmission. When not using an -audiodev argument, this option must be omitted, otherwise is must be present and specify a valid audiodev.
power-control=on|off Permit the remote client to issue shutdown, reboot or reset power control requests.
i386 target only -win2k-hack Use it when installing Windows 2000 to avoid a disk full bug. After Windows 2000 is installed, you no longer need this option (this option slows down the IDE transfers).
-no-fd-bootchk Disable boot signature checking for floppy disks in BIOS. May be needed to boot from old floppy disks.
-no-acpi Disable ACPI (Advanced Configuration and Power Interface) support. Use it if your guest OS complains about ACPI problems (PC target machine only).
-no-hpet Disable HPET support.
-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n] [,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...] Add ACPI table with specified header fields and context from specified files. For file=, take whole ACPI table from the specified files, including all ACPI headers (possible overridden by other options). For data=, only data portion of the table is used, all header information is specified in the command line. If a SLIC table is supplied to QEMU, then the SLIC's oem_id and oem_table_id fields will override the same in the RSDT and the FADT (a.k.a.  FACP), in order to ensure the field matches required by the Microsoft SLIC spec and the ACPI spec.
-smbios file=binary Load SMBIOS entry from binary file.
-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d][,uefi=on|off] Specify SMBIOS type 0 fields
-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str][,uuid=uuid][,sku=str][,family=str] Specify SMBIOS type 1 fields
-smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str][,asset=str][,location=str] Specify SMBIOS type 2 fields
-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str][,sku=str] Specify SMBIOS type 3 fields
-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str][,asset=str][,part=str] Specify SMBIOS type 4 fields
-smbios type=11[,value=str][,path=filename] Specify SMBIOS type 11 fields
This argument can be repeated multiple times, and values are added in the order they are parsed.  Applications intending to use OEM strings data are encouraged to use their application name as a prefix for the value string. This facilitates passing information for multiple applications concurrently.
The value=str syntax provides the string data inline, while the path=filename syntax loads data from a file on disk. Note that the file is not permitted to contain any NUL bytes.
Both the value and path options can be repeated multiple times and will be added to the SMBIOS table in the order in which they appear.
Note that on the x86 architecture, the total size of all SMBIOS tables is limited to 65535 bytes. Thus the OEM strings data is not suitable for passing large amounts of data into the guest. Instead it should be used as a indicator to inform the guest where to locate the real data set, for example, by specifying the serial ID of a block device.
An example passing three strings is
-smbios type=11,value=cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/,\ value=anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os,\ path=/some/file/with/oemstringsdata.txt
In the guest OS this is visible with the dmidecode command
$ dmidecode -t 11 Handle 0x0E00, DMI type 11, 5 bytes OEM Strings String 1: cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/ String 2: anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os String 3: myapp:some extra data
-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str][,asset=str][,part=str][,speed=%d] Specify SMBIOS type 17 fields
-smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str] Specify SMBIOS type 41 fields
This argument can be repeated multiple times.  Its main use is to allow network interfaces be created as enoX on Linux, with X being the instance number, instead of the name depending on the interface position on the PCI bus.
Here is an example of use:
-netdev user,id=internet \ -device virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \ -smbios type=41,designation='Onboard LAN',instance=1,kind=ethernet,pcidev=internet-dev
In the guest OS, the device should then appear as eno1:
..parsed-literal:
$ ip -brief l lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> eno1             UP             50:54:00:00:00:42 <BROADCAST,MULTICAST,UP,LOWER_UP>
Currently, the PCI device has to be attached to the root bus.
Network options -nic [tap|bridge|user|l2tpv3|vde|netmap|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 -netdev options below. The guest NIC model can be set with model=modelname. Use model=help to list the available device types. The hardware MAC address can be set with mac=macaddr.
The following two example do exactly the same, to show how -nic can be used to shorten the command line length:
qemu-system-x86_64 -netdev user,id=n1,ipv6=off -device e1000,netdev=n1,mac=52:54:98:76:54:32 qemu-system-x86_64 -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
-nic none Indicate that no network devices should be configured. It is used to override the default configuration (default NIC with "user" host network backend) which is activated if no other networking options are provided.
-netdev user,id=id[,option][,option][,...] Configure user mode host network backend which requires no administrator privilege to run. Valid options are:
id=id  Assign symbolic name for use in monitor commands.
ipv4=on|off and ipv6=on|off Specify that either IPv4 or IPv6 must be enabled. If neither is specified both protocols are enabled.
net=addr[/mask] Set IP network address the guest will see. Optionally specify the netmask, either in the form a.b.c.d or as number of valid top-most bits. Default is 10.0.2.0/24.
host=addr Specify the guest-visible address of the host. Default is the 2nd IP in the guest network, i.e. x.x.x.2.
ipv6-net=addr[/int] Set IPv6 network address the guest will see (default is fec0::/64). The network prefix is given in the usual hexadecimal IPv6 address notation. The prefix size is optional, and is given as the number of valid top-most bits (default is 64).
ipv6-host=addr Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 in the guest network, i.e. xxxx::2.
restrict=on|off If this option is enabled, the guest will be isolated, i.e. it will not be able to contact the host and no guest IP packets will be routed over the host to the outside. This option does not affect any explicitly set forwarding rules.
hostname=name Specifies the client hostname reported by the built-in DHCP server.
dhcpstart=addr Specify the first of the 16 IPs the built-in DHCP server can assign. Default is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
dns=addr Specify the guest-visible address of the virtual nameserver. The address must be different from the host address. Default is the 3rd IP in the guest network, i.e. x.x.x.3.
ipv6-dns=addr Specify the guest-visible address of the IPv6 virtual nameserver. The address must be different from the host address.  Default is the 3rd IP in the guest network, i.e. xxxx::3.
dnssearch=domain Provides an entry for the domain-search list sent by the built-in DHCP server. More than one domain suffix can be transmitted by specifying this option multiple times. If supported, this will cause the guest to automatically try to append the given domain suffix(es) in case a domain name can not be resolved.
qemu-system-x86_64 -nic user,dnssearch=mgmt.example.org,dnssearch=example.org
domainname=domain Specifies the client domain name reported by the built-in DHCP server.