.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" ======================================================================== .\" .IX Title "QEMU 1" .TH QEMU 1 "2016-02-01" " " " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" qemu\-doc \- QEMU Emulator User Documentation .SH "SYNOPSIS" .IX Header "SYNOPSIS" usage: qemu\-system\-i386 [options] [\fIdisk_image\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \s-1QEMU\s0 \s-1PC\s0 System emulator simulates the following peripherals: .IP "\-" 4 i440FX host \s-1PCI\s0 bridge and \s-1PIIX3\s0 \s-1PCI\s0 to \s-1ISA\s0 bridge .IP "\-" 4 Cirrus \s-1CLGD\s0 5446 \s-1PCI\s0 \s-1VGA\s0 card or dummy \s-1VGA\s0 card with Bochs \s-1VESA\s0 extensions (hardware level, including all non standard modes). .IP "\-" 4 \&\s-1PS/2\s0 mouse and keyboard .IP "\-" 4 2 \s-1PCI\s0 \s-1IDE\s0 interfaces with hard disk and CD-ROM support .IP "\-" 4 Floppy disk .IP "\-" 4 \&\s-1PCI\s0 and \s-1ISA\s0 network adapters .IP "\-" 4 Serial ports .IP "\-" 4 Creative SoundBlaster 16 sound card .IP "\-" 4 \&\s-1ENSONIQ\s0 AudioPCI \s-1ES1370\s0 sound card .IP "\-" 4 Intel 82801AA \s-1AC97\s0 Audio compatible sound card .IP "\-" 4 Intel \s-1HD\s0 Audio Controller and \s-1HDA\s0 codec .IP "\-" 4 Adlib (\s-1OPL2\s0) \- Yamaha \s-1YM3812\s0 compatible chip .IP "\-" 4 Gravis Ultrasound \s-1GF1\s0 sound card .IP "\-" 4 \&\s-1CS4231A\s0 compatible sound card .IP "\-" 4 \&\s-1PCI\s0 \s-1UHCI\s0 \s-1USB\s0 controller and a virtual \s-1USB\s0 hub. .PP \&\s-1SMP\s0 is supported with up to 255 CPUs. .PP Note that adlib, gus and cs4231a are only available when \s-1QEMU\s0 was configured with \-\-audio\-card\-list option containing the name(s) of required card(s). .PP \&\s-1QEMU\s0 uses the \s-1PC\s0 \s-1BIOS\s0 from the Bochs project and the Plex86/Bochs \s-1LGPL\s0 \&\s-1VGA\s0 \s-1BIOS\s0. .PP \&\s-1QEMU\s0 uses \s-1YM3812\s0 emulation by Tatsuyuki Satoh. .PP \&\s-1QEMU\s0 uses \s-1GUS\s0 emulation (\s-1GUSEMU32\s0 <\fBhttp://www.deinmeister.de/gusemu/\fR>) by Tibor \*(L"\s-1TS\s0\*(R" Schütz. .PP Note that, by default, \s-1GUS\s0 shares \s-1\fIIRQ\s0\fR\|(7) with parallel ports and so \&\s-1QEMU\s0 must be told to not have parallel ports to have working \s-1GUS\s0. .PP .Vb 1 \& qemu\-system\-i386 dos.img \-soundhw gus \-parallel none .Ve .PP Alternatively: .PP .Vb 1 \& qemu\-system\-i386 dos.img \-device gus,irq=5 .Ve .PP Or some other unclaimed \s-1IRQ\s0. .PP \&\s-1CS4231A\s0 is the chip used in Windows Sound System and \s-1GUSMAX\s0 products .SH "OPTIONS" .IX Header "OPTIONS" \&\fIdisk_image\fR is a raw hard disk image for \s-1IDE\s0 hard disk 0. Some targets do not need a disk image. .PP Standard options: .IP "\fB\-h\fR" 4 .IX Item "-h" Display help and exit .IP "\fB\-version\fR" 4 .IX Item "-version" Display version information and exit .IP "\fB\-machine [type=]\fR\fIname\fR\fB[,prop=\fR\fIvalue\fR\fB[,...]]\fR" 4 .IX Item "-machine [type=]name[,prop=value[,...]]" Select the emulated machine by \fIname\fR. Use \f(CW\*(C`\-machine ?\*(C'\fR to list available machines. Supported machine properties are: .RS 4 .IP "\fBaccel=\fR\fIaccels1\fR\fB[:\fR\fIaccels2\fR\fB[:...]]\fR" 4 .IX Item "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 more than one accelerator specified, the next one is used if the previous one fails to initialize. .IP "\fBkernel_irqchip=on|off\fR" 4 .IX Item "kernel_irqchip=on|off" Enables in-kernel irqchip support for the chosen accelerator when available. .IP "\fBkvm_shadow_mem=size\fR" 4 .IX Item "kvm_shadow_mem=size" Defines the size of the \s-1KVM\s0 shadow \s-1MMU\s0. .RE .RS 4 .RE .IP "\fB\-cpu\fR \fImodel\fR" 4 .IX Item "-cpu model" Select \s-1CPU\s0 model (\-cpu ? for list and additional feature selection) .IP "\fB\-smp\fR \fIn\fR\fB[,cores=\fR\fIcores\fR\fB][,threads=\fR\fIthreads\fR\fB][,sockets=\fR\fIsockets\fR\fB][,maxcpus=\fR\fImaxcpus\fR\fB]\fR" 4 .IX Item "-smp n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]" Simulate an \s-1SMP\s0 system with \fIn\fR CPUs. On the \s-1PC\s0 target, up to 255 CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs to 4. For the \s-1PC\s0 target, the number of \fIcores\fR per socket, the number of \fIthreads\fR per cores and the total number of \fIsockets\fR can be specified. Missing values will be computed. If any on the three values is given, the total number of CPUs \fIn\fR can be omitted. \fImaxcpus\fR specifies the maximum number of hotpluggable CPUs. .IP "\fB\-numa\fR \fIopts\fR" 4 .IX Item "-numa opts" Simulate a multi node \s-1NUMA\s0 system. If mem and cpus are omitted, resources are split equally. .IP "\fB\-fda\fR \fIfile\fR" 4 .IX Item "-fda file" .PD 0 .IP "\fB\-fdb\fR \fIfile\fR" 4 .IX Item "-fdb file" .PD Use \fIfile\fR as floppy disk 0/1 image. You can use the host floppy by using \fI/dev/fd0\fR as filename. .IP "\fB\-hda\fR \fIfile\fR" 4 .IX Item "-hda file" .PD 0 .IP "\fB\-hdb\fR \fIfile\fR" 4 .IX Item "-hdb file" .IP "\fB\-hdc\fR \fIfile\fR" 4 .IX Item "-hdc file" .IP "\fB\-hdd\fR \fIfile\fR" 4 .IX Item "-hdd file" .PD Use \fIfile\fR as hard disk 0, 1, 2 or 3 image. .IP "\fB\-cdrom\fR \fIfile\fR" 4 .IX Item "-cdrom file" Use \fIfile\fR as CD-ROM image (you cannot use \fB\-hdc\fR and \&\fB\-cdrom\fR at the same time). You can use the host CD-ROM by using \fI/dev/cdrom\fR as filename. .IP "\fB\-drive\fR \fIoption\fR\fB[,\fR\fIoption\fR\fB[,\fR\fIoption\fR\fB[,...]]]\fR" 4 .IX Item "-drive option[,option[,option[,...]]]" Define a new drive. Valid options are: .RS 4 .IP "\fBfile=\fR\fIfile\fR" 4 .IX Item "file=file" This option defines which disk image to use with this drive. If the filename contains comma, you must double it (for instance, \*(L"file=my,,file\*(R" to use file \*(L"my,file\*(R"). .Sp Special files such as iSCSI devices can be specified using protocol specific URLs. See the section for \*(L"Device \s-1URL\s0 Syntax\*(R" for more information. .IP "\fBif=\fR\fIinterface\fR" 4 .IX Item "if=interface" This option defines on which type on interface the drive is connected. Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio. .IP "\fBbus=\fR\fIbus\fR\fB,unit=\fR\fIunit\fR" 4 .IX Item "bus=bus,unit=unit" These options define where is connected the drive by defining the bus number and the unit id. .IP "\fBindex=\fR\fIindex\fR" 4 .IX Item "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. .IP "\fBmedia=\fR\fImedia\fR" 4 .IX Item "media=media" This option defines the type of the media: disk or cdrom. .IP "\fBcyls=\fR\fIc\fR\fB,heads=\fR\fIh\fR\fB,secs=\fR\fIs\fR\fB[,trans=\fR\fIt\fR\fB]\fR" 4 .IX Item "cyls=c,heads=h,secs=s[,trans=t]" These options have the same definition as they have in \fB\-hdachs\fR. .IP "\fBsnapshot=\fR\fIsnapshot\fR" 4 .IX Item "snapshot=snapshot" \&\fIsnapshot\fR is \*(L"on\*(R" or \*(L"off\*(R" and allows to enable snapshot for given drive (see \fB\-snapshot\fR). .IP "\fBcache=\fR\fIcache\fR" 4 .IX Item "cache=cache" \&\fIcache\fR is \*(L"none\*(R", \*(L"writeback\*(R", \*(L"unsafe\*(R", \*(L"directsync\*(R" or \*(L"writethrough\*(R" and controls how the host cache is used to access block data. .IP "\fBaio=\fR\fIaio\fR" 4 .IX Item "aio=aio" \&\fIaio\fR is \*(L"threads\*(R", or \*(L"native\*(R" and selects between pthread based disk I/O and native Linux \s-1AIO\s0. .IP "\fBformat=\fR\fIformat\fR" 4 .IX Item "format=format" Specify which disk \fIformat\fR will be used rather than detecting the format. Can be used to specifiy format=raw to avoid interpreting an untrusted format header. .IP "\fBserial=\fR\fIserial\fR" 4 .IX Item "serial=serial" This option specifies the serial number to assign to the device. .IP "\fBaddr=\fR\fIaddr\fR" 4 .IX Item "addr=addr" Specify the controller's \s-1PCI\s0 address (if=virtio only). .IP "\fBwerror=\fR\fIaction\fR\fB,rerror=\fR\fIaction\fR" 4 .IX Item "werror=action,rerror=action" Specify which \fIaction\fR to take on write and read errors. Valid actions are: \&\*(L"ignore\*(R" (ignore the error and try to continue), \*(L"stop\*(R" (pause \s-1QEMU\s0), \&\*(L"report\*(R" (report the error to the guest), \*(L"enospc\*(R" (pause \s-1QEMU\s0 only if the host disk is full; report the error to the guest otherwise). The default setting is \fBwerror=enospc\fR and \fBrerror=report\fR. .IP "\fBreadonly\fR" 4 .IX Item "readonly" Open drive \fBfile\fR as read-only. Guest write attempts will fail. .IP "\fBcopy\-on\-read=\fR\fIcopy-on-read\fR" 4 .IX Item "copy-on-read=copy-on-read" \&\fIcopy-on-read\fR is \*(L"on\*(R" or \*(L"off\*(R" and enables whether to copy read backing file sectors into the image file. .RE .RS 4 .Sp By default, writethrough caching is used for all block device. 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 when the data has been reported as written by the storage subsystem. .Sp Writeback caching will report data writes as completed as soon as the data is present 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 data corruption. .Sp The host page cache can be avoided entirely with \fBcache=none\fR. This will attempt to do disk \s-1IO\s0 directly to the guests memory. \s-1QEMU\s0 may still perform an internal copy of the data. .Sp The host page cache can be avoided while only sending write notifications to the guest when the data has been reported as written by the storage subsystem using \fBcache=directsync\fR. .Sp Some block drivers perform badly with \fBcache=writethrough\fR, most notably, qcow2. If performance is more important than correctness, \&\fBcache=writeback\fR should be used with qcow2. .Sp In case you don't care about data integrity over host failures, use cache=unsafe. This option tells \s-1QEMU\s0 that it never needs to write any data to the disk but can instead keeps things in cache. If anything goes wrong, like your host losing power, the disk storage getting disconnected accidentally, etc. you're image will most probably be rendered unusable. When using the \fB\-snapshot\fR option, unsafe caching is always used. .Sp 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. .Sp Instead of \fB\-cdrom\fR you can use: .Sp .Vb 1 \& qemu\-system\-i386 \-drive file=file,index=2,media=cdrom .Ve .Sp Instead of \fB\-hda\fR, \fB\-hdb\fR, \fB\-hdc\fR, \fB\-hdd\fR, you can use: .Sp .Vb 4 \& qemu\-system\-i386 \-drive file=file,index=0,media=disk \& qemu\-system\-i386 \-drive file=file,index=1,media=disk \& qemu\-system\-i386 \-drive file=file,index=2,media=disk \& qemu\-system\-i386 \-drive file=file,index=3,media=disk .Ve .Sp You can connect a \s-1CDROM\s0 to the slave of ide0: .Sp .Vb 1 \& qemu\-system\-i386 \-drive file=file,if=ide,index=1,media=cdrom .Ve .Sp If you don't specify the \*(L"file=\*(R" argument, you define an empty drive: .Sp .Vb 1 \& qemu\-system\-i386 \-drive if=ide,index=1,media=cdrom .Ve .Sp You can connect a \s-1SCSI\s0 disk with unit \s-1ID\s0 6 on the bus #0: .Sp .Vb 1 \& qemu\-system\-i386 \-drive file=file,if=scsi,bus=0,unit=6 .Ve .Sp Instead of \fB\-fda\fR, \fB\-fdb\fR, you can use: .Sp .Vb 2 \& qemu\-system\-i386 \-drive file=file,index=0,if=floppy \& qemu\-system\-i386 \-drive file=file,index=1,if=floppy .Ve .Sp By default, \fIinterface\fR is \*(L"ide\*(R" and \fIindex\fR is automatically incremented: .Sp .Vb 1 \& qemu\-system\-i386 \-drive file=a \-drive file=b" .Ve .Sp is interpreted like: .Sp .Vb 1 \& qemu\-system\-i386 \-hda a \-hdb b .Ve .RE .IP "\fB\-set\fR" 4 .IX Item "-set" \&\s-1TODO\s0 .IP "\fB\-global\fR \fIdriver\fR\fB.\fR\fIprop\fR\fB=\fR\fIvalue\fR" 4 .IX Item "-global driver.prop=value" Set default value of \fIdriver\fR's property \fIprop\fR to \fIvalue\fR, e.g.: .Sp .Vb 1 \& qemu\-system\-i386 \-global ide\-drive.physical_block_size=4096 \-drive file=file,if=ide,index=0,media=disk .Ve .Sp In particular, you can use this to set driver properties for devices which are created automatically by the machine model. To create a device which is not created automatically and set properties on it, use \-\fBdevice\fR. .IP "\fB\-mtdblock\fR \fIfile\fR" 4 .IX Item "-mtdblock file" Use \fIfile\fR as on-board Flash memory image. .IP "\fB\-sd\fR \fIfile\fR" 4 .IX Item "-sd file" Use \fIfile\fR as SecureDigital card image. .IP "\fB\-pflash\fR \fIfile\fR" 4 .IX Item "-pflash file" Use \fIfile\fR as a parallel flash image. .IP "\fB\-boot [order=\fR\fIdrives\fR\fB][,once=\fR\fIdrives\fR\fB][,menu=on|off][,splash=\fR\fIsp_name\fR\fB][,splash\-time=\fR\fIsp_time\fR\fB]\fR" 4 .IX Item "-boot [order=drives][,once=drives][,menu=on|off][,splash=sp_name][,splash-time=sp_time]" Specify boot order \fIdrives\fR as a string of drive letters. Valid drive letters depend on the target achitecture. The x86 \s-1PC\s0 uses: a, b (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n\-p (Etherboot from network adapter 1\-4), hard disk boot is the default. To apply a particular boot order only on the first startup, specify it via \&\fBonce\fR. .Sp Interactive boot menus/prompts can be enabled via \fBmenu=on\fR as far as firmware/BIOS supports them. The default is non-interactive boot. .Sp A splash picture could be passed to bios, enabling user to show it as logo, when option splash=\fIsp_name\fR is given and menu=on, If firmware/BIOS supports them. Currently Seabios for X86 system support it. limitation: The splash file could be a jpeg file or a \s-1BMP\s0 file in 24 \s-1BPP\s0 format(true color). The resolution should be supported by the \s-1SVGA\s0 mode, so the recommended is 320x240, 640x480, 800x640. .Sp .Vb 6 \& # try to boot from network first, then from hard disk \& qemu\-system\-i386 \-boot order=nc \& # boot from CD\-ROM first, switch back to default order after reboot \& qemu\-system\-i386 \-boot once=d \& # boot with a splash picture for 5 seconds. \& qemu\-system\-i386 \-boot menu=on,splash=/root/boot.bmp,splash\-time=5000 .Ve .Sp Note: The legacy format '\-boot \fIdrives\fR' is still supported but its use is discouraged as it may be removed from future versions. .IP "\fB\-snapshot\fR" 4 .IX Item "-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 \fBC\-a s\fR. .IP "\fB\-m\fR \fImegs\fR" 4 .IX Item "-m megs" Set virtual \s-1RAM\s0 size to \fImegs\fR megabytes. Default is 128 MiB. Optionally, a suffix of \*(L"M\*(R" or \*(L"G\*(R" can be used to signify a value in megabytes or gigabytes respectively. .IP "\fB\-mem\-path\fR \fIpath\fR" 4 .IX Item "-mem-path path" Allocate guest \s-1RAM\s0 from a temporarily created file in \fIpath\fR. .IP "\fB\-mem\-prealloc\fR" 4 .IX Item "-mem-prealloc" Preallocate memory when using \-mem\-path. .IP "\fB\-k\fR \fIlanguage\fR" 4 .IX Item "-k language" Use keyboard layout \fIlanguage\fR (for example \f(CW\*(C`fr\*(C'\fR for French). This option is only needed where it is not easy to get raw \s-1PC\s0 keycodes (e.g. on Macs, with some X11 servers or with a \s-1VNC\s0 display). You don't normally need to use it on PC/Linux or PC/Windows hosts. .Sp The available layouts are: .Sp .Vb 3 \& 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 .Ve .Sp The default is \f(CW\*(C`en\-us\*(C'\fR. .IP "\fB\-audio\-help\fR" 4 .IX Item "-audio-help" Will show the audio subsystem help: list of drivers, tunable parameters. .IP "\fB\-soundhw\fR \fIcard1\fR\fB[,\fR\fIcard2\fR\fB,...] or \-soundhw all\fR" 4 .IX Item "-soundhw card1[,card2,...] or -soundhw all" Enable audio and selected sound hardware. Use ? to print all available sound hardware. .Sp .Vb 6 \& qemu\-system\-i386 \-soundhw sb16,adlib disk.img \& qemu\-system\-i386 \-soundhw es1370 disk.img \& qemu\-system\-i386 \-soundhw ac97 disk.img \& qemu\-system\-i386 \-soundhw hda disk.img \& qemu\-system\-i386 \-soundhw all disk.img \& qemu\-system\-i386 \-soundhw ? .Ve .Sp Note that Linux's i810_audio \s-1OSS\s0 kernel (for \s-1AC97\s0) module might require manually specifying clocking. .Sp .Vb 1 \& modprobe i810_audio clocking=48000 .Ve .IP "\fB\-balloon none\fR" 4 .IX Item "-balloon none" Disable balloon device. .IP "\fB\-balloon virtio[,addr=\fR\fIaddr\fR\fB]\fR" 4 .IX Item "-balloon virtio[,addr=addr]" Enable virtio balloon device (default), optionally with \s-1PCI\s0 address \&\fIaddr\fR. .PP \&\s-1USB\s0 options: .IP "\fB\-usb\fR" 4 .IX Item "-usb" Enable the \s-1USB\s0 driver (will be the default soon) .IP "\fB\-usbdevice\fR \fIdevname\fR" 4 .IX Item "-usbdevice devname" Add the \s-1USB\s0 device \fIdevname\fR. .RS 4 .IP "\fBmouse\fR" 4 .IX Item "mouse" Virtual Mouse. This will override the \s-1PS/2\s0 mouse emulation when activated. .IP "\fBtablet\fR" 4 .IX Item "tablet" Pointer device that uses absolute coordinates (like a touchscreen). This means \s-1QEMU\s0 is able to report the mouse position without having to grab the mouse. Also overrides the \s-1PS/2\s0 mouse emulation when activated. .IP "\fBdisk:[format=\fR\fIformat\fR\fB]:\fR\fIfile\fR" 4 .IX Item "disk:[format=format]:file" Mass storage device based on file. The optional \fIformat\fR argument will be used rather than detecting the format. Can be used to specifiy \&\f(CW\*(C`format=raw\*(C'\fR to avoid interpreting an untrusted format header. .IP "\fBhost:\fR\fIbus\fR\fB.\fR\fIaddr\fR" 4 .IX Item "host:bus.addr" Pass through the host device identified by \fIbus\fR.\fIaddr\fR (Linux only). .IP "\fBhost:\fR\fIvendor_id\fR\fB:\fR\fIproduct_id\fR" 4 .IX Item "host:vendor_id:product_id" Pass through the host device identified by \fIvendor_id\fR:\fIproduct_id\fR (Linux only). .IP "\fBserial:[vendorid=\fR\fIvendor_id\fR\fB][,productid=\fR\fIproduct_id\fR\fB]:\fR\fIdev\fR" 4 .IX Item "serial:[vendorid=vendor_id][,productid=product_id]:dev" Serial converter to host character device \fIdev\fR, see \f(CW\*(C`\-serial\*(C'\fR for the available devices. .IP "\fBbraille\fR" 4 .IX Item "braille" Braille device. This will use BrlAPI to display the braille output on a real or fake device. .IP "\fBnet:\fR\fIoptions\fR" 4 .IX Item "net:options" Network adapter that supports \s-1CDC\s0 ethernet and \s-1RNDIS\s0 protocols. .RE .RS 4 .RE .IP "\fB\-device\fR \fIdriver\fR\fB[,\fR\fIprop\fR\fB[=\fR\fIvalue\fR\fB][,...]]\fR" 4 .IX Item "-device driver[,prop[=value][,...]]" Add device \fIdriver\fR. \fIprop\fR=\fIvalue\fR sets driver properties. Valid properties depend on the driver. To get help on possible drivers and properties, use \f(CW\*(C`\-device ?\*(C'\fR and \&\f(CW\*(C`\-device \f(CIdriver\f(CW,?\*(C'\fR. .Sp File system options: .IP "\fB\-fsdev\fR \fIfsdriver\fR\fB,id=\fR\fIid\fR\fB,path=\fR\fIpath\fR\fB,[security_model=\fR\fIsecurity_model\fR\fB][,writeout=\fR\fIwriteout\fR\fB][,readonly][,socket=\fR\fIsocket\fR\fB|sock_fd=\fR\fIsock_fd\fR\fB]\fR" 4 .IX Item "-fsdev fsdriver,id=id,path=path,[security_model=security_model][,writeout=writeout][,readonly][,socket=socket|sock_fd=sock_fd]" Define a new file system device. Valid options are: .RS 4 .IP "\fIfsdriver\fR" 4 .IX Item "fsdriver" This option specifies the fs driver backend to use. Currently \*(L"local\*(R", \*(L"handle\*(R" and \*(L"proxy\*(R" file system drivers are supported. .IP "\fBid=\fR\fIid\fR" 4 .IX Item "id=id" Specifies identifier for this device .IP "\fBpath=\fR\fIpath\fR" 4 .IX Item "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. .IP "\fBsecurity_model=\fR\fIsecurity_model\fR" 4 .IX Item "security_model=security_model" Specifies the security model to be used for this export path. Supported security models are \*(L"passthrough\*(R", \*(L"mapped-xattr\*(R", \*(L"mapped-file\*(R" and \*(L"none\*(R". In \*(L"passthrough\*(R" security model, files are stored using the same credentials as they are created on the guest. This requires \s-1QEMU\s0 to run as root. In \*(L"mapped-xattr\*(R" security model, some of the file attributes like uid, gid, mode bits and link target are stored as file attributes. For \*(L"mapped-file\*(R" these attributes are stored in the hidden .virtfs_metadata directory. Directories exported by this security model cannot interact with other unix tools. \*(L"none\*(R" 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 handle, proxy) don't take security model as a parameter. .IP "\fBwriteout=\fR\fIwriteout\fR" 4 .IX Item "writeout=writeout" This is an optional argument. The only supported value is \*(L"immediate\*(R". 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. .IP "\fBreadonly\fR" 4 .IX Item "readonly" Enables exporting 9p share as a readonly mount for guests. By default read-write access is given. .IP "\fBsocket=\fR\fIsocket\fR" 4 .IX Item "socket=socket" Enables proxy filesystem driver to use passed socket file for communicating with virtfs-proxy-helper .IP "\fBsock_fd=\fR\fIsock_fd\fR" 4 .IX Item "sock_fd=sock_fd" Enables proxy filesystem driver to use passed socket descriptor for communicating with virtfs-proxy-helper. Usually a helper like libvirt will create socketpair and pass one of the fds as sock_fd .RE .RS 4 .Sp \&\-fsdev option is used along with \-device driver \*(L"virtio\-9p\-pci\*(R". .RE .IP "\fB\-device virtio\-9p\-pci,fsdev=\fR\fIid\fR\fB,mount_tag=\fR\fImount_tag\fR" 4 .IX Item "-device virtio-9p-pci,fsdev=id,mount_tag=mount_tag" Options for virtio\-9p\-pci driver are: .RS 4 .IP "\fBfsdev=\fR\fIid\fR" 4 .IX Item "fsdev=id" Specifies the id value specified along with \-fsdev option .IP "\fBmount_tag=\fR\fImount_tag\fR" 4 .IX Item "mount_tag=mount_tag" Specifies the tag name to be used by the guest to mount this export point .RE .RS 4 .Sp Virtual File system pass-through options: .RE .IP "\fB\-virtfs\fR \fIfsdriver\fR\fB[,path=\fR\fIpath\fR\fB],mount_tag=\fR\fImount_tag\fR\fB[,security_model=\fR\fIsecurity_model\fR\fB][,writeout=\fR\fIwriteout\fR\fB][,readonly][,socket=\fR\fIsocket\fR\fB|sock_fd=\fR\fIsock_fd\fR\fB]\fR" 4 .IX Item "-virtfs fsdriver[,path=path],mount_tag=mount_tag[,security_model=security_model][,writeout=writeout][,readonly][,socket=socket|sock_fd=sock_fd]" The general form of a Virtual File system pass-through options are: .RS 4 .IP "\fIfsdriver\fR" 4 .IX Item "fsdriver" This option specifies the fs driver backend to use. Currently \*(L"local\*(R", \*(L"handle\*(R" and \*(L"proxy\*(R" file system drivers are supported. .IP "\fBid=\fR\fIid\fR" 4 .IX Item "id=id" Specifies identifier for this device .IP "\fBpath=\fR\fIpath\fR" 4 .IX Item "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. .IP "\fBsecurity_model=\fR\fIsecurity_model\fR" 4 .IX Item "security_model=security_model" Specifies the security model to be used for this export path. Supported security models are \*(L"passthrough\*(R", \*(L"mapped-xattr\*(R", \*(L"mapped-file\*(R" and \*(L"none\*(R". In \*(L"passthrough\*(R" security model, files are stored using the same credentials as they are created on the guest. This requires \s-1QEMU\s0 to run as root. In \*(L"mapped-xattr\*(R" security model, some of the file attributes like uid, gid, mode bits and link target are stored as file attributes. For \*(L"mapped-file\*(R" these attributes are stored in the hidden .virtfs_metadata directory. Directories exported by this security model cannot interact with other unix tools. \*(L"none\*(R" 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 handle, proxy) don't take security model as a parameter. .IP "\fBwriteout=\fR\fIwriteout\fR" 4 .IX Item "writeout=writeout" This is an optional argument. The only supported value is \*(L"immediate\*(R". 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. .IP "\fBreadonly\fR" 4 .IX Item "readonly" Enables exporting 9p share as a readonly mount for guests. By default read-write access is given. .IP "\fBsocket=\fR\fIsocket\fR" 4 .IX Item "socket=socket" Enables proxy filesystem driver to use passed socket file for communicating with virtfs-proxy-helper. Usually a helper like libvirt will create socketpair and pass one of the fds as sock_fd .IP "\fBsock_fd\fR" 4 .IX Item "sock_fd" Enables proxy filesystem driver to use passed 'sock_fd' as the socket descriptor for interfacing with virtfs-proxy-helper .RE .RS 4 .RE .IP "\fB\-virtfs_synth\fR" 4 .IX Item "-virtfs_synth" Create synthetic file system image .IP "\fB\-name\fR \fIname\fR" 4 .IX Item "-name name" Sets the \fIname\fR of the guest. This name will be displayed in the \s-1SDL\s0 window caption. The \fIname\fR will also be used for the \s-1VNC\s0 server. Also optionally set the top visible process name in Linux. .IP "\fB\-uuid\fR \fIuuid\fR" 4 .IX Item "-uuid uuid" Set system \s-1UUID\s0. .PP Display options: .IP "\fB\-display\fR \fItype\fR" 4 .IX Item "-display type" Select type of display to use. This option is a replacement for the old style \-sdl/\-curses/... options. Valid values for \fItype\fR are .RS 4 .IP "\fBsdl\fR" 4 .IX Item "sdl" Display video output via \s-1SDL\s0 (usually in a separate graphics window; see the \s-1SDL\s0 documentation for other possibilities). .IP "\fBcurses\fR" 4 .IX Item "curses" Display video output via curses. For graphics device models which support a text mode, \s-1QEMU\s0 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 \s-1VGA\s0 device models support text mode. .IP "\fBnone\fR" 4 .IX Item "none" Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the \s-1QEMU\s0 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. .IP "\fBvnc\fR" 4 .IX Item "vnc" Start a \s-1VNC\s0 server on display .RE .RS 4 .RE .IP "\fB\-nographic\fR" 4 .IX Item "-nographic" Normally, \s-1QEMU\s0 uses \s-1SDL\s0 to display the \s-1VGA\s0 output. With this option, you can totally disable graphical output so that \s-1QEMU\s0 is a simple command line application. The emulated serial port is redirected on the console. Therefore, you can still use \s-1QEMU\s0 to debug a Linux kernel with a serial console. .IP "\fB\-curses\fR" 4 .IX Item "-curses" Normally, \s-1QEMU\s0 uses \s-1SDL\s0 to display the \s-1VGA\s0 output. With this option, \&\s-1QEMU\s0 can display the \s-1VGA\s0 output when in text mode using a curses/ncurses interface. Nothing is displayed in graphical mode. .IP "\fB\-no\-frame\fR" 4 .IX Item "-no-frame" Do not use decorations for \s-1SDL\s0 windows and start them using the whole available screen space. This makes the using \s-1QEMU\s0 in a dedicated desktop workspace more convenient. .IP "\fB\-alt\-grab\fR" 4 .IX Item "-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). .IP "\fB\-ctrl\-grab\fR" 4 .IX Item "-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). .IP "\fB\-no\-quit\fR" 4 .IX Item "-no-quit" Disable \s-1SDL\s0 window close capability. .IP "\fB\-sdl\fR" 4 .IX Item "-sdl" Enable \s-1SDL\s0. .IP "\fB\-spice\fR \fIoption\fR\fB[,\fR\fIoption\fR\fB[,...]]\fR" 4 .IX Item "-spice option[,option[,...]]" Enable the spice remote desktop protocol. Valid options are .RS 4 .IP "\fBport=\fR" 4 .IX Item "port=" Set the \s-1TCP\s0 port spice is listening on for plaintext channels. .IP "\fBaddr=\fR" 4 .IX Item "addr=" Set the \s-1IP\s0 address spice is listening on. Default is any address. .IP "\fBipv4\fR" 4 .IX Item "ipv4" .PD 0 .IP "\fBipv6\fR" 4 .IX Item "ipv6" .PD Force using the specified \s-1IP\s0 version. .IP "\fBpassword=\fR" 4 .IX Item "password=" Set the password you need to authenticate. .IP "\fBsasl\fR" 4 .IX Item "sasl" Require that the client use \s-1SASL\s0 to authenticate with the spice. The exact choice of authentication method used is controlled from the system / user's \s-1SASL\s0 configuration file for the 'qemu' service. This is typically found in /etc/sasl2/qemu.conf. If running \s-1QEMU\s0 as an unprivileged user, an environment variable \s-1SASL_CONF_PATH\s0 can be used to make it search alternate locations for the service config. While some \s-1SASL\s0 auth methods can also provide data encryption (eg \s-1GSSAPI\s0), it is recommended that \s-1SASL\s0 always be combined with the 'tls' and \&'x509' settings to enable use of \s-1SSL\s0 and server certificates. This ensures a data encryption preventing compromise of authentication credentials. .IP "\fBdisable-ticketing\fR" 4 .IX Item "disable-ticketing" Allow client connects without authentication. .IP "\fBdisable-copy-paste\fR" 4 .IX Item "disable-copy-paste" Disable copy paste between the client and the guest. .IP "\fBtls\-port=\fR" 4 .IX Item "tls-port=" Set the \s-1TCP\s0 port spice is listening on for encrypted channels. .IP "\fBx509\-dir=\fR" 4 .IX Item "x509-dir=" Set the x509 file directory. Expects same filenames as \-vnc \f(CW$display\fR,x509=$dir .IP "\fBx509\-key\-file=\fR" 4 .IX Item "x509-key-file=" .PD 0 .IP "\fBx509\-key\-password=\fR" 4 .IX Item "x509-key-password=" .IP "\fBx509\-cert\-file=\fR" 4 .IX Item "x509-cert-file=" .IP "\fBx509\-cacert\-file=\fR" 4 .IX Item "x509-cacert-file=" .IP "\fBx509\-dh\-key\-file=\fR" 4 .IX Item "x509-dh-key-file=" .PD The x509 file names can also be configured individually. .IP "\fBtls\-ciphers=\fR" 4 .IX Item "tls-ciphers=" Specify which ciphers to use. .IP "\fBtls\-channel=[main|display|cursor|inputs|record|playback]\fR" 4 .IX Item "tls-channel=[main|display|cursor|inputs|record|playback]" .PD 0 .IP "\fBplaintext\-channel=[main|display|cursor|inputs|record|playback]\fR" 4 .IX Item "plaintext-channel=[main|display|cursor|inputs|record|playback]" .PD Force specific channel to be used with or without \s-1TLS\s0 encryption. The options can be specified multiple times to configure multiple channels. The special name \*(L"default\*(R" 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. .IP "\fBimage\-compression=[auto_glz|auto_lz|quic|glz|lz|off]\fR" 4 .IX Item "image-compression=[auto_glz|auto_lz|quic|glz|lz|off]" Configure image compression (lossless). Default is auto_glz. .IP "\fBjpeg\-wan\-compression=[auto|never|always]\fR" 4 .IX Item "jpeg-wan-compression=[auto|never|always]" .PD 0 .IP "\fBzlib\-glz\-wan\-compression=[auto|never|always]\fR" 4 .IX Item "zlib-glz-wan-compression=[auto|never|always]" .PD Configure wan image compression (lossy for slow links). Default is auto. .IP "\fBstreaming\-video=[off|all|filter]\fR" 4 .IX Item "streaming-video=[off|all|filter]" Configure video stream detection. Default is filter. .IP "\fBagent\-mouse=[on|off]\fR" 4 .IX Item "agent-mouse=[on|off]" Enable/disable passing mouse events via vdagent. Default is on. .IP "\fBplayback\-compression=[on|off]\fR" 4 .IX Item "playback-compression=[on|off]" Enable/disable audio stream compression (using celt 0.5.1). Default is on. .RE .RS 4 .RE .IP "\fB\-portrait\fR" 4 .IX Item "-portrait" Rotate graphical output 90 deg left (only \s-1PXA\s0 \s-1LCD\s0). .IP "\fB\-rotate\fR" 4 .IX Item "-rotate" Rotate graphical output some deg left (only \s-1PXA\s0 \s-1LCD\s0). .IP "\fB\-vga\fR \fItype\fR" 4 .IX Item "-vga type" Select type of \s-1VGA\s0 card to emulate. Valid values for \fItype\fR are .RS 4 .IP "\fBcirrus\fR" 4 .IX Item "cirrus" Cirrus Logic \s-1GD5446\s0 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 \s-1OS\s0. (This one is the default) .IP "\fBstd\fR" 4 .IX Item "std" Standard \s-1VGA\s0 card with Bochs \s-1VBE\s0 extensions. If your guest \s-1OS\s0 supports the \s-1VESA\s0 2.0 \s-1VBE\s0 extensions (e.g. Windows \s-1XP\s0) and if you want to use high resolution modes (>= 1280x1024x16) then you should use this option. .IP "\fBvmware\fR" 4 .IX Item "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. .IP "\fBqxl\fR" 4 .IX Item "qxl" \&\s-1QXL\s0 paravirtual graphic card. It is \s-1VGA\s0 compatible (including \s-1VESA\s0 2.0 \s-1VBE\s0 support). Works best with qxl guest drivers installed though. Recommended choice when using the spice protocol. .IP "\fBnone\fR" 4 .IX Item "none" Disable \s-1VGA\s0 card. .RE .RS 4 .RE .IP "\fB\-full\-screen\fR" 4 .IX Item "-full-screen" Start in full screen. .IP "\fB\-g\fR \fIwidth\fR\fBx\fR\fIheight\fR\fB[x\fR\fIdepth\fR\fB]\fR" 4 .IX Item "-g widthxheight[xdepth]" Set the initial graphical resolution and depth (\s-1PPC\s0, \s-1SPARC\s0 only). .IP "\fB\-vnc\fR \fIdisplay\fR\fB[,\fR\fIoption\fR\fB[,\fR\fIoption\fR\fB[,...]]]\fR" 4 .IX Item "-vnc display[,option[,option[,...]]]" Normally, \s-1QEMU\s0 uses \s-1SDL\s0 to display the \s-1VGA\s0 output. With this option, you can have \s-1QEMU\s0 listen on \s-1VNC\s0 display \fIdisplay\fR and redirect the \s-1VGA\s0 display over the \s-1VNC\s0 session. It is very useful to enable the usb tablet device when using this option (option \fB\-usbdevice tablet\fR). When using the \s-1VNC\s0 display, you must use the \fB\-k\fR parameter to set the keyboard layout if you are not using en-us. Valid syntax for the \fIdisplay\fR is .RS 4 .IP "\fIhost\fR\fB:\fR\fId\fR" 4 .IX Item "host:d" \&\s-1TCP\s0 connections will only be allowed from \fIhost\fR on display \fId\fR. By convention the \s-1TCP\s0 port is 5900+\fId\fR. Optionally, \fIhost\fR can be omitted in which case the server will accept connections from any host. .IP "\fBunix:\fR\fIpath\fR" 4 .IX Item "unix:path" Connections will be allowed over \s-1UNIX\s0 domain sockets where \fIpath\fR is the location of a unix socket to listen for connections on. .IP "\fBnone\fR" 4 .IX Item "none" \&\s-1VNC\s0 is initialized but not started. The monitor \f(CW\*(C`change\*(C'\fR command can be used to later start the \s-1VNC\s0 server. .RE .RS 4 .Sp Following the \fIdisplay\fR value there may be one or more \fIoption\fR flags separated by commas. Valid options are .IP "\fBreverse\fR" 4 .IX Item "reverse" Connect to a listening \s-1VNC\s0 client via a \*(L"reverse\*(R" connection. The client is specified by the \fIdisplay\fR. For reverse network connections (\fIhost\fR:\fId\fR,\f(CW\*(C`reverse\*(C'\fR), the \fId\fR argument is a \s-1TCP\s0 port number, not a display number. .IP "\fBpassword\fR" 4 .IX Item "password" Require that password based authentication is used for client connections. The password must be set separately using the \f(CW\*(C`change\*(C'\fR command in the \&\fBpcsys_monitor\fR .IP "\fBtls\fR" 4 .IX Item "tls" Require that client use \s-1TLS\s0 when communicating with the \s-1VNC\s0 server. This uses anonymous \s-1TLS\s0 credentials so is susceptible to a man-in-the-middle attack. It is recommended that this option be combined with either the \&\fBx509\fR or \fBx509verify\fR options. .IP "\fBx509=\fR\fI/path/to/certificate/dir\fR" 4 .IX Item "x509=/path/to/certificate/dir" Valid if \fBtls\fR is specified. Require that x509 credentials are used for negotiating the \s-1TLS\s0 session. The server will send its x509 certificate to the client. It is recommended that a password be set on the \s-1VNC\s0 server to provide authentication of the client when this is used. The path following this option specifies where the x509 certificates are to be loaded from. See the \fBvnc_security\fR section for details on generating certificates. .IP "\fBx509verify=\fR\fI/path/to/certificate/dir\fR" 4 .IX Item "x509verify=/path/to/certificate/dir" Valid if \fBtls\fR is specified. Require that x509 credentials are used for negotiating the \s-1TLS\s0 session. The server will send its x509 certificate to the client, and request that the client send its own x509 certificate. The server will validate the client's certificate against the \s-1CA\s0 certificate, and reject clients when validation fails. If the certificate authority is trusted, this is a sufficient authentication mechanism. You may still wish to set a password on the \s-1VNC\s0 server as a second authentication layer. The path following this option specifies where the x509 certificates are to be loaded from. See the \fBvnc_security\fR section for details on generating certificates. .IP "\fBsasl\fR" 4 .IX Item "sasl" Require that the client use \s-1SASL\s0 to authenticate with the \s-1VNC\s0 server. The exact choice of authentication method used is controlled from the system / user's \s-1SASL\s0 configuration file for the 'qemu' service. This is typically found in /etc/sasl2/qemu.conf. If running \s-1QEMU\s0 as an unprivileged user, an environment variable \s-1SASL_CONF_PATH\s0 can be used to make it search alternate locations for the service config. While some \s-1SASL\s0 auth methods can also provide data encryption (eg \s-1GSSAPI\s0), it is recommended that \s-1SASL\s0 always be combined with the 'tls' and \&'x509' settings to enable use of \s-1SSL\s0 and server certificates. This ensures a data encryption preventing compromise of authentication credentials. See the \fBvnc_security\fR section for details on using \&\s-1SASL\s0 authentication. .IP "\fBacl\fR" 4 .IX Item "acl" Turn on access control lists for checking of the x509 client certificate and \s-1SASL\s0 party. For x509 certs, the \s-1ACL\s0 check is made against the certificate's distinguished name. This is something that looks like \&\f(CW\*(C`C=GB,O=ACME,L=Boston,CN=bob\*(C'\fR. For \s-1SASL\s0 party, the \s-1ACL\s0 check is made against the username, which depending on the \s-1SASL\s0 plugin, may include a realm component, eg \f(CW\*(C`bob\*(C'\fR or \f(CW\*(C`bob@EXAMPLE.COM\*(C'\fR. When the \fBacl\fR flag is set, the initial access list will be empty, with a \f(CW\*(C`deny\*(C'\fR policy. Thus no one will be allowed to use the \s-1VNC\s0 server until the ACLs have been loaded. This can be achieved using the \f(CW\*(C`acl\*(C'\fR monitor command. .IP "\fBlossy\fR" 4 .IX Item "lossy" Enable lossy compression methods (gradient, \s-1JPEG\s0, ...). If this option is set, \s-1VNC\s0 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. .IP "\fBnon-adaptive\fR" 4 .IX Item "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 \s-1JPEG\s0). This can be really helpful to save bandwidth when playing videos. Disabling adaptive encodings allows to restore the original static behavior of encodings like Tight. .IP "\fBshare=[allow\-exclusive|force\-shared|ignore]\fR" 4 .IX Item "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 \s-1QEMU\s0 behavior. .RE .RS 4 .RE .PP i386 target only: .IP "\fB\-win2k\-hack\fR" 4 .IX Item "-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 \s-1IDE\s0 transfers). .IP "\fB\-no\-fd\-bootchk\fR" 4 .IX Item "-no-fd-bootchk" Disable boot signature checking for floppy disks in Bochs \s-1BIOS\s0. It may be needed to boot from old floppy disks. \&\s-1TODO:\s0 check reference to Bochs \s-1BIOS\s0. .IP "\fB\-no\-acpi\fR" 4 .IX Item "-no-acpi" Disable \s-1ACPI\s0 (Advanced Configuration and Power Interface) support. Use it if your guest \s-1OS\s0 complains about \s-1ACPI\s0 problems (\s-1PC\s0 target machine only). .IP "\fB\-no\-hpet\fR" 4 .IX Item "-no-hpet" Disable \s-1HPET\s0 support. .IP "\fB\-acpitable [sig=\fR\fIstr\fR\fB][,rev=\fR\fIn\fR\fB][,oem_id=\fR\fIstr\fR\fB][,oem_table_id=\fR\fIstr\fR\fB][,oem_rev=\fR\fIn\fR\fB] [,asl_compiler_id=\fR\fIstr\fR\fB][,asl_compiler_rev=\fR\fIn\fR\fB][,data=\fR\fIfile1\fR\fB[:\fR\fIfile2\fR\fB]...]\fR" 4 .IX Item "-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 \s-1ACPI\s0 table with specified header fields and context from specified files. For file=, take whole \s-1ACPI\s0 table from the specified files, including all \&\s-1ACPI\s0 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. .IP "\fB\-smbios file=\fR\fIbinary\fR" 4 .IX Item "-smbios file=binary" Load \s-1SMBIOS\s0 entry from binary file. .ie n .IP "\fB\-smbios type=0[,vendor=\fR\fIstr\fR\fB][,version=\fR\fIstr\fR\fB][,date=\fR\fIstr\fR\fB][,release=\fR\fI\fI%d\fI.%d\fR\fB]\fR" 4 .el .IP "\fB\-smbios type=0[,vendor=\fR\fIstr\fR\fB][,version=\fR\fIstr\fR\fB][,date=\fR\fIstr\fR\fB][,release=\fR\fI\f(CI%d\fI.%d\fR\fB]\fR" 4 .IX Item "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]" Specify \s-1SMBIOS\s0 type 0 fields .IP "\fB\-smbios type=1[,manufacturer=\fR\fIstr\fR\fB][,product=\fR\fIstr\fR\fB] [,version=\fR\fIstr\fR\fB][,serial=\fR\fIstr\fR\fB][,uuid=\fR\fIuuid\fR\fB][,sku=\fR\fIstr\fR\fB] [,family=\fR\fIstr\fR\fB]\fR" 4 .IX Item "-smbios type=1[,manufacturer=str][,product=str] [,version=str][,serial=str][,uuid=uuid][,sku=str] [,family=str]" Specify \s-1SMBIOS\s0 type 1 fields .PP Network options: .IP "\fB\-net nic[,vlan=\fR\fIn\fR\fB][,macaddr=\fR\fImac\fR\fB][,model=\fR\fItype\fR\fB] [,name=\fR\fIname\fR\fB][,addr=\fR\fIaddr\fR\fB][,vectors=\fR\fIv\fR\fB]\fR" 4 .IX Item "-net nic[,vlan=n][,macaddr=mac][,model=type] [,name=name][,addr=addr][,vectors=v]" Create a new Network Interface Card and connect it to \s-1VLAN\s0 \fIn\fR (\fIn\fR = 0 is the default). The \s-1NIC\s0 is an e1000 by default on the \s-1PC\s0 target. Optionally, the \s-1MAC\s0 address can be changed to \fImac\fR, the device address set to \fIaddr\fR (\s-1PCI\s0 cards only), and a \fIname\fR can be assigned for use in monitor commands. Optionally, for \s-1PCI\s0 cards, you can specify the number \fIv\fR of MSI-X vectors that the card should have; this option currently only affects virtio cards; set \&\fIv\fR = 0 to disable MSI-X. If no \fB\-net\fR option is specified, a single \&\s-1NIC\s0 is created. \s-1QEMU\s0 can emulate several different models of network card. Valid values for \fItype\fR are \&\f(CW\*(C`virtio\*(C'\fR, \f(CW\*(C`i82551\*(C'\fR, \f(CW\*(C`i82557b\*(C'\fR, \f(CW\*(C`i82559er\*(C'\fR, \&\f(CW\*(C`ne2k_pci\*(C'\fR, \f(CW\*(C`ne2k_isa\*(C'\fR, \f(CW\*(C`pcnet\*(C'\fR, \f(CW\*(C`rtl8139\*(C'\fR, \&\f(CW\*(C`e1000\*(C'\fR, \f(CW\*(C`smc91c111\*(C'\fR, \f(CW\*(C`lance\*(C'\fR and \f(CW\*(C`mcf_fec\*(C'\fR. Not all devices are supported on all targets. Use \-net nic,model=? for a list of available devices for your target. .IP "\fB\-netdev user,id=\fR\fIid\fR\fB[,\fR\fIoption\fR\fB][,\fR\fIoption\fR\fB][,...]\fR" 4 .IX Item "-netdev user,id=id[,option][,option][,...]" .PD 0 .IP "\fB\-net user[,\fR\fIoption\fR\fB][,\fR\fIoption\fR\fB][,...]\fR" 4 .IX Item "-net user[,option][,option][,...]" .PD Use the user mode network stack which requires no administrator privilege to run. Valid options are: .RS 4 .IP "\fBvlan=\fR\fIn\fR" 4 .IX Item "vlan=n" Connect user mode stack to \s-1VLAN\s0 \fIn\fR (\fIn\fR = 0 is the default). .IP "\fBid=\fR\fIid\fR" 4 .IX Item "id=id" .PD 0 .IP "\fBname=\fR\fIname\fR" 4 .IX Item "name=name" .PD Assign symbolic name for use in monitor commands. .IP "\fBnet=\fR\fIaddr\fR\fB[/\fR\fImask\fR\fB]\fR" 4 .IX Item "net=addr[/mask]" Set \s-1IP\s0 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. .IP "\fBhost=\fR\fIaddr\fR" 4 .IX Item "host=addr" Specify the guest-visible address of the host. Default is the 2nd \s-1IP\s0 in the guest network, i.e. x.x.x.2. .IP "\fBrestrict=on|off\fR" 4 .IX Item "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 \s-1IP\s0 packets will be routed over the host to the outside. This option does not affect any explicitly set forwarding rules. .IP "\fBhostname=\fR\fIname\fR" 4 .IX Item "hostname=name" Specifies the client hostname reported by the builtin \s-1DHCP\s0 server. .IP "\fBdhcpstart=\fR\fIaddr\fR" 4 .IX Item "dhcpstart=addr" Specify the first of the 16 IPs the built-in \s-1DHCP\s0 server can assign. Default is the 15th to 31st \s-1IP\s0 in the guest network, i.e. x.x.x.15 to x.x.x.31. .IP "\fBdns=\fR\fIaddr\fR" 4 .IX Item "dns=addr" Specify the guest-visible address of the virtual nameserver. The address must be different from the host address. Default is the 3rd \s-1IP\s0 in the guest network, i.e. x.x.x.3. .IP "\fBtftp=\fR\fIdir\fR" 4 .IX Item "tftp=dir" When using the user mode network stack, activate a built-in \s-1TFTP\s0 server. The files in \fIdir\fR will be exposed as the root of a \s-1TFTP\s0 server. The \s-1TFTP\s0 client on the guest must be configured in binary mode (use the command \&\f(CW\*(C`bin\*(C'\fR of the Unix \s-1TFTP\s0 client). .IP "\fBbootfile=\fR\fIfile\fR" 4 .IX Item "bootfile=file" When using the user mode network stack, broadcast \fIfile\fR as the \s-1BOOTP\s0 filename. In conjunction with \fBtftp\fR, this can be used to network boot a guest from a local directory. .Sp Example (using pxelinux): .Sp .Vb 1 \& qemu\-system\-i386 \-hda linux.img \-boot n \-net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0 .Ve .IP "\fBsmb=\fR\fIdir\fR\fB[,smbserver=\fR\fIaddr\fR\fB]\fR" 4 .IX Item "smb=dir[,smbserver=addr]" When using the user mode network stack, activate a built-in \s-1SMB\s0 server so that Windows OSes can access to the host files in \fI\fIdir\fI\fR transparently. The \s-1IP\s0 address of the \s-1SMB\s0 server can be set to \fIaddr\fR. By default the 4th \s-1IP\s0 in the guest network is used, i.e. x.x.x.4. .Sp In the guest Windows \s-1OS\s0, the line: .Sp .Vb 1 \& 10.0.2.4 smbserver .Ve .Sp must be added in the file \fIC:\eWINDOWS\eLMHOSTS\fR (for windows 9x/Me) or \fIC:\eWINNT\eSYSTEM32\eDRIVERS\eETC\eLMHOSTS\fR (Windows \s-1NT/2000\s0). .Sp Then \fI\fIdir\fI\fR can be accessed in \fI\esmbserver\eqemu\fR. .Sp Note that a \s-1SAMBA\s0 server must be installed on the host \s-1OS\s0. \&\s-1QEMU\s0 was tested successfully with smbd versions from Red Hat 9, Fedora Core 3 and OpenSUSE 11.x. .IP "\fBhostfwd=[tcp|udp]:[\fR\fIhostaddr\fR\fB]:\fR\fIhostport\fR\fB\-[\fR\fIguestaddr\fR\fB]:\fR\fIguestport\fR" 4 .IX Item "hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport" Redirect incoming \s-1TCP\s0 or \s-1UDP\s0 connections to the host port \fIhostport\fR to the guest \s-1IP\s0 address \fIguestaddr\fR on guest port \fIguestport\fR. If \&\fIguestaddr\fR is not specified, its value is x.x.x.15 (default first address given by the built-in \s-1DHCP\s0 server). By specifying \fIhostaddr\fR, the rule can be bound to a specific host interface. If no connection type is set, \s-1TCP\s0 is used. This option can be given multiple times. .Sp For example, to redirect host X11 connection from screen 1 to guest screen 0, use the following: .Sp .Vb 4 \& # on the host \& qemu\-system\-i386 \-net user,hostfwd=tcp:127.0.0.1:6001\-:6000 [...] \& # this host xterm should open in the guest X11 server \& xterm \-display :1 .Ve .Sp To redirect telnet connections from host port 5555 to telnet port on the guest, use the following: .Sp .Vb 3 \& # on the host \& qemu\-system\-i386 \-net user,hostfwd=tcp::5555\-:23 [...] \& telnet localhost 5555 .Ve .Sp Then when you use on the host \f(CW\*(C`telnet localhost 5555\*(C'\fR, you connect to the guest telnet server. .IP "\fBguestfwd=[tcp]:\fR\fIserver\fR\fB:\fR\fIport\fR\fB\-\fR\fIdev\fR" 4 .IX Item "guestfwd=[tcp]:server:port-dev" Forward guest \s-1TCP\s0 connections to the \s-1IP\s0 address \fIserver\fR on port \fIport\fR to the character device \fIdev\fR. This option can be given multiple times. .RE .RS 4 .Sp Note: Legacy stand-alone options \-tftp, \-bootp, \-smb and \-redir are still processed and applied to \-net user. Mixing them with the new configuration syntax gives undefined results. Their use for new applications is discouraged as they will be removed from future versions. .RE .IP "\fB\-netdev tap,id=\fR\fIid\fR\fB[,fd=\fR\fIh\fR\fB][,ifname=\fR\fIname\fR\fB][,script=\fR\fIfile\fR\fB][,downscript=\fR\fIdfile\fR\fB][,helper=\fR\fIhelper\fR\fB]\fR" 4 .IX Item "-netdev tap,id=id[,fd=h][,ifname=name][,script=file][,downscript=dfile][,helper=helper]" .PD 0 .IP "\fB\-net tap[,vlan=\fR\fIn\fR\fB][,name=\fR\fIname\fR\fB][,fd=\fR\fIh\fR\fB][,ifname=\fR\fIname\fR\fB][,script=\fR\fIfile\fR\fB][,downscript=\fR\fIdfile\fR\fB][,helper=\fR\fIhelper\fR\fB]\fR" 4 .IX Item "-net tap[,vlan=n][,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile][,helper=helper]" .PD Connect the host \s-1TAP\s0 network interface \fIname\fR to \s-1VLAN\s0 \fIn\fR. .Sp Use the network script \fIfile\fR to configure it and the network script \&\fIdfile\fR to deconfigure it. If \fIname\fR is not provided, the \s-1OS\s0 automatically provides one. The default network configure script is \&\fI/etc/qemu\-ifup\fR and the default network deconfigure script is \&\fI/etc/qemu\-ifdown\fR. Use \fBscript=no\fR or \fBdownscript=no\fR to disable script execution. .Sp If running \s-1QEMU\s0 as an unprivileged user, use the network helper \&\fIhelper\fR to configure the \s-1TAP\s0 interface. The default network helper executable is \fI/usr/local/libexec/qemu\-bridge\-helper\fR. .Sp \&\fBfd\fR=\fIh\fR can be used to specify the handle of an already opened host \s-1TAP\s0 interface. .Sp Examples: .Sp .Vb 2 \& #launch a QEMU instance with the default network script \& qemu\-system\-i386 linux.img \-net nic \-net tap \& \& \& \& #launch a QEMU instance with two NICs, each one connected \& #to a TAP device \& qemu\-system\-i386 linux.img \e \& \-net nic,vlan=0 \-net tap,vlan=0,ifname=tap0 \e \& \-net nic,vlan=1 \-net tap,vlan=1,ifname=tap1 \& \& \& \& #launch a QEMU instance with the default network helper to \& #connect a TAP device to bridge br0 \& qemu\-system\-i386 linux.img \e \& \-net nic \-net tap,"helper=/usr/local/libexec/qemu\-bridge\-helper" .Ve .IP "\fB\-netdev bridge,id=\fR\fIid\fR\fB[,br=\fR\fIbridge\fR\fB][,helper=\fR\fIhelper\fR\fB]\fR" 4 .IX Item "-netdev bridge,id=id[,br=bridge][,helper=helper]" .PD 0 .IP "\fB\-net bridge[,vlan=\fR\fIn\fR\fB][,name=\fR\fIname\fR\fB][,br=\fR\fIbridge\fR\fB][,helper=\fR\fIhelper\fR\fB]\fR" 4 .IX Item "-net bridge[,vlan=n][,name=name][,br=bridge][,helper=helper]" .PD Connect a host \s-1TAP\s0 network interface to a host bridge device. .Sp Use the network helper \fIhelper\fR to configure the \s-1TAP\s0 interface and attach it to the bridge. The default network helper executable is \&\fI/usr/local/libexec/qemu\-bridge\-helper\fR and the default bridge device is \fIbr0\fR. .Sp Examples: .Sp .Vb 3 \& #launch a QEMU instance with the default network helper to \& #connect a TAP device to bridge br0 \& qemu\-system\-i386 linux.img \-net bridge \-net nic,model=virtio \& \& \& \& #launch a QEMU instance with the default network helper to \& #connect a TAP device to bridge qemubr0 \& qemu\-system\-i386 linux.img \-net bridge,br=qemubr0 \-net nic,model=virtio .Ve .IP "\fB\-netdev socket,id=\fR\fIid\fR\fB[,fd=\fR\fIh\fR\fB][,listen=[\fR\fIhost\fR\fB]:\fR\fIport\fR\fB][,connect=\fR\fIhost\fR\fB:\fR\fIport\fR\fB]\fR" 4 .IX Item "-netdev socket,id=id[,fd=h][,listen=[host]:port][,connect=host:port]" .PD 0 .IP "\fB\-net socket[,vlan=\fR\fIn\fR\fB][,name=\fR\fIname\fR\fB][,fd=\fR\fIh\fR\fB] [,listen=[\fR\fIhost\fR\fB]:\fR\fIport\fR\fB][,connect=\fR\fIhost\fR\fB:\fR\fIport\fR\fB]\fR" 4 .IX Item "-net socket[,vlan=n][,name=name][,fd=h] [,listen=[host]:port][,connect=host:port]" .PD Connect the \s-1VLAN\s0 \fIn\fR to a remote \s-1VLAN\s0 in another \s-1QEMU\s0 virtual machine using a \s-1TCP\s0 socket connection. If \fBlisten\fR is specified, \s-1QEMU\s0 waits for incoming connections on \fIport\fR (\fIhost\fR is optional). \fBconnect\fR is used to connect to another \s-1QEMU\s0 instance using the \fBlisten\fR option. \fBfd\fR=\fIh\fR specifies an already opened \s-1TCP\s0 socket. .Sp Example: .Sp .Vb 9 \& # launch a first QEMU instance \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:56 \e \& \-net socket,listen=:1234 \& # connect the VLAN 0 of this instance to the VLAN 0 \& # of the first instance \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:57 \e \& \-net socket,connect=127.0.0.1:1234 .Ve .IP "\fB\-netdev socket,id=\fR\fIid\fR\fB[,fd=\fR\fIh\fR\fB][,mcast=\fR\fImaddr\fR\fB:\fR\fIport\fR\fB[,localaddr=\fR\fIaddr\fR\fB]]\fR" 4 .IX Item "-netdev socket,id=id[,fd=h][,mcast=maddr:port[,localaddr=addr]]" .PD 0 .IP "\fB\-net socket[,vlan=\fR\fIn\fR\fB][,name=\fR\fIname\fR\fB][,fd=\fR\fIh\fR\fB][,mcast=\fR\fImaddr\fR\fB:\fR\fIport\fR\fB[,localaddr=\fR\fIaddr\fR\fB]]\fR" 4 .IX Item "-net socket[,vlan=n][,name=name][,fd=h][,mcast=maddr:port[,localaddr=addr]]" .PD Create a \s-1VLAN\s0 \fIn\fR shared with another \s-1QEMU\s0 virtual machines using a \s-1UDP\s0 multicast socket, effectively making a bus for every \s-1QEMU\s0 with same multicast address \fImaddr\fR and \fIport\fR. \&\s-1NOTES:\s0 .RS 4 .IP "1." 4 Several \s-1QEMU\s0 can be running on different hosts and share same bus (assuming correct multicast setup for these hosts). .IP "2." 4 mcast support is compatible with User Mode Linux (argument \fBeth\fR\fIN\fR\fB=mcast\fR), see <\fBhttp://user\-mode\-linux.sf.net\fR>. .IP "3." 4 Use \fBfd=h\fR to specify an already opened \s-1UDP\s0 multicast socket. .RE .RS 4 .Sp Example: .Sp .Vb 12 \& # launch one QEMU instance \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:56 \e \& \-net socket,mcast=230.0.0.1:1234 \& # launch another QEMU instance on same "bus" \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:57 \e \& \-net socket,mcast=230.0.0.1:1234 \& # launch yet another QEMU instance on same "bus" \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:58 \e \& \-net socket,mcast=230.0.0.1:1234 .Ve .Sp Example (User Mode Linux compat.): .Sp .Vb 7 \& # launch QEMU instance (note mcast address selected \& # is UML\*(Aqs default) \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:56 \e \& \-net socket,mcast=239.192.168.1:1102 \& # launch UML \& /path/to/linux ubd0=/path/to/root_fs eth0=mcast .Ve .Sp Example (send packets from host's 1.2.3.4): .Sp .Vb 3 \& qemu\-system\-i386 linux.img \e \& \-net nic,macaddr=52:54:00:12:34:56 \e \& \-net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4 .Ve .RE .IP "\fB\-netdev vde,id=\fR\fIid\fR\fB[,sock=\fR\fIsocketpath\fR\fB][,port=\fR\fIn\fR\fB][,group=\fR\fIgroupname\fR\fB][,mode=\fR\fIoctalmode\fR\fB]\fR" 4 .IX Item "-netdev vde,id=id[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]" .PD 0 .IP "\fB\-net vde[,vlan=\fR\fIn\fR\fB][,name=\fR\fIname\fR\fB][,sock=\fR\fIsocketpath\fR\fB] [,port=\fR\fIn\fR\fB][,group=\fR\fIgroupname\fR\fB][,mode=\fR\fIoctalmode\fR\fB]\fR" 4 .IX Item "-net vde[,vlan=n][,name=name][,sock=socketpath] [,port=n][,group=groupname][,mode=octalmode]" .PD Connect \s-1VLAN\s0 \fIn\fR to \s-1PORT\s0 \fIn\fR of a vde switch running on host and listening for incoming connections on \fIsocketpath\fR. Use \s-1GROUP\s0 \fIgroupname\fR and \s-1MODE\s0 \fIoctalmode\fR to change default ownership and permissions for communication port. This option is only available if \s-1QEMU\s0 has been compiled with vde support enabled. .Sp Example: .Sp .Vb 4 \& # launch vde switch \& vde_switch \-F \-sock /tmp/myswitch \& # launch QEMU instance \& qemu\-system\-i386 linux.img \-net nic \-net vde,sock=/tmp/myswitch .Ve .IP "\fB\-net dump[,vlan=\fR\fIn\fR\fB][,file=\fR\fIfile\fR\fB][,len=\fR\fIlen\fR\fB]\fR" 4 .IX Item "-net dump[,vlan=n][,file=file][,len=len]" Dump network traffic on \s-1VLAN\s0 \fIn\fR to file \fIfile\fR (\fIqemu\-vlan0.pcap\fR by default). At most \fIlen\fR bytes (64k by default) per packet are stored. The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. .IP "\fB\-net none\fR" 4 .IX Item "-net none" Indicate that no network devices should be configured. It is used to override the default configuration (\fB\-net nic \-net user\fR) which is activated if no \fB\-net\fR options are provided. .PP Character device options: .PP The general form of a character device option is: .IP "\fB\-chardev\fR \fIbackend\fR \fB,id=\fR\fIid\fR \fB[,mux=on|off] [,\fR\fIoptions\fR\fB]\fR" 4 .IX Item "-chardev backend ,id=id [,mux=on|off] [,options]" Backend is one of: \&\fBnull\fR, \&\fBsocket\fR, \&\fBudp\fR, \&\fBmsmouse\fR, \&\fBvc\fR, \&\fBfile\fR, \&\fBpipe\fR, \&\fBconsole\fR, \&\fBserial\fR, \&\fBpty\fR, \&\fBstdio\fR, \&\fBbraille\fR, \&\fBtty\fR, \&\fBparport\fR, \&\fBspicevmc\fR. The specific backend will determine the applicable options. .Sp 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. .Sp A character device may be used in multiplexing mode by multiple front-ends. The key sequence of \fBControl-a\fR and \fBc\fR will rotate the input focus between attached front-ends. Specify \fBmux=on\fR to enable this mode. .Sp Options to each backend are described below. .IP "\fB\-chardev null ,id=\fR\fIid\fR" 4 .IX Item "-chardev null ,id=id" A void device. This device will not emit any data, and will drop any data it receives. The null backend does not take any options. .IP "\fB\-chardev socket ,id=\fR\fIid\fR \fB[\fR\fI\s-1TCP\s0 options\fR \fBor\fR \fIunix options\fR\fB] [,server] [,nowait] [,telnet]\fR" 4 .IX Item "-chardev socket ,id=id [TCP options or unix options] [,server] [,nowait] [,telnet]" Create a two-way stream socket, which can be either a \s-1TCP\s0 or a unix socket. A unix socket will be created if \fBpath\fR is specified. Behaviour is undefined if \s-1TCP\s0 options are specified for a unix socket. .Sp \&\fBserver\fR specifies that the socket shall be a listening socket. .Sp \&\fBnowait\fR specifies that \s-1QEMU\s0 should not block waiting for a client to connect to a listening socket. .Sp \&\fBtelnet\fR specifies that traffic on the socket should interpret telnet escape sequences. .Sp \&\s-1TCP\s0 and unix socket options are given below: .RS 4 .IP "\fB\s-1TCP\s0 options: port=\fR\fIport\fR \fB[,host=\fR\fIhost\fR\fB] [,to=\fR\fIto\fR\fB] [,ipv4] [,ipv6] [,nodelay]\fR" 4 .IX Item "TCP options: port=port [,host=host] [,to=to] [,ipv4] [,ipv6] [,nodelay]" \&\fBhost\fR for a listening socket specifies the local address to be bound. For a connecting socket species the remote host to connect to. \fBhost\fR is optional for listening sockets. If not specified it defaults to \f(CW0.0.0.0\fR. .Sp \&\fBport\fR for a listening socket specifies the local port to be bound. For a connecting socket specifies the port on the remote host to connect to. \&\fBport\fR can be given as either a port number or a service name. \&\fBport\fR is required. .Sp \&\fBto\fR is only relevant to listening sockets. If it is specified, and \&\fBport\fR cannot be bound, \s-1QEMU\s0 will attempt to bind to subsequent ports up to and including \fBto\fR until it succeeds. \fBto\fR must be specified as a port number. .Sp \&\fBipv4\fR and \fBipv6\fR specify that either IPv4 or IPv6 must be used. If neither is specified the socket may use either protocol. .Sp \&\fBnodelay\fR disables the Nagle algorithm. .IP "\fBunix options: path=\fR\fIpath\fR" 4 .IX Item "unix options: path=path" \&\fBpath\fR specifies the local path of the unix socket. \fBpath\fR is required. .RE .RS 4 .RE .IP "\fB\-chardev udp ,id=\fR\fIid\fR \fB[,host=\fR\fIhost\fR\fB] ,port=\fR\fIport\fR \fB[,localaddr=\fR\fIlocaladdr\fR\fB] [,localport=\fR\fIlocalport\fR\fB] [,ipv4] [,ipv6]\fR" 4 .IX Item "-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 \s-1UDP\s0. .Sp \&\fBhost\fR specifies the remote host to connect to. If not specified it defaults to \f(CW\*(C`localhost\*(C'\fR. .Sp \&\fBport\fR specifies the port on the remote host to connect to. \fBport\fR is required. .Sp \&\fBlocaladdr\fR specifies the local address to bind to. If not specified it defaults to \f(CW0.0.0.0\fR. .Sp \&\fBlocalport\fR specifies the local port to bind to. If not specified any available local port will be used. .Sp \&\fBipv4\fR and \fBipv6\fR specify that either IPv4 or IPv6 must be used. If neither is specified the device may use either protocol. .IP "\fB\-chardev msmouse ,id=\fR\fIid\fR" 4 .IX Item "-chardev msmouse ,id=id" Forward \s-1QEMU\s0's emulated msmouse events to the guest. \fBmsmouse\fR does not take any options. .IP "\fB\-chardev vc ,id=\fR\fIid\fR \fB[[,width=\fR\fIwidth\fR\fB] [,height=\fR\fIheight\fR\fB]] [[,cols=\fR\fIcols\fR\fB] [,rows=\fR\fIrows\fR\fB]]\fR" 4 .IX Item "-chardev vc ,id=id [[,width=width] [,height=height]] [[,cols=cols] [,rows=rows]]" Connect to a \s-1QEMU\s0 text console. \fBvc\fR may optionally be given a specific size. .Sp \&\fBwidth\fR and \fBheight\fR specify the width and height respectively of the console, in pixels. .Sp \&\fBcols\fR and \fBrows\fR specify that the console be sized to fit a text console with the given dimensions. .IP "\fB\-chardev file ,id=\fR\fIid\fR \fB,path=\fR\fIpath\fR" 4 .IX Item "-chardev file ,id=id ,path=path" Log all traffic received from the guest to a file. .Sp \&\fBpath\fR specifies the path of the file to be opened. This file will be created if it does not already exist, and overwritten if it does. \fBpath\fR is required. .IP "\fB\-chardev pipe ,id=\fR\fIid\fR \fB,path=\fR\fIpath\fR" 4 .IX Item "-chardev pipe ,id=id ,path=path" Create a two-way connection to the guest. The behaviour differs slightly between Windows hosts and other hosts: .Sp On Windows, a single duplex pipe will be created at \&\fI\e.pipe\e\f(BIpath\fI\fR. .Sp On other hosts, 2 pipes will be created called \fI\f(BIpath\fI.in\fR and \&\fI\f(BIpath\fI.out\fR. Data written to \fI\f(BIpath\fI.in\fR will be received by the guest. Data written by the guest can be read from \&\fI\f(BIpath\fI.out\fR. \s-1QEMU\s0 will not create these fifos, and requires them to be present. .Sp \&\fBpath\fR forms part of the pipe path as described above. \fBpath\fR is required. .IP "\fB\-chardev console ,id=\fR\fIid\fR" 4 .IX Item "-chardev console ,id=id" Send traffic from the guest to \s-1QEMU\s0's standard output. \fBconsole\fR does not take any options. .Sp \&\fBconsole\fR is only available on Windows hosts. .IP "\fB\-chardev serial ,id=\fR\fIid\fR \fB,path=\fR\fBpath\fR" 4 .IX Item "-chardev serial ,id=id ,path=path" Send traffic from the guest to a serial device on the host. .Sp \&\fBserial\fR is only available on Windows hosts. .Sp \&\fBpath\fR specifies the name of the serial device to open. .IP "\fB\-chardev pty ,id=\fR\fIid\fR" 4 .IX Item "-chardev pty ,id=id" Create a new pseudo-terminal on the host and connect to it. \fBpty\fR does not take any options. .Sp \&\fBpty\fR is not available on Windows hosts. .IP "\fB\-chardev stdio ,id=\fR\fIid\fR \fB[,signal=on|off]\fR" 4 .IX Item "-chardev stdio ,id=id [,signal=on|off]" Connect to standard input and standard output of the \s-1QEMU\s0 process. .Sp \&\fBsignal\fR controls if signals are enabled on the terminal, that includes exiting \s-1QEMU\s0 with the key sequence \fBControl-c\fR. This option is enabled by default, use \fBsignal=off\fR to disable it. .Sp \&\fBstdio\fR is not available on Windows hosts. .IP "\fB\-chardev braille ,id=\fR\fIid\fR" 4 .IX Item "-chardev braille ,id=id" Connect to a local BrlAPI server. \fBbraille\fR does not take any options. .IP "\fB\-chardev tty ,id=\fR\fIid\fR \fB,path=\fR\fIpath\fR" 4 .IX Item "-chardev tty ,id=id ,path=path" Connect to a local tty device. .Sp \&\fBtty\fR is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and DragonFlyBSD hosts. .Sp \&\fBpath\fR specifies the path to the tty. \fBpath\fR is required. .IP "\fB\-chardev parport ,id=\fR\fIid\fR \fB,path=\fR\fIpath\fR" 4 .IX Item "-chardev parport ,id=id ,path=path" \&\fBparport\fR is only available on Linux, FreeBSD and DragonFlyBSD hosts. .Sp Connect to a local parallel port. .Sp \&\fBpath\fR specifies the path to the parallel port device. \fBpath\fR is required. .IP "\fB\-chardev spicevmc ,id=\fR\fIid\fR \fB,debug=\fR\fIdebug\fR\fB, name=\fR\fIname\fR" 4 .IX Item "-chardev spicevmc ,id=id ,debug=debug, name=name" \&\fBspicevmc\fR is only available when spice support is built in. .Sp \&\fBdebug\fR debug level for spicevmc .Sp \&\fBname\fR name of spice channel to connect to .Sp Connect to a spice virtual machine channel, such as vdiport. .PP Device \s-1URL\s0 Syntax: .PP In addition to using normal file images for the emulated storage devices, \&\s-1QEMU\s0 can also use networked resources such as iSCSI devices. These are specified using a special \s-1URL\s0 syntax. .IP "\fBiSCSI\fR" 4 .IX Item "iSCSI" iSCSI support allows \s-1QEMU\s0 to access iSCSI resources directly and use as images for the guest storage. Both disk and cdrom images are supported. .Sp Syntax for specifying iSCSI LUNs is \&\*(L"iscsi://[:]//\*(R" .Sp Example (without authentication): .Sp .Vb 3 \& qemu\-system\-i386 \-iscsi initiator\-name=iqn.2001\-04.com.example:my\-initiator \e \& \-cdrom iscsi://192.0.2.1/iqn.2001\-04.com.example/2 \e \& \-drive file=iscsi://192.0.2.1/iqn.2001\-04.com.example/1 .Ve .Sp Example (\s-1CHAP\s0 username/password via \s-1URL\s0): .Sp .Vb 1 \& qemu\-system\-i386 \-drive file=iscsi://user%password@192.0.2.1/iqn.2001\-04.com.example/1 .Ve .Sp Example (\s-1CHAP\s0 username/password via environment variables): .Sp .Vb 3 \& LIBISCSI_CHAP_USERNAME="user" \e \& LIBISCSI_CHAP_PASSWORD="password" \e \& qemu\-system\-i386 \-drive file=iscsi://192.0.2.1/iqn.2001\-04.com.example/1 .Ve .Sp iSCSI support is an optional feature of \s-1QEMU\s0 and only available when compiled and linked against libiscsi. .IP "\fB\s-1NBD\s0\fR" 4 .IX Item "NBD" \&\s-1QEMU\s0 supports \s-1NBD\s0 (Network Block Devices) both using \s-1TCP\s0 protocol as well as Unix Domain Sockets. .Sp Syntax for specifying a \s-1NBD\s0 device using \s-1TCP\s0 \&\*(L"nbd::[:exportname=]\*(R" .Sp Syntax for specifying a \s-1NBD\s0 device using Unix Domain Sockets \&\*(L"nbd:unix:[:exportname=]\*(R" .Sp Example for \s-1TCP\s0 .Sp .Vb 1 \& qemu\-system\-i386 \-\-drive file=nbd:192.0.2.1:30000 .Ve .Sp Example for Unix Domain Sockets .Sp .Vb 1 \& qemu\-system\-i386 \-\-drive file=nbd:unix:/tmp/nbd\-socket .Ve .IP "\fBSheepdog\fR" 4 .IX Item "Sheepdog" Sheepdog is a distributed storage system for \s-1QEMU\s0. \&\s-1QEMU\s0 supports using either local sheepdog devices or remote networked devices. .Sp Syntax for specifying a sheepdog device .RS 4 .Sp .RS 4 \&\*(L"sheepdog:\*(R" .Sp \&\*(L"sheepdog::\*(R" .Sp \&\*(L"sheepdog::\*(R" .Sp \&\*(L"sheepdog:::\*(R" .Sp \&\*(L"sheepdog::::\*(R" .Sp \&\*(L"sheepdog::::\*(R" .RE .RE .RS 4 .Sp Example .Sp .Vb 1 \& qemu\-system\-i386 \-\-drive file=sheepdog:192.0.2.1:30000:MyVirtualMachine .Ve .Sp See also <\fBhttp://http://www.osrg.net/sheepdog/\fR>. .RE .PP Bluetooth(R) options: .IP "\fB\-bt hci[...]\fR" 4 .IX Item "-bt hci[...]" Defines the function of the corresponding Bluetooth \s-1HCI\s0. \-bt options are matched with the HCIs present in the chosen machine type. For example when emulating a machine with only one \s-1HCI\s0 built into it, only the first \f(CW\*(C`\-bt hci[...]\*(C'\fR option is valid and defines the \s-1HCI\s0's logic. The Transport Layer is decided by the machine type. Currently the machines \f(CW\*(C`n800\*(C'\fR and \f(CW\*(C`n810\*(C'\fR have one \s-1HCI\s0 and all other machines have none. .Sp The following three types are recognized: .RS 4 .IP "\fB\-bt hci,null\fR" 4 .IX Item "-bt hci,null" (default) The corresponding Bluetooth \s-1HCI\s0 assumes no internal logic and will not respond to any \s-1HCI\s0 commands or emit events. .IP "\fB\-bt hci,host[:\fR\fIid\fR\fB]\fR" 4 .IX Item "-bt hci,host[:id]" (\f(CW\*(C`bluez\*(C'\fR only) The corresponding \s-1HCI\s0 passes commands / events to / from the physical \s-1HCI\s0 identified by the name \fIid\fR (default: \&\f(CW\*(C`hci0\*(C'\fR) on the computer running \s-1QEMU\s0. Only available on \f(CW\*(C`bluez\*(C'\fR capable systems like Linux. .IP "\fB\-bt hci[,vlan=\fR\fIn\fR\fB]\fR" 4 .IX Item "-bt hci[,vlan=n]" Add a virtual, standard \s-1HCI\s0 that will participate in the Bluetooth scatternet \fIn\fR (default \f(CW0\fR). Similarly to \fB\-net\fR VLANs, devices inside a bluetooth network \fIn\fR can only communicate with other devices in the same network (scatternet). .RE .RS 4 .RE .IP "\fB\-bt vhci[,vlan=\fR\fIn\fR\fB]\fR" 4 .IX Item "-bt vhci[,vlan=n]" (Linux-host only) Create a \s-1HCI\s0 in scatternet \fIn\fR (default 0) attached to the host bluetooth stack instead of to the emulated target. This allows the host and target machines to participate in a common scatternet and communicate. Requires the Linux \f(CW\*(C`vhci\*(C'\fR driver installed. Can be used as following: .Sp .Vb 1 \& qemu\-system\-i386 [...OPTIONS...] \-bt hci,vlan=5 \-bt vhci,vlan=5 .Ve .IP "\fB\-bt device:\fR\fIdev\fR\fB[,vlan=\fR\fIn\fR\fB]\fR" 4 .IX Item "-bt device:dev[,vlan=n]" Emulate a bluetooth device \fIdev\fR and place it in network \fIn\fR (default \f(CW0\fR). \s-1QEMU\s0 can only emulate one type of bluetooth devices currently: .RS 4 .IP "\fBkeyboard\fR" 4 .IX Item "keyboard" Virtual wireless keyboard implementing the \s-1HIDP\s0 bluetooth profile. .RE .RS 4 .RE .PP Linux/Multiboot boot specific: .PP When using these options, you can use a given Linux or Multiboot kernel without installing it in the disk image. It can be useful for easier testing of various kernels. .IP "\fB\-kernel\fR \fIbzImage\fR" 4 .IX Item "-kernel bzImage" Use \fIbzImage\fR as kernel image. The kernel can be either a Linux kernel or in multiboot format. .IP "\fB\-append\fR \fIcmdline\fR" 4 .IX Item "-append cmdline" Use \fIcmdline\fR as kernel command line .IP "\fB\-initrd\fR \fIfile\fR" 4 .IX Item "-initrd file" Use \fIfile\fR as initial ram disk. .ie n .IP "\fB\-initrd ""\fR\fIfile1\fR \fBarg=foo,\fR\fIfile2\fR\fB""\fR" 4 .el .IP "\fB\-initrd ``\fR\fIfile1\fR \fBarg=foo,\fR\fIfile2\fR\fB''\fR" 4 .IX Item "-initrd ""file1 arg=foo,file2""" This syntax is only available with multiboot. .Sp Use \fIfile1\fR and \fIfile2\fR as modules and pass arg=foo as parameter to the first module. .IP "\fB\-dtb\fR \fIfile\fR" 4 .IX Item "-dtb file" Use \fIfile\fR as a device tree binary (dtb) image and pass it to the kernel on boot. .PP Debug/Expert options: .IP "\fB\-serial\fR \fIdev\fR" 4 .IX Item "-serial dev" Redirect the virtual serial port to host character device \&\fIdev\fR. The default device is \f(CW\*(C`vc\*(C'\fR in graphical mode and \&\f(CW\*(C`stdio\*(C'\fR in non graphical mode. .Sp This option can be used several times to simulate up to 4 serial ports. .Sp Use \f(CW\*(C`\-serial none\*(C'\fR to disable all serial ports. .Sp Available character devices are: .RS 4 .IP "\fBvc[:\fR\fIW\fR\fBx\fR\fIH\fR\fB]\fR" 4 .IX Item "vc[:WxH]" Virtual console. Optionally, a width and height can be given in pixel with .Sp .Vb 1 \& vc:800x600 .Ve .Sp It is also possible to specify width or height in characters: .Sp .Vb 1 \& vc:80Cx24C .Ve .IP "\fBpty\fR" 4 .IX Item "pty" [Linux only] Pseudo \s-1TTY\s0 (a new \s-1PTY\s0 is automatically allocated) .IP "\fBnone\fR" 4 .IX Item "none" No device is allocated. .IP "\fBnull\fR" 4 .IX Item "null" void device .IP "\fB/dev/XXX\fR" 4 .IX Item "/dev/XXX" [Linux only] Use host tty, e.g. \fI/dev/ttyS0\fR. The host serial port parameters are set according to the emulated ones. .IP "\fB/dev/parport\fR\fIN\fR" 4 .IX Item "/dev/parportN" [Linux only, parallel port only] Use host parallel port \&\fIN\fR. Currently \s-1SPP\s0 and \s-1EPP\s0 parallel port features can be used. .IP "\fBfile:\fR\fIfilename\fR" 4 .IX Item "file:filename" Write output to \fIfilename\fR. No character can be read. .IP "\fBstdio\fR" 4 .IX Item "stdio" [Unix only] standard input/output .IP "\fBpipe:\fR\fIfilename\fR" 4 .IX Item "pipe:filename" name pipe \fIfilename\fR .IP "\fB\s-1COM\s0\fR\fIn\fR" 4 .IX Item "COMn" [Windows only] Use host serial port \fIn\fR .IP "\fBudp:[\fR\fIremote_host\fR\fB]:\fR\fIremote_port\fR\fB[@[\fR\fIsrc_ip\fR\fB]:\fR\fIsrc_port\fR\fB]\fR" 4 .IX Item "udp:[remote_host]:remote_port[@[src_ip]:src_port]" This implements \s-1UDP\s0 Net Console. When \fIremote_host\fR or \fIsrc_ip\fR are not specified they default to \f(CW0.0.0.0\fR. When not using a specified \fIsrc_port\fR a random port is automatically chosen. .Sp If you just want a simple readonly console you can use \f(CW\*(C`netcat\*(C'\fR or \&\f(CW\*(C`nc\*(C'\fR, by starting \s-1QEMU\s0 with: \f(CW\*(C`\-serial udp::4555\*(C'\fR and nc as: \&\f(CW\*(C`nc \-u \-l \-p 4555\*(C'\fR. Any time \s-1QEMU\s0 writes something to that port it will appear in the netconsole session. .Sp If you plan to send characters back via netconsole or you want to stop and start \s-1QEMU\s0 a lot of times, you should have \s-1QEMU\s0 use the same source port each time by using something like \f(CW\*(C`\-serial udp::4555@4556\*(C'\fR to \s-1QEMU\s0. Another approach is to use a patched version of netcat which can listen to a \s-1TCP\s0 port and send and receive characters via udp. If you have a patched version of netcat which activates telnet remote echo and single char transfer, then you can use the following options to step up a netcat redirector to allow telnet on port 5555 to access the \s-1QEMU\s0 port. .RS 4 .ie n .IP """QEMU Options:""" 4 .el .IP "\f(CWQEMU Options:\fR" 4 .IX Item "QEMU Options:" \&\-serial udp::4555@4556 .ie n .IP """netcat options:""" 4 .el .IP "\f(CWnetcat options:\fR" 4 .IX Item "netcat options:" \&\-u \-P 4555 \-L 0.0.0.0:4556 \-t \-p 5555 \-I \-T .ie n .IP """telnet options:""" 4 .el .IP "\f(CWtelnet options:\fR" 4 .IX Item "telnet options:" localhost 5555 .RE .RS 4 .RE .IP "\fBtcp:[\fR\fIhost\fR\fB]:\fR\fIport\fR\fB[,\fR\fIserver\fR\fB][,nowait][,nodelay]\fR" 4 .IX Item "tcp:[host]:port[,server][,nowait][,nodelay]" The \s-1TCP\s0 Net Console has two modes of operation. It can send the serial I/O to a location or wait for a connection from a location. By default the \s-1TCP\s0 Net Console is sent to \fIhost\fR at the \fIport\fR. If you use the \fIserver\fR option \s-1QEMU\s0 will wait for a client socket application to connect to the port before continuing, unless the \f(CW\*(C`nowait\*(C'\fR option was specified. The \f(CW\*(C`nodelay\*(C'\fR option disables the Nagle buffering algorithm. If \fIhost\fR is omitted, 0.0.0.0 is assumed. Only one \s-1TCP\s0 connection at a time is accepted. You can use \f(CW\*(C`telnet\*(C'\fR to connect to the corresponding character device. .RS 4 .ie n .IP """Example to send tcp console to 192.168.0.2 port 4444""" 4 .el .IP "\f(CWExample to send tcp console to 192.168.0.2 port 4444\fR" 4 .IX Item "Example to send tcp console to 192.168.0.2 port 4444" \&\-serial tcp:192.168.0.2:4444 .ie n .IP """Example to listen and wait on port 4444 for connection""" 4 .el .IP "\f(CWExample to listen and wait on port 4444 for connection\fR" 4 .IX Item "Example to listen and wait on port 4444 for connection" \&\-serial tcp::4444,server .ie n .IP """Example to not wait and listen on ip 192.168.0.100 port 4444""" 4 .el .IP "\f(CWExample to not wait and listen on ip 192.168.0.100 port 4444\fR" 4 .IX Item "Example to not wait and listen on ip 192.168.0.100 port 4444" \&\-serial tcp:192.168.0.100:4444,server,nowait .RE .RS 4 .RE .IP "\fBtelnet:\fR\fIhost\fR\fB:\fR\fIport\fR\fB[,server][,nowait][,nodelay]\fR" 4 .IX Item "telnet:host:port[,server][,nowait][,nodelay]" The telnet protocol is used instead of raw tcp sockets. The options work the same as if you had specified \f(CW\*(C`\-serial tcp\*(C'\fR. The difference is that the port acts like a telnet server or client using telnet option negotiation. This will also allow you to send the \&\s-1MAGIC_SYSRQ\s0 sequence if you use a telnet that supports sending the break sequence. Typically in unix telnet you do it with Control\-] and then type \*(L"send break\*(R" followed by pressing the enter key. .IP "\fBunix:\fR\fIpath\fR\fB[,server][,nowait]\fR" 4 .IX Item "unix:path[,server][,nowait]" A unix domain socket is used instead of a tcp socket. The option works the same as if you had specified \f(CW\*(C`\-serial tcp\*(C'\fR except the unix domain socket \&\fIpath\fR is used for connections. .IP "\fBmon:\fR\fIdev_string\fR" 4 .IX Item "mon:dev_string" This is a special option to allow the monitor to be multiplexed onto another serial port. The monitor is accessed with key sequence of \&\fBControl-a\fR and then pressing \fBc\fR. See monitor access \&\fBpcsys_keys\fR in the \-nographic section for more keys. \&\fIdev_string\fR should be any one of the serial devices specified above. An example to multiplex the monitor onto a telnet server listening on port 4444 would be: .RS 4 .ie n .IP """\-serial mon:telnet::4444,server,nowait""" 4 .el .IP "\f(CW\-serial mon:telnet::4444,server,nowait\fR" 4 .IX Item "-serial mon:telnet::4444,server,nowait" .RE .RS 4 .RE .PD 0 .IP "\fBbraille\fR" 4 .IX Item "braille" .PD Braille device. This will use BrlAPI to display the braille output on a real or fake device. .IP "\fBmsmouse\fR" 4 .IX Item "msmouse" Three button serial mouse. Configure the guest to use Microsoft protocol. .RE .RS 4 .RE .IP "\fB\-parallel\fR \fIdev\fR" 4 .IX Item "-parallel dev" Redirect the virtual parallel port to host device \fIdev\fR (same devices as the serial port). On Linux hosts, \fI/dev/parportN\fR can be used to use hardware devices connected on the corresponding host parallel port. .Sp This option can be used several times to simulate up to 3 parallel ports. .Sp Use \f(CW\*(C`\-parallel none\*(C'\fR to disable all parallel ports. .IP "\fB\-monitor\fR \fIdev\fR" 4 .IX Item "-monitor dev" Redirect the monitor to host device \fIdev\fR (same devices as the serial port). The default device is \f(CW\*(C`vc\*(C'\fR in graphical mode and \f(CW\*(C`stdio\*(C'\fR in non graphical mode. .IP "\fB\-qmp\fR \fIdev\fR" 4 .IX Item "-qmp dev" Like \-monitor but opens in 'control' mode. .IP "\fB\-mon chardev=[name][,mode=readline|control][,default]\fR" 4 .IX Item "-mon chardev=[name][,mode=readline|control][,default]" Setup monitor on chardev \fIname\fR. .IP "\fB\-debugcon\fR \fIdev\fR" 4 .IX Item "-debugcon dev" Redirect the debug console to host device \fIdev\fR (same devices as the serial port). The debug console is an I/O port which is typically port 0xe9; writing to that I/O port sends output to this device. The default device is \f(CW\*(C`vc\*(C'\fR in graphical mode and \f(CW\*(C`stdio\*(C'\fR in non graphical mode. .IP "\fB\-pidfile\fR \fIfile\fR" 4 .IX Item "-pidfile file" Store the \s-1QEMU\s0 process \s-1PID\s0 in \fIfile\fR. It is useful if you launch \s-1QEMU\s0 from a script. .IP "\fB\-singlestep\fR" 4 .IX Item "-singlestep" Run the emulation in single step mode. .IP "\fB\-S\fR" 4 .IX Item "-S" Do not start \s-1CPU\s0 at startup (you must type 'c' in the monitor). .IP "\fB\-gdb\fR \fIdev\fR" 4 .IX Item "-gdb dev" Wait for gdb connection on device \fIdev\fR. Typical connections will likely be TCP-based, but also \s-1UDP\s0, pseudo \s-1TTY\s0, or even stdio are reasonable use case. The latter is allowing to start \s-1QEMU\s0 from within gdb and establish the connection via a pipe: .Sp .Vb 1 \& (gdb) target remote | exec qemu\-system\-i386 \-gdb stdio ... .Ve .IP "\fB\-s\fR" 4 .IX Item "-s" Shorthand for \-gdb tcp::1234, i.e. open a gdbserver on \s-1TCP\s0 port 1234. .IP "\fB\-d\fR" 4 .IX Item "-d" Output log in /tmp/qemu.log .IP "\fB\-D\fR \fIlogfile\fR" 4 .IX Item "-D logfile" Output log in \fIlogfile\fR instead of /tmp/qemu.log .IP "\fB\-hdachs\fR \fIc\fR\fB,\fR\fIh\fR\fB,\fR\fIs\fR\fB,[,\fR\fIt\fR\fB]\fR" 4 .IX Item "-hdachs c,h,s,[,t]" Force hard disk 0 physical geometry (1 <= \fIc\fR <= 16383, 1 <= \&\fIh\fR <= 16, 1 <= \fIs\fR <= 63) and optionally force the \s-1BIOS\s0 translation mode (\fIt\fR=none, lba or auto). Usually \s-1QEMU\s0 can guess all those parameters. This option is useful for old MS-DOS disk images. .IP "\fB\-L\fR \fIpath\fR" 4 .IX Item "-L path" Set the directory for the \s-1BIOS\s0, \s-1VGA\s0 \s-1BIOS\s0 and keymaps. .IP "\fB\-bios\fR \fIfile\fR" 4 .IX Item "-bios file" Set the filename for the \s-1BIOS\s0. .IP "\fB\-enable\-kvm\fR" 4 .IX Item "-enable-kvm" Enable \s-1KVM\s0 full virtualization support. This option is only available if \s-1KVM\s0 support is enabled when compiling. .IP "\fB\-xen\-domid\fR \fIid\fR" 4 .IX Item "-xen-domid id" Specify xen guest domain \fIid\fR (\s-1XEN\s0 only). .IP "\fB\-xen\-create\fR" 4 .IX Item "-xen-create" Create domain using xen hypercalls, bypassing xend. Warning: should not be used when xend is in use (\s-1XEN\s0 only). .IP "\fB\-xen\-attach\fR" 4 .IX Item "-xen-attach" Attach to existing xen domain. xend will use this when starting \s-1QEMU\s0 (\s-1XEN\s0 only). .IP "\fB\-no\-reboot\fR" 4 .IX Item "-no-reboot" Exit instead of rebooting. .IP "\fB\-no\-shutdown\fR" 4 .IX Item "-no-shutdown" Don't exit \s-1QEMU\s0 on guest shutdown, but instead only stop the emulation. This allows for instance switching to monitor to commit changes to the disk image. .IP "\fB\-loadvm\fR \fIfile\fR" 4 .IX Item "-loadvm file" Start right away with a saved state (\f(CW\*(C`loadvm\*(C'\fR in monitor) .IP "\fB\-daemonize\fR" 4 .IX Item "-daemonize" Daemonize the \s-1QEMU\s0 process after initialization. \s-1QEMU\s0 will not detach from standard \s-1IO\s0 until it is ready to receive connections on any of its devices. This option is a useful way for external programs to launch \s-1QEMU\s0 without having to cope with initialization race conditions. .IP "\fB\-option\-rom\fR \fIfile\fR" 4 .IX Item "-option-rom file" Load the contents of \fIfile\fR as an option \s-1ROM\s0. This option is useful to load things like EtherBoot. .IP "\fB\-clock\fR \fImethod\fR" 4 .IX Item "-clock method" Force the use of the given methods for timer alarm. To see what timers are available use \-clock ?. .IP "\fB\-rtc [base=utc|localtime|\fR\fIdate\fR\fB][,clock=host|vm][,driftfix=none|slew]\fR" 4 .IX Item "-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]" Specify \fBbase\fR as \f(CW\*(C`utc\*(C'\fR or \f(CW\*(C`localtime\*(C'\fR to let the \s-1RTC\s0 start at the current \&\s-1UTC\s0 or local time, respectively. \f(CW\*(C`localtime\*(C'\fR is required for correct date in MS-DOS or Windows. To start at a specific point in time, provide \fIdate\fR in the format \f(CW\*(C`2006\-06\-17T16:01:21\*(C'\fR or \f(CW\*(C`2006\-06\-17\*(C'\fR. The default base is \s-1UTC\s0. .Sp By default the \s-1RTC\s0 is driven by the host system time. This allows to use the \&\s-1RTC\s0 as accurate reference clock inside the guest, specifically if the host time is smoothly following an accurate external reference clock, e.g. via \s-1NTP\s0. If you want to isolate the guest time from the host, you can set \fBclock\fR to \f(CW\*(C`rt\*(C'\fR instead. To even prevent it from progressing during suspension, you can set it to \f(CW\*(C`vm\*(C'\fR. .Sp Enable \fBdriftfix\fR (i386 targets only) if you experience time drift problems, specifically with Windows' \s-1ACPI\s0 \s-1HAL\s0. This option will try to figure out how many timer interrupts were not processed by the Windows guest and will re-inject them. .IP "\fB\-icount [\fR\fIN\fR\fB|auto]\fR" 4 .IX Item "-icount [N|auto]" Enable virtual instruction counter. The virtual cpu will execute one instruction every 2^\fIN\fR ns of virtual time. If \f(CW\*(C`auto\*(C'\fR is specified then the virtual cpu speed will be automatically adjusted to keep virtual time within a few seconds of real time. .Sp Note that while this option can give deterministic behavior, it does not provide cycle accurate emulation. Modern CPUs contain superscalar out of order cores with complex cache hierarchies. The number of instructions executed often has little or no correlation with actual performance. .IP "\fB\-watchdog\fR \fImodel\fR" 4 .IX Item "-watchdog model" Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the guest will be restarted. .Sp The \fImodel\fR is the model of hardware watchdog to emulate. Choices for model are: \f(CW\*(C`ib700\*(C'\fR (iBASE 700) which is a very simple \s-1ISA\s0 watchdog with a single timer, or \f(CW\*(C`i6300esb\*(C'\fR (Intel 6300ESB I/O controller hub) which is a much more featureful PCI-based dual-timer watchdog. Choose a model for which your guest has drivers. .Sp Use \f(CW\*(C`\-watchdog ?\*(C'\fR to list available hardware models. Only one watchdog can be enabled for a guest. .IP "\fB\-watchdog\-action\fR \fIaction\fR" 4 .IX Item "-watchdog-action action" The \fIaction\fR controls what \s-1QEMU\s0 will do when the watchdog timer expires. The default is \&\f(CW\*(C`reset\*(C'\fR (forcefully reset the guest). Other possible actions are: \&\f(CW\*(C`shutdown\*(C'\fR (attempt to gracefully shutdown the guest), \&\f(CW\*(C`poweroff\*(C'\fR (forcefully poweroff the guest), \&\f(CW\*(C`pause\*(C'\fR (pause the guest), \&\f(CW\*(C`debug\*(C'\fR (print a debug message and continue), or \&\f(CW\*(C`none\*(C'\fR (do nothing). .Sp Note that the \f(CW\*(C`shutdown\*(C'\fR action requires that the guest responds to \s-1ACPI\s0 signals, which it may not be able to do in the sort of situations where the watchdog would have expired, and thus \&\f(CW\*(C`\-watchdog\-action shutdown\*(C'\fR is not recommended for production use. .Sp Examples: .RS 4 .ie n .IP """\-watchdog i6300esb \-watchdog\-action pause""" 4 .el .IP "\f(CW\-watchdog i6300esb \-watchdog\-action pause\fR" 4 .IX Item "-watchdog i6300esb -watchdog-action pause" .PD 0 .ie n .IP """\-watchdog ib700""" 4 .el .IP "\f(CW\-watchdog ib700\fR" 4 .IX Item "-watchdog ib700" .RE .RS 4 .RE .IP "\fB\-echr\fR \fInumeric_ascii_value\fR" 4 .IX Item "-echr numeric_ascii_value" .PD Change the escape character used for switching to the monitor when using monitor and serial sharing. The default is \f(CW0x01\fR when using the \&\f(CW\*(C`\-nographic\*(C'\fR option. \f(CW0x01\fR is equal to pressing \&\f(CW\*(C`Control\-a\*(C'\fR. You can select a different character from the ascii control keys where 1 through 26 map to Control-a through Control-z. For instance you could use the either of the following to change the escape character to Control-t. .RS 4 .ie n .IP """\-echr 0x14""" 4 .el .IP "\f(CW\-echr 0x14\fR" 4 .IX Item "-echr 0x14" .PD 0 .ie n .IP """\-echr 20""" 4 .el .IP "\f(CW\-echr 20\fR" 4 .IX Item "-echr 20" .RE .RS 4 .RE .IP "\fB\-virtioconsole\fR \fIc\fR" 4 .IX Item "-virtioconsole c" .PD Set virtio console. .Sp This option is maintained for backward compatibility. .Sp Please use \f(CW\*(C`\-device virtconsole\*(C'\fR for the new way of invocation. .IP "\fB\-show\-cursor\fR" 4 .IX Item "-show-cursor" Show cursor. .IP "\fB\-tb\-size\fR \fIn\fR" 4 .IX Item "-tb-size n" Set \s-1TB\s0 size. .IP "\fB\-incoming\fR \fIport\fR" 4 .IX Item "-incoming port" Prepare for incoming migration, listen on \fIport\fR. .IP "\fB\-nodefaults\fR" 4 .IX Item "-nodefaults" Don't create default devices. .IP "\fB\-chroot\fR \fIdir\fR" 4 .IX Item "-chroot dir" Immediately before starting guest execution, chroot to the specified directory. Especially useful in combination with \-runas. .IP "\fB\-runas\fR \fIuser\fR" 4 .IX Item "-runas user" Immediately before starting guest execution, drop root privileges, switching to the specified user. .IP "\fB\-prom\-env\fR \fIvariable\fR\fB=\fR\fIvalue\fR" 4 .IX Item "-prom-env variable=value" Set OpenBIOS nvram \fIvariable\fR to given \fIvalue\fR (\s-1PPC\s0, \s-1SPARC\s0 only). .IP "\fB\-semihosting\fR" 4 .IX Item "-semihosting" Semihosting mode (\s-1ARM\s0, M68K, Xtensa only). .IP "\fB\-old\-param\fR" 4 .IX Item "-old-param" Old param mode (\s-1ARM\s0 only). .IP "\fB\-readconfig\fR \fIfile\fR" 4 .IX Item "-readconfig file" Read device configuration from \fIfile\fR. .IP "\fB\-writeconfig\fR \fIfile\fR" 4 .IX Item "-writeconfig file" Write device configuration to \fIfile\fR. .IP "\fB\-nodefconfig\fR" 4 .IX Item "-nodefconfig" Normally \s-1QEMU\s0 loads configuration files from \fIsysconfdir\fR and \fIdatadir\fR at startup. The \f(CW\*(C`\-nodefconfig\*(C'\fR option will prevent \s-1QEMU\s0 from loading any of those config files. .IP "\fB\-no\-user\-config\fR" 4 .IX Item "-no-user-config" The \f(CW\*(C`\-no\-user\-config\*(C'\fR option makes \s-1QEMU\s0 not load any of the user-provided config files on \fIsysconfdir\fR, but won't make it skip the QEMU-provided config files from \fIdatadir\fR. .IP "\fB\-trace [events=\fR\fIfile\fR\fB][,file=\fR\fIfile\fR\fB]\fR" 4 .IX Item "-trace [events=file][,file=file]" Specify tracing options. .RS 4 .IP "\fBevents=\fR\fIfile\fR" 4 .IX Item "events=file" Immediately enable events listed in \fIfile\fR. The file must contain one event name (as listed in the \fItrace-events\fR file) per line. This option is only available if \s-1QEMU\s0 has been compiled with either \fIsimple\fR or \fIstderr\fR tracing backend. .IP "\fBfile=\fR\fIfile\fR" 4 .IX Item "file=file" Log output traces to \fIfile\fR. .Sp This option is only available if \s-1QEMU\s0 has been compiled with the \fIsimple\fR tracing backend. .RE .RS 4 .RE .PP During the graphical emulation, you can use special key combinations to change modes. The default key mappings are shown below, but if you use \f(CW\*(C`\-alt\-grab\*(C'\fR then the modifier is Ctrl-Alt-Shift (instead of Ctrl-Alt) and if you use \&\f(CW\*(C`\-ctrl\-grab\*(C'\fR then the modifier is the right Ctrl key (instead of Ctrl-Alt): .IP "\fBCtrl-Alt-f\fR" 4 .IX Item "Ctrl-Alt-f" Toggle full screen .IP "\fBCtrl\-Alt\-+\fR" 4 .IX Item "Ctrl-Alt-+" Enlarge the screen .IP "\fBCtrl\-Alt\*(--\fR" 4 .IX Item "Ctrl-Alt" Shrink the screen .IP "\fBCtrl-Alt-u\fR" 4 .IX Item "Ctrl-Alt-u" Restore the screen's un-scaled dimensions .IP "\fBCtrl-Alt-n\fR" 4 .IX Item "Ctrl-Alt-n" Switch to virtual console 'n'. Standard console mappings are: .RS 4 .IP "\fI1\fR" 4 .IX Item "1" Target system display .IP "\fI2\fR" 4 .IX Item "2" Monitor .IP "\fI3\fR" 4 .IX Item "3" Serial port .RE .RS 4 .RE .IP "\fBCtrl-Alt\fR" 4 .IX Item "Ctrl-Alt" Toggle mouse and keyboard grab. .PP In the virtual consoles, you can use \fBCtrl-Up\fR, \fBCtrl-Down\fR, \&\fBCtrl-PageUp\fR and \fBCtrl-PageDown\fR to move in the back log. .PP During emulation, if you are using the \fB\-nographic\fR option, use \&\fBCtrl-a h\fR to get terminal commands: .IP "\fBCtrl-a h\fR" 4 .IX Item "Ctrl-a h" .PD 0 .IP "\fBCtrl-a ?\fR" 4 .IX Item "Ctrl-a ?" .PD Print this help .IP "\fBCtrl-a x\fR" 4 .IX Item "Ctrl-a x" Exit emulator .IP "\fBCtrl-a s\fR" 4 .IX Item "Ctrl-a s" Save disk data back to file (if \-snapshot) .IP "\fBCtrl-a t\fR" 4 .IX Item "Ctrl-a t" Toggle console timestamps .IP "\fBCtrl-a b\fR" 4 .IX Item "Ctrl-a b" Send break (magic sysrq in Linux) .IP "\fBCtrl-a c\fR" 4 .IX Item "Ctrl-a c" Switch between console and monitor .IP "\fBCtrl-a Ctrl-a\fR" 4 .IX Item "Ctrl-a Ctrl-a" Send Ctrl-a .PP The following options are specific to the PowerPC emulation: .IP "\fB\-g\fR \fIW\fR\fBx\fR\fIH\fR\fB[x\fR\fI\s-1DEPTH\s0\fR\fB]\fR" 4 .IX Item "-g WxH[xDEPTH]" Set the initial \s-1VGA\s0 graphic mode. The default is 800x600x15. .IP "\fB\-prom\-env\fR \fIstring\fR" 4 .IX Item "-prom-env string" Set OpenBIOS variables in \s-1NVRAM\s0, for example: .Sp .Vb 3 \& qemu\-system\-ppc \-prom\-env \*(Aqauto\-boot?=false\*(Aq \e \& \-prom\-env \*(Aqboot\-device=hd:2,\eyaboot\*(Aq \e \& \-prom\-env \*(Aqboot\-args=conf=hd:2,\eyaboot.conf\*(Aq .Ve .Sp These variables are not used by Open Hack'Ware. .PP The following options are specific to the Sparc32 emulation: .IP "\fB\-g\fR \fIW\fR\fBx\fR\fIH\fR\fBx[x\fR\fI\s-1DEPTH\s0\fR\fB]\fR" 4 .IX Item "-g WxHx[xDEPTH]" Set the initial \s-1TCX\s0 graphic mode. The default is 1024x768x8, currently the only other possible mode is 1024x768x24. .IP "\fB\-prom\-env\fR \fIstring\fR" 4 .IX Item "-prom-env string" Set OpenBIOS variables in \s-1NVRAM\s0, for example: .Sp .Vb 2 \& qemu\-system\-sparc \-prom\-env \*(Aqauto\-boot?=false\*(Aq \e \& \-prom\-env \*(Aqboot\-device=sd(0,2,0):d\*(Aq \-prom\-env \*(Aqboot\-args=linux single\*(Aq .Ve .IP "\fB\-M [SS\-4|SS\-5|SS\-10|SS\-20|SS\-600MP|LX|Voyager|SPARCClassic] [|SPARCbook|SS\-2|SS\-1000|SS\-2000]\fR" 4 .IX Item "-M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic] [|SPARCbook|SS-2|SS-1000|SS-2000]" Set the emulated machine type. Default is \s-1SS\-5\s0. .PP The following options are specific to the Sparc64 emulation: .IP "\fB\-prom\-env\fR \fIstring\fR" 4 .IX Item "-prom-env string" Set OpenBIOS variables in \s-1NVRAM\s0, for example: .Sp .Vb 1 \& qemu\-system\-sparc64 \-prom\-env \*(Aqauto\-boot?=false\*(Aq .Ve .IP "\fB\-M [sun4u|sun4v|Niagara]\fR" 4 .IX Item "-M [sun4u|sun4v|Niagara]" Set the emulated machine type. The default is sun4u. .SH "SEE ALSO" .IX Header "SEE ALSO" The \s-1HTML\s0 documentation of \s-1QEMU\s0 for more precise information and Linux user mode emulator invocation. .SH "AUTHOR" .IX Header "AUTHOR" Fabrice Bellard