|
 |
 |
 |
MAN page from Fedora 1 qemu-common-1.0-6.fc17.x86_64.rpm
QEMUSection: (1) Updated: 2012-02-13 Index NAMEqemu-doc - QEMU Emulator User Documentation SYNOPSISusage: qemu [options] [ disk_image] DESCRIPTIONThe QEMU PC System emulator simulates thefollowing peripherals: - -
- i440FX host PCI bridge and PIIX3 PCI to ISA bridge
- -
- Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESAextensions (hardware level, including all non standard modes).
- -
- PS/2 mouse and keyboard
- -
- 2 PCI IDE interfaces with hard disk and CD-ROM support
- -
- Floppy disk
- -
- PCI and ISA network adapters
- -
- Serial ports
- -
- Creative SoundBlaster 16 sound card
- -
- ENSONIQ AudioPCI ES1370 sound card
- -
- Intel 82801AA AC97 Audio compatible sound card
- -
- Intel HD Audio Controller and HDA codec
- -
- Adlib (OPL2) - Yamaha YM3812 compatible chip
- -
- Gravis Ultrasound GF1 sound card
- -
- CS4231A compatible sound card
- -
- PCI UHCI USB controller and a virtual USB hub.
SMP is supported with up to 255 CPUs. Note that adlib, gus and cs4231a are only available when QEMU wasconfigured with --audio-card-list option containing the name(s) ofrequired card(s). QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPLVGA BIOS. QEMU uses YM3812 emulation by Tatsuyuki Satoh. QEMU uses GUS emulation (GUSEMU32 <http://www.deinmeister.de/gusemu/>)by Tibor ``TS'' SchA~Xtz. Note that, by default, GUS shares IRQ(7) with parallel ports and soqemu must be told to not have parallel ports to have working GUS qemu dos.img -soundhw gus -parallel none Alternatively: qemu dos.img -device gus,irq=5 Or some other unclaimed IRQ. CS4231A is the chip used in Windows Sound System and GUSMAX products OPTIONSdisk_image is a raw hard disk image for IDE hard disk 0. Sometargets do not need a disk image. Standard options: - -h
- Display help and exit
- -version
- Display version information and exit
- -machine [type=]name[,prop=value[,...]]
- Select the emulated machine by name. Use "-machine ?" to listavailable machines. Supported machine properties are:
- accel=accels1[:accels2[:...]]
- This is used to enable an accelerator. Depending on the target architecture,kvm, xen, or tcg can be available. By default, tcg is used. If there is morethan one accelerator specified, the next one is used if the previous one failsto initialize.
- -cpu model
- Select CPU model (-cpu ? for list and additional feature selection)
- -smp n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]
- Simulate an SMP system with n CPUs. On the PC target, up to 255CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUsto 4.For the PC target, the number of cores per socket, the numberof threads per cores and the total number of sockets can bespecified. Missing values will be computed. If any on the three values isgiven, the total number of CPUs n can be omitted. maxcpusspecifies the maximum number of hotpluggable CPUs.
- -numa opts
- Simulate a multi node NUMA system. If mem and cpus are omitted, resourcesare split equally.
- -fda file
- -fdb file
- Use file as floppy disk 0/1 image. You canuse the host floppy by using /dev/fd0 as filename.
- -hda file
- -hdb file
- -hdc file
- -hdd file
- Use file as hard disk 0, 1, 2 or 3 image.
- -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 byusing /dev/cdrom as filename.
- -drive option[,option[,option[,...]]]
- Define a new drive. Valid options are:
- file=file
- This option defines which disk image to use withthis 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 protocolspecific 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.
- bus=bus,unit=unit
- These options define where is connected the drive by defining the bus number andthe unit id.
- index=index
- This option defines where is connected the drive by using an index in the listof available connectors of a given interface type.
- media=media
- This option defines the type of the media: disk or cdrom.
- cyls=c,heads=h,secs=s[,trans=t]
- These options have the same definition as they have in -hdachs.
- snapshot=snapshot
- snapshot is ``on'' or ``off'' and allows to enable snapshot for 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.
- aio=aio
- aio is ``threads'', or ``native'' and selects between pthread based disk I/O and native Linux AIO.
- format=format
- Specify which disk format will be used rather than detectingthe format. Can be used to specifiy format=raw to avoid interpretingan untrusted format header.
- serial=serial
- This option specifies the serial number to assign to the device.
- addr=addr
- Specify the controller's PCI address (if=virtio only).
- 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 thehost disk is full; report the error to the guest otherwise).The default setting is werror=enospc and rerror=report.
- readonly
- Open drive file as read-only. Guest write attempts will fail.
By default, writethrough caching is used for all block device. This means thatthe host page cache will be used to read and write data but write notificationwill be sent to the guest only when the data has been reported as written bythe storage subsystem. Writeback caching will report data writes as completed as soon as the data ispresent in the host page cache. This is safe as long as you trust your host.If your host crashes or loses power, then the guest may experience datacorruption. The host page cache can be avoided entirely with cache=none. This willattempt to do disk IO directly to the guests memory. QEMU may still performan internal copy of the data. The host page cache can be avoided while only sending write notifications tothe guest when the data has been reported as written by the storage subsystemusing cache=directsync. Some block drivers perform badly with cache=writethrough, most notably,qcow2. If performance is more important than correctness,cache=writeback should be used with qcow2. In case you don't care about data integrity over host failures, usecache=unsafe. This option tells qemu that it never needs to write any datato the disk but can instead keeps things in cache. If anything goes wrong,like your host losing power, the disk storage getting disconnected accidently,etc. you're image will most probably be rendered unusable. When usingthe -snapshot option, unsafe caching is always used. Instead of -cdrom you can use: qemu -drive file=file,index=2,media=cdrom Instead of -hda, -hdb, -hdc, -hdd, you canuse: qemu -drive file=file,index=0,media=disk qemu -drive file=file,index=1,media=disk qemu -drive file=file,index=2,media=disk qemu -drive file=file,index=3,media=disk You can connect a CDROM to the slave of ide0: qemu -drive file=file,if=ide,index=1,media=cdrom If you don't specify the ``file='' argument, you define an empty drive: qemu -drive if=ide,index=1,media=cdrom You can connect a SCSI disk with unit ID 6 on the bus #0: qemu -drive file=file,if=scsi,bus=0,unit=6 Instead of -fda, -fdb, you can use: qemu -drive file=file,index=0,if=floppy qemu -drive file=file,index=1,if=floppy By default, interface is ``ide'' and index is automaticallyincremented: qemu -drive file=a -drive file=b" is interpreted like: qemu -hda a -hdb b
- -set
- TODO
- -global
- TODO
- -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.
- -boot [order=drives][,once=drives][,menu=on|off][,splash=sp_name][,splash-time=sp_time]
- Specify boot order drives as a string of drive letters. Validdrive letters depend on the target achitecture. The x86 PC uses: a, b(floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherbootfrom network adapter 1-4), hard disk boot is the default. To apply aparticular boot order only on the first startup, specify it viaonce.
Interactive boot menus/prompts can be enabled via menu=on as faras firmware/BIOS supports them. The default is non-interactive boot. A splash picture could be passed to bios, enabling user to show it as logo,when option splash=sp_name is given and menu=on, If firmware/BIOSsupports them. Currently Seabios for X86 system support it.limitation: The splash file could be a jpeg file or a BMP file in 24 BPPformat(true color). The resolution should be supported by the SVGA mode, sothe recommended is 320x240, 640x480, 800x640. # try to boot from network first, then from hard disk qemu -boot order=nc # boot from CD-ROM first, switch back to default order after reboot qemu -boot once=d # boot with a splash picture for 5 seconds. qemu -boot menu=on,splash=/root/boot.bmp,splash-time=5000 Note: The legacy format '-boot drives' is still supported but itsuse is discouraged as it may be removed from future versions. - -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 forcethe write back by pressing C-a s.
- -m megs
- Set virtual RAM size to megs megabytes. Default is 128 MiB. Optionally,a suffix of ``M'' or ``G'' can be used to signify a value in megabytes orgigabytes respectively.
- -mem-path path
- Allocate guest RAM from a temporarily created file in path.
- -mem-prealloc
- Preallocate memory when using -mem-path.
- -k language
- Use keyboard layout language (for example "fr" forFrench). This option is only needed where it is not easy to get raw PCkeycodes (e.g. on Macs, with some X11 servers or with a VNCdisplay). You don't normally need to use it on PC/Linux or PC/Windowshosts.
The available layouts are: ar de-ch es fo fr-ca hu ja mk no pt-br sv da en-gb et fr fr-ch is lt nl pl ru th de en-us fi fr-be hr it lv nl-be pt sl tr The default is "en-us". - -audio-help
- Will show the audio subsystem help: list of drivers, tunableparameters.
- -soundhw card1[,card2,...] or -soundhw all
- Enable audio and selected sound hardware. Use ? to print allavailable sound hardware.
qemu -soundhw sb16,adlib disk.img qemu -soundhw es1370 disk.img qemu -soundhw ac97 disk.img qemu -soundhw hda disk.img qemu -soundhw all disk.img qemu -soundhw ? Note that Linux's i810_audio OSS kernel (for AC97) module mightrequire manually specifying clocking. modprobe i810_audio clocking=48000
USB options: - -usb
- Enable the USB driver (will be the default soon)
- -usbdevice devname
- Add the USB device devname.
- mouse
- Virtual Mouse. This will override the PS/2 mouse emulation when activated.
- tablet
- Pointer device that uses absolute coordinates (like a touchscreen). Thismeans qemu is able to report the mouse position without having to grab themouse. Also overrides the PS/2 mouse emulation when activated.
- disk:[format=format]:file
- Mass storage device based on file. The optional format argumentwill be used rather than detecting the format. Can be used to specifiy"format=raw" to avoid interpreting an untrusted format header.
- host:bus.addr
- Pass through the host device identified by bus.addr (Linux only).
- host:vendor_id:product_id
- Pass through the host device identified by vendor_id:product_id(Linux only).
- serial:[vendorid=vendor_id][,productid=product_id]:dev
- Serial converter to host character device dev, see "-serial" for theavailable devices.
- braille
- Braille device. This will use BrlAPI to display the braille output on a realor fake device.
- net:options
- Network adapter that supports CDC ethernet and RNDIS protocols.
- -device driver[,prop[=value][,...]]
- Add device driver. prop=value sets driverproperties. Valid properties depend on the driver. To get help onpossible drivers and properties, use "-device ?" and"-device driver,?".
File system options: - -fsdev fsdriver,id=id,path=path,[security_model=security_model][,writeout=writeout][,readonly]
- Define a new file system device. Valid options are:
- fsdriver
- This option specifies the fs driver backend to use.Currently ``local'' and ``handle'' file system drivers are supported.
- id=id
- Specifies identifier for this device
- path=path
- Specifies the export path for the file system device. Files underthis 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'' and ``none''.In ``passthrough'' security model, files are stored using the samecredentials as they are created on the guest. This requires qemuto run as root. In ``mapped'' security model, some of the fileattributes like uid, gid, mode bits and link target are stored asfile attributes. Directories exported by this security model cannotinteract with other unix tools. ``none'' security model is same aspassthrough except the sever won't report failures if it fails toset file attributes like ownership. Security model is mandatoryonly for local fsdriver. Other fsdrivers (like handle) don't takesecurity 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 butwrite notification will be sent to the guest only when the data has beenreported as written by the storage subsystem.
- readonly
- Enables exporting 9p share as a readonly mount for guests. By defaultread-write access is given.
-fsdev option is used along with -device driver ``virtio-9p-pci''.
- -device virtio-9p-pci,fsdev=id,mount_tag=mount_tag
- Options for virtio-9p-pci driver are:
- 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
Virtual File system pass-through options:
- -virtfs fsdriver,path=path,mount_tag=mount_tag,security_model=security_model[,writeout=writeout][,readonly]
- The general form of a Virtual File system pass-through options are:
- fsdriver
- This option specifies the fs driver backend to use.Currently ``local'' and ``handle'' file system drivers are supported.
- id=id
- Specifies identifier for this device
- path=path
- Specifies the export path for the file system device. Files underthis 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'' and ``none''.In ``passthrough'' security model, files are stored using the samecredentials as they are created on the guest. This requires qemuto run as root. In ``mapped'' security model, some of the fileattributes like uid, gid, mode bits and link target are stored asfile attributes. Directories exported by this security model cannotinteract with other unix tools. ``none'' security model is same aspassthrough except the sever won't report failures if it fails toset file attributes like ownership. Security model is mandatory onlyfor local fsdriver. Other fsdrivers (like handle) don't take securitymodel 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 butwrite notification will be sent to the guest only when the data has beenreported as written by the storage subsystem.
- readonly
- Enables exporting 9p share as a readonly mount for guests. By defaultread-write access is given.
- -virtfs_synth
- Create synthetic file system image
- -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.
- -uuid uuid
- Set system UUID.
Display options: - -display type
- Select type of display to use. This option is a replacement for theold style -sdl/-curses/... options. Valid values for type are
- sdl
- Display video output via SDL (usually in a separate graphicswindow; see the SDL documentation for other possibilities).
- curses
- Display video output via curses. For graphics device models whichsupport a text mode, QEMU can display this output using acurses/ncurses interface. Nothing is displayed when the graphicsdevice is in graphical mode or if the graphics device does not supporta text mode. Generally only the VGA device models support text mode.
- none
- Do not display video output. The guest will still see an emulatedgraphics card, but its output will not be displayed to the QEMUuser. This option differs from the -nographic option in that itonly affects what is done with video output; -nographic also changesthe destination of the serial and parallel port data.
- vnc
- Start a VNC server on display <arg>
- -nographic
- Normally, QEMU uses SDL to display the VGA output. With this option,you can totally disable graphical output so that QEMU is a simplecommand line application. The emulated serial port is redirected onthe console. Therefore, you can still use QEMU to debug a Linux kernelwith a serial console.
- -curses
- Normally, QEMU uses SDL to display the VGA output. With this option,QEMU can display the VGA output when in text mode using acurses/ncurses interface. Nothing is displayed in graphical mode.
- -no-frame
- Do not use decorations for SDL windows and start them using the wholeavailable screen space. This makes the using QEMU in a dedicated desktopworkspace more convenient.
- -alt-grab
- Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this alsoaffects the special keys (for fullscreen, monitor-mode switching, etc).
- -ctrl-grab
- Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this alsoaffects the special keys (for fullscreen, monitor-mode switching, etc).
- -no-quit
- Disable SDL window close capability.
- -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
- ipv6
- Force using the specified IP version.
- password=<secret>
- Set the password you need to authenticate.
- sasl
- Require that the client use SASL to authenticate with the spice.The exact choice of authentication method used is controlled from thesystem / user's SASL configuration file for the 'qemu' service. Thisis typically found in /etc/sasl2/qemu.conf. If running QEMU as anunprivileged user, an environment variable SASL_CONF_PATH can be usedto 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. Thisensures a data encryption preventing compromise of authenticationcredentials.
- disable-ticketing
- Allow client connects without authentication.
- disable-copy-paste
- Disable copy paste 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|inputs|record|playback|tunnel]
- plaintext-channel=[main|display|inputs|record|playback|tunnel]
- Force specific channel to be used with or without TLS encryption. Theoptions can be specified multiple times to configure multiplechannels. The special name ``default'' can be used to set the defaultmode. For channels which are not explicitly forced into one mode thespice 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 filter.
- 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.
- -portrait
- Rotate graphical output 90 deg left (only PXA LCD).
- -rotate
- 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 fromWindows 95 should recognize and use this graphic card. For optimalperformances, use 16 bit color depth in the guest and the host OS.(This one is the default)
- std
- Standard VGA card with Bochs VBE extensions. If your guest OSsupports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you wantto use high resolution modes (>= 1280x1024x16) then you should usethis option.
- vmware
- VMWare SVGA-II compatible adapter. Use it if you have sufficientlyrecent XFree86/XOrg server or Windows guest with a driver for thiscard.
- qxl
- QXL paravirtual graphic card. It is VGA compatible (including VESA2.0 VBE support). Works best with qxl guest drivers installed though.Recommended choice when using the spice protocol.
- none
- Disable VGA card.
- -full-screen
- Start in full screen.
- -g widthxheight[xdepth]
- Set the initial graphical resolution and depth (PPC, SPARC only).
- -vnc display[,option[,option[,...]]]
- Normally, QEMU uses SDL to display the VGA output. With this option,you can have QEMU listen on VNC display display and redirect the VGAdisplay over the VNC session. It is very useful to enable the usbtablet device when using this option (option -usbdevicetablet). When using the VNC display, you must use the -kparameter to set the keyboard layout if you are not using en-us. Validsyntax for the display is
- host:d
- TCP connections will only be allowed from host on display d.By convention the TCP port is 5900+d. Optionally, host canbe 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 thelocation of a unix socket to listen for connections on.
- none
- VNC is initialized but not started. The monitor "change" commandcan be used to later start the VNC server.
Following the display value there may be one or more option flagsseparated by commas. Valid options are - reverse
- Connect to a listening VNC client via a ``reverse'' connection. Theclient is specified by the display. For reverse networkconnections (host:d,"reverse"), the d argumentis a TCP port number, not a display number.
- password
- Require that password based authentication is used for client connections.The password must be set separately using the "change" command in thepcsys_monitor
- tls
- Require that client use TLS when communicating with the VNC server. Thisuses anonymous TLS credentials so is susceptible to a man-in-the-middleattack. It is recommended that this option be combined with either thex509 or x509verify options.
- x509=/path/to/certificate/dir
- Valid if tls is specified. Require that x509 credentials are usedfor negotiating the TLS session. The server will send its x509 certificateto the client. It is recommended that a password be set on the VNC serverto provide authentication of the client when this is used. The path followingthis option specifies where the x509 certificates are to be loaded from.See the vnc_security section for details on generating certificates.
- x509verify=/path/to/certificate/dir
- Valid if tls is specified. Require that x509 credentials are usedfor negotiating the TLS session. The server will send its x509 certificateto the client, and request that the client send its own x509 certificate.The server will validate the client's certificate against the CA certificate,and reject clients when validation fails. If the certificate authority istrusted, this is a sufficient authentication mechanism. You may still wishto set a password on the VNC server as a second authentication layer. Thepath following this option specifies where the x509 certificates are tobe loaded from. See the vnc_security section for details on generatingcertificates.
- sasl
- Require that the client use SASL to authenticate with the VNC server.The exact choice of authentication method used is controlled from thesystem / user's SASL configuration file for the 'qemu' service. Thisis typically found in /etc/sasl2/qemu.conf. If running QEMU as anunprivileged user, an environment variable SASL_CONF_PATH can be usedto 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. Thisensures a data encryption preventing compromise of authenticationcredentials. See the vnc_security section for details on usingSASL authentication.
- acl
- Turn on access control lists for checking of the x509 client certificateand SASL party. For x509 certs, the ACL check is made against thecertificate's distinguished name. This is something that looks like"C=GB,O=ACME,L=Boston,CN=bob". For SASL party, the ACL check ismade against the username, which depending on the SASL plugin, mayinclude a realm component, eg "bob" or "bobAATTEXAMPLE.COM".When the acl flag is set, the initial access list will beempty, with a "deny" policy. Thus no one will be allowed touse the VNC server until the ACLs have been loaded. This can beachieved using the "acl" monitor command.
- lossy
- Enable lossy compression methods (gradient, JPEG, ...). If thisoption is set, VNC client may receive lossy framebuffer updatesdepending on its encoding settings. Enabling this option can savea lot of bandwidth at the expense of quality.
- non-adaptive
- 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. Disablingadaptive encodings allows to restore the original static behavior of encodingslike Tight.
i386 target only: - -win2k-hack
- Use it when installing Windows 2000 to avoid a disk full bug. AfterWindows 2000 is installed, you no longer need this option (this optionslows down the IDE transfers).
- -no-fd-bootchk
- Disable boot signature checking for floppy disks in Bochs BIOS. It maybe needed to boot from old floppy disks.TODO: check reference to Bochs BIOS.
- -no-acpi
- Disable ACPI (Advanced Configuration and Power Interface) support. Useit if your guest OS complains about ACPI problems (PC target machineonly).
- -no-hpet
- Disable HPET support.
- -balloon none
- Disable balloon device.
- -balloon virtio[,addr=addr]
- Enable virtio balloon device (default), optionally with PCI addressaddr.
- -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 allACPI headers (possible overridden by other options).For data=, only dataportion of the table is used, all header information is specified in thecommand line.
- -smbios file=binary
- Load SMBIOS entry from binary file.
- -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]
- 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
Network options: - -net nic[,vlan=n][,macaddr=mac][,model=type] [,name=name][,addr=addr][,vectors=v]
- Create a new Network Interface Card and connect it to VLAN n (n= 0 is the default). The NIC is an e1000 by default on the PCtarget. Optionally, the MAC address can be changed to mac, thedevice address set to addr (PCI cards only),and a name can be assigned for use in monitor commands.Optionally, for PCI cards, you can specify the number v of MSI-X vectorsthat the card should have; this option currently only affects virtio cards; setv = 0 to disable MSI-X. If no -net option is specified, a singleNIC is created. Qemu can emulate several different models of network card.Valid values for type are"virtio", "i82551", "i82557b", "i82559er","ne2k_pci", "ne2k_isa", "pcnet", "rtl8139","e1000", "smc91c111", "lance" and "mcf_fec".Not all devices are supported on all targets. Use -net nic,model=?for a list of available devices for your target.
- -net user[,option][,option][,...]
- Use the user mode network stack which requires no administratorprivilege to run. Valid options are:
- vlan=n
- Connect user mode stack to VLAN n (n = 0 is the default).
- name=name
- Assign symbolic name for use in monitor commands.
- 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 is10.0.2.0/24.
- host=addr
- Specify the guest-visible address of the host. Default is the 2nd IP in theguest network, i.e. x.x.x.2.
- restrict=on|off
- If this option is enabled, the guest will be isolated, i.e. it will not beable to contact the host and no guest IP packets will be routed over the hostto the outside. This option does not affect any explicitly set forwarding rules.
- hostname=name
- Specifies the client hostname reported by the builtin DHCP server.
- dhcpstart=addr
- Specify the first of the 16 IPs the built-in DHCP server can assign. Defaultis 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 mustbe different from the host address. Default is the 3rd IP in the guest network,i.e. x.x.x.3.
- tftp=dir
- When using the user mode network stack, activate a built-in TFTPserver. The files in dir will be exposed as the root of a TFTP server.The TFTP client on the guest must be configured in binary mode (use the command"bin" of the Unix TFTP client).
- bootfile=file
- When using the user mode network stack, broadcast file as the BOOTPfilename. In conjunction with tftp, this can be used to network boota guest from a local directory.
Example (using pxelinux): qemu -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0 - smb=dir[,smbserver=addr]
- When using the user mode network stack, activate a built-in SMBserver so that Windows OSes can access to the host files in dirtransparently. The IP address of the SMB server can be set to addr. Bydefault the 4th IP in the guest network is used, i.e. x.x.x.4.
In the guest Windows OS, the line: 10.0.2.4 smbserver must be added in the file C:\WINDOWS\LMHOSTS (for windows 9x/Me)or C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS (Windows NT/2000). Then dir can be accessed in \\smbserver\qemu. Note that a SAMBA server must be installed on the host OS.QEMU was tested successfully with smbd versions from Red Hat 9,Fedora Core 3 and OpenSUSE 11.x. - hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport
- Redirect incoming TCP or UDP connections to the host port hostport tothe guest IP address guestaddr on guest port guestport. Ifguestaddr is not specified, its value is x.x.x.15 (default first addressgiven by the built-in DHCP server). By specifying hostaddr, the rule canbe bound to a specific host interface. If no connection type is set, TCP isused. This option can be given multiple times.
For example, to redirect host X11 connection from screen 1 to guestscreen 0, use the following: # on the host qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...] # this host xterm should open in the guest X11 server xterm -display :1 To redirect telnet connections from host port 5555 to telnet port onthe guest, use the following: # on the host qemu -net user,hostfwd=tcp::5555-:23 [...] telnet localhost 5555 Then when you use on the host "telnet localhost 5555", youconnect to the guest telnet server. - guestfwd=[tcp]:server:port-dev
- Forward guest TCP connections to the IP address server on port portto the character device dev. This option can be given multiple times.
Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are stillprocessed and applied to -net user. Mixing them with the new configurationsyntax gives undefined results. Their use for new applications is discouragedas they will be removed from future versions.
- -net tap[,vlan=n][,name=name][,fd=h][,ifname=name] [,script=file][,downscript=dfile]
- Connect the host TAP network interface name to VLAN n, usethe network script file to configure it and the network scriptdfile to deconfigure it. If name is not provided, the OSautomatically provides one. fd=h can be used to specifythe handle of an already opened host TAP interface. The default networkconfigure script is /etc/qemu-ifup and the default networkdeconfigure script is /etc/qemu-ifdown. Use script=noor downscript=no to disable script execution. Example:
qemu linux.img -net nic -net tap More complicated example (two NICs, each one connected to a TAP device) qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \ -net nic,vlan=1 -net tap,vlan=1,ifname=tap1 - -net socket[,vlan=n][,name=name][,fd=h] [,listen=[host]:port][,connect=host:port]
- Connect the VLAN n to a remote VLAN in another QEMU virtualmachine using a TCP socket connection. If listen isspecified, QEMU waits for incoming connections on port(host is optional). connect is used to connect toanother QEMU instance using the listen option. fd=hspecifies an already opened TCP socket.
Example: # launch a first QEMU instance qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ -net socket,listen=:1234 # connect the VLAN 0 of this instance to the VLAN 0 # of the first instance qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \ -net socket,connect=127.0.0.1:1234 - -net socket[,vlan=n][,name=name][,fd=h][,mcast=maddr:port[,localaddr=addr]]
- Create a VLAN n shared with another QEMU virtualmachines using a UDP multicast socket, effectively making a bus forevery QEMU with same multicast address maddr and port.NOTES:
- 1.
- Several QEMU can be running on different hosts and share same bus (assumingcorrect multicast setup for these hosts).
- 2.
- mcast support is compatible with User Mode Linux (argument ethN=mcast), see<http://user-mode-linux.sf.net>.
- 3.
- Use fd=h to specify an already opened UDP multicast socket.
Example: # launch one QEMU instance qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ -net socket,mcast=230.0.0.1:1234 # launch another QEMU instance on same "bus" qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \ -net socket,mcast=230.0.0.1:1234 # launch yet another QEMU instance on same "bus" qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \ -net socket,mcast=230.0.0.1:1234 Example (User Mode Linux compat.): # launch QEMU instance (note mcast address selected # is UML's default) qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ -net socket,mcast=239.192.168.1:1102 # launch UML /path/to/linux ubd0=/path/to/root_fs eth0=mcast Example (send packets from host's 1.2.3.4): qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
- -net vde[,vlan=n][,name=name][,sock=socketpath] [,port=n][,group=groupname][,mode=octalmode]
- Connect VLAN n to PORT n of a vde switch running on host andlistening for incoming connections on socketpath. Use GROUP groupnameand MODE octalmode to change default ownership and permissions forcommunication port. This option is only available if QEMU has been compiledwith vde support enabled.
Example: # launch vde switch vde_switch -F -sock /tmp/myswitch # launch QEMU instance qemu linux.img -net nic -net vde,sock=/tmp/myswitch - -net dump[,vlan=n][,file=file][,len=len]
- Dump network traffic on VLAN n to file file (qemu-vlan0.pcap by default).At most len bytes (64k by default) per packet are stored. The file format islibpcap, so it can be analyzed with tools such as tcpdump or Wireshark.
- -net none
- Indicate that no network devices should be configured. It is used tooverride the default configuration (-net nic -net user) whichis activated if no -net options are provided.
Character device options: 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,vc,file,pipe,console,serial,pty,stdio,braille,tty,parport,spicevmc.The specific backend will determine the applicable options.
All devices must have an id, which can be any string up to 127 characters long.It is used to uniquely identify this device in other command line directives. A character device may be used in multiplexing mode by multiple front-ends.The key sequence of Control-a and c will rotate the input focusbetween attached front-ends. Specify mux=on to enable this mode. Options to each backend are described below. - -chardev null ,id=id
- A void device. This device will not emit any data, and will drop any data itreceives. The null backend does not take any options.
- -chardev socket ,id=id [TCP options or unix options] [,server] [,nowait] [,telnet]
- Create a two-way stream socket, which can be either a TCP or a unix socket. Aunix socket will be created if path is specified. Behaviour isundefined if TCP options are specified for a unix socket.
server specifies that the socket shall be a listening socket. nowait specifies that QEMU should not block waiting for a client toconnect to a listening socket. telnet specifies that traffic on the socket should interpret telnetescape sequences. TCP and unix socket options are given below: - TCP options: port=port [,host=host] [,to=to] [,ipv4] [,ipv6] [,nodelay]
- host for a listening socket specifies the local address to be bound.For a connecting socket species the remote host to connect to. host isoptional for listening sockets. If not specified it defaults to 0.0.0.0.
port for a listening socket specifies the local port to be bound. For aconnecting socket specifies the port on the remote host to connect to.port can be given as either a port number or a service name.port is required. to is only relevant to listening sockets. If it is specified, andport cannot be bound, QEMU will attempt to bind to subsequent ports upto and including to until it succeeds. to must be specifiedas a port number. ipv4 and ipv6 specify that either IPv4 or IPv6 must be used.If neither is specified the socket may use either protocol. nodelay disables the Nagle algorithm. - unix options: path=path
- path specifies the local path of the unix socket. path isrequired.
- -chardev udp ,id=id [,host=host] ,port=port [,localaddr=localaddr] [,localport=localport] [,ipv4] [,ipv6]
- Sends all traffic from the guest to a remote host over UDP.
host specifies the remote host to connect to. If not specified itdefaults to "localhost". port specifies the port on the remote host to connect to. portis required. localaddr specifies the local address to bind to. If not specified itdefaults to 0.0.0.0. localport specifies the local port to bind to. If not specified anyavailable local port will be used. ipv4 and ipv6 specify that either IPv4 or IPv6 must be used.If neither is specified the device may use either protocol. - -chardev msmouse ,id=id
- Forward QEMU's emulated msmouse events to the guest. msmouse does nottake any options.
- -chardev vc ,id=id [[,width=width] [,height=height]] [[,cols=cols] [,rows=rows]]
- Connect to a QEMU text console. vc may optionally be given a specificsize.
width and height specify the width and height respectively ofthe console, in pixels. cols and rows specify that the console be sized to fit a textconsole with the given dimensions. - -chardev file ,id=id ,path=path
- Log all traffic received from the guest to a file.
path specifies the path of the file to be opened. This file will becreated if it does not already exist, and overwritten if it does. pathis required. - -chardev pipe ,id=id ,path=path
- Create a two-way connection to the guest. The behaviour differs slightly betweenWindows hosts and other hosts:
On Windows, a single duplex pipe will be created at\\.pipe\path. On other hosts, 2 pipes will be created called path.in andpath.out. Data written to path.in will bereceived by the guest. Data written by the guest can be read frompath.out. QEMU will not create these fifos, and requires them tobe present. path forms part of the pipe path as described above. path isrequired. - -chardev console ,id=id
- Send traffic from the guest to QEMU's standard output. console does nottake any options.
console is only available on Windows hosts. - -chardev serial ,id=id ,path=path
- Send traffic from the guest to a serial device on the host.
serial isonly available on Windows hosts. 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 doesnot take any options.
pty is not available on Windows hosts. - -chardev stdio ,id=id [,signal=on|off]
- Connect to standard input and standard output of the qemu process.
signal controls if signals are enabled on the terminal, that includesexiting QEMU with the key sequence Control-c. This option is enabled bydefault, use signal=off to disable it. stdio is not available on Windows hosts. - -chardev braille ,id=id
- Connect to a local BrlAPI server. braille does not take any options.
- -chardev tty ,id=id ,path=path
- Connect to a local tty device.
tty is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD andDragonFlyBSD hosts. path specifies the path to the tty. path is required. - -chardev parport ,id=id ,path=path
- parport is only available on Linux, FreeBSD and DragonFlyBSD hosts.
Connect to a local parallel port. path specifies the path to the parallel port device. path isrequired. - -chardev spicevmc ,id=id ,debug=debug, name=name
- spicevmc is only available when spice support is built in.
debug debug level for spicevmc name name of spice channel to connect to Connect to a spice virtual machine channel, such as vdiport.
Device URL Syntax: In addition to using normal file images for the emulated storage devices,QEMU can also use networked resources such as iSCSI devices. These arespecified using a special URL syntax. - iSCSI
- iSCSI support allows QEMU to access iSCSI resources directly and use asimages for the guest storage. Both disk and cdrom images are supported.
Syntax for specifying iSCSI LUNs is``iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>'' Example (without authentication): qemu -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \ --drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1 Example (CHAP username/password via URL): qemu --drive file=iscsi://user%password@192.0.2.1/iqn.2001-04.com.example/1 Example (CHAP username/password via environment variables): LIBISCSI_CHAP_USERNAME="user" \ LIBISCSI_CHAP_PASSWORD="password" \ qemu --drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1 iSCSI support is an optional feature of
|
|
|