1QEMU(1) QEMU(1)
2
3
4
6 qemu-doc - QEMU Emulator User Documentation
7
9 usage: qemu [options] [disk_image]
10
12 The QEMU PC System emulator simulates the following peripherals:
13
14 - i440FX host PCI bridge and PIIX3 PCI to ISA bridge
15
16 - Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA
17 extensions (hardware level, including all non standard modes).
18
19 - PS/2 mouse and keyboard
20
21 - 2 PCI IDE interfaces with hard disk and CD-ROM support
22
23 - Floppy disk
24
25 - PCI and ISA network adapters
26
27 - Serial ports
28
29 - Creative SoundBlaster 16 sound card
30
31 - ENSONIQ AudioPCI ES1370 sound card
32
33 - Intel 82801AA AC97 Audio compatible sound card
34
35 - Adlib(OPL2) - Yamaha YM3812 compatible chip
36
37 - Gravis Ultrasound GF1 sound card
38
39 - CS4231A compatible sound card
40
41 - PCI UHCI USB controller and a virtual USB hub.
42
43 SMP is supported with up to 255 CPUs.
44
45 Note that adlib, gus and cs4231a are only available when QEMU was
46 configured with --audio-card-list option containing the name(s) of
47 required card(s).
48
49 QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
50 VGA BIOS.
51
52 QEMU uses YM3812 emulation by Tatsuyuki Satoh.
53
54 QEMU uses GUS emulation(GUSEMU32 <http://www.deinmeister.de/gusemu/>)
55 by Tibor "TS" SchA~Xtz.
56
57 Not that, by default, GUS shares IRQ(7) with parallel ports and so qemu
58 must be told to not have parallel ports to have working GUS
59
60 qemu dos.img -soundhw gus -parallel none
61
62 Alternatively:
63
64 qemu dos.img -device gus,irq=5
65
66 Or some other unclaimed IRQ.
67
68 CS4231A is the chip used in Windows Sound System and GUSMAX products
69
71 disk_image is a raw hard disk image for IDE hard disk 0. Some targets
72 do not need a disk image.
73
74 Standard options:
75
76 -h Display help and exit
77
78 -version
79 Display version information and exit
80
81 -M machine
82 Select the emulated machine ("-M ?" for list)
83
84 -cpu model
85 Select CPU model (-cpu ? for list and additional feature selection)
86
87 -smp
88 n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]
89 Simulate an SMP system with n CPUs. On the PC target, up to 255
90 CPUs are supported. On Sparc32 target, Linux limits the number of
91 usable CPUs to 4. For the PC target, the number of cores per
92 socket, the number of threads per cores and the total number of
93 sockets can be specified. Missing values will be computed. If any
94 on the three values is given, the total number of CPUs n can be
95 omitted. maxcpus specifies the maximum number of hotpluggable CPUs.
96
97 -numa opts
98 Simulate a multi node NUMA system. If mem and cpus are omitted,
99 resources are split equally.
100
101 -fda file
102 -fdb file
103 Use file as floppy disk 0/1 image. You can use the host floppy by
104 using /dev/fd0 as filename.
105
106 -hda file
107 -hdb file
108 -hdc file
109 -hdd file
110 Use file as hard disk 0, 1, 2 or 3 image.
111
112 -cdrom file
113 Use file as CD-ROM image (you cannot use -hdc and -cdrom at the
114 same time). You can use the host CD-ROM by using /dev/cdrom as
115 filename.
116
117 -drive option[,option[,option[,...]]]
118 Define a new drive. Valid options are:
119
120 file=file
121 This option defines which disk image to use with this drive. If
122 the filename contains comma, you must double it (for instance,
123 "file=my,,file" to use file "my,file").
124
125 if=interface
126 This option defines on which type on interface the drive is
127 connected. Available types are: ide, scsi, sd, mtd, floppy,
128 pflash, virtio.
129
130 bus=bus,unit=unit
131 These options define where is connected the drive by defining
132 the bus number and the unit id.
133
134 index=index
135 This option defines where is connected the drive by using an
136 index in the list of available connectors of a given interface
137 type.
138
139 media=media
140 This option defines the type of the media: disk or cdrom.
141
142 cyls=c,heads=h,secs=s[,trans=t]
143 These options have the same definition as they have in -hdachs.
144
145 snapshot=snapshot
146 snapshot is "on" or "off" and allows to enable snapshot for
147 given drive (see -snapshot).
148
149 cache=cache
150 cache is "none", "writeback", "unsafe", or "writethrough" and
151 controls how the host cache is used to access block data.
152
153 aio=aio
154 aio is "threads", or "native" and selects between pthread based
155 disk I/O and native Linux AIO.
156
157 format=format
158 Specify which disk format will be used rather than detecting
159 the format. Can be used to specifiy format=raw to avoid
160 interpreting an untrusted format header.
161
162 serial=serial
163 This option specifies the serial number to assign to the
164 device.
165
166 addr=addr
167 Specify the controller's PCI address (if=virtio only).
168
169 boot=boot
170 boot is "on" or "off" and allows for booting from non-
171 traditional interfaces, such as virtio.
172
173 By default, writethrough caching is used for all block device.
174 This means that the host page cache will be used to read and write
175 data but write notification will be sent to the guest only when the
176 data has been reported as written by the storage subsystem.
177
178 Writeback caching will report data writes as completed as soon as
179 the data is present in the host page cache. This is safe as long
180 as you trust your host. If your host crashes or loses power, then
181 the guest may experience data corruption.
182
183 The host page cache can be avoided entirely with cache=none. This
184 will attempt to do disk IO directly to the guests memory. QEMU may
185 still perform an internal copy of the data.
186
187 Some block drivers perform badly with cache=writethrough, most
188 notably, qcow2. If performance is more important than correctness,
189 cache=writeback should be used with qcow2.
190
191 In case you don't care about data integrity over host failures, use
192 cache=unsafe. This option tells qemu that it never needs to write
193 any data to the disk but can instead keeps things in cache. If
194 anything goes wrong, like your host losing power, the disk storage
195 getting disconnected accidently, etc. you're image will most
196 probably be rendered unusable. When using the -snapshot option,
197 unsafe caching is always used.
198
199 Instead of -cdrom you can use:
200
201 qemu -drive file=file,index=2,media=cdrom
202
203 Instead of -hda, -hdb, -hdc, -hdd, you can use:
204
205 qemu -drive file=file,index=0,media=disk
206 qemu -drive file=file,index=1,media=disk
207 qemu -drive file=file,index=2,media=disk
208 qemu -drive file=file,index=3,media=disk
209
210 You can connect a CDROM to the slave of ide0:
211
212 qemu -drive file=file,if=ide,index=1,media=cdrom
213
214 If you don't specify the "file=" argument, you define an empty
215 drive:
216
217 qemu -drive if=ide,index=1,media=cdrom
218
219 You can connect a SCSI disk with unit ID 6 on the bus #0:
220
221 qemu -drive file=file,if=scsi,bus=0,unit=6
222
223 Instead of -fda, -fdb, you can use:
224
225 qemu -drive file=file,index=0,if=floppy
226 qemu -drive file=file,index=1,if=floppy
227
228 By default, interface is "ide" and index is automatically
229 incremented:
230
231 qemu -drive file=a -drive file=b"
232
233 is interpreted like:
234
235 qemu -hda a -hdb b
236
237 -set
238 TODO
239
240 -global
241 TODO
242
243 -mtdblock file
244 Use file as on-board Flash memory image.
245
246 -sd file
247 Use file as SecureDigital card image.
248
249 -pflash file
250 Use file as a parallel flash image.
251
252 -boot [order=drives][,once=drives][,menu=on|off]
253 Specify boot order drives as a string of drive letters. Valid drive
254 letters depend on the target achitecture. The x86 PC uses: a, b
255 (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p
256 (Etherboot from network adapter 1-4), hard disk boot is the
257 default. To apply a particular boot order only on the first
258 startup, specify it via once.
259
260 Interactive boot menus/prompts can be enabled via menu=on as far as
261 firmware/BIOS supports them. The default is non-interactive boot.
262
263 # try to boot from network first, then from hard disk
264 qemu -boot order=nc
265 # boot from CD-ROM first, switch back to default order after reboot
266 qemu -boot once=d
267
268 Note: The legacy format '-boot drives' is still supported but its
269 use is discouraged as it may be removed from future versions.
270
271 -snapshot
272 Write to temporary files instead of disk image files. In this case,
273 the raw disk image you use is not written back. You can however
274 force the write back by pressing C-a s.
275
276 -m megs
277 Set virtual RAM size to megs megabytes. Default is 128 MiB.
278 Optionally, a suffix of "M" or "G" can be used to signify a value
279 in megabytes or gigabytes respectively.
280
281 -mem-path path
282 Allocate guest RAM from a temporarily created file in path.
283
284 -mem-prealloc
285 Preallocate memory when using -mem-path.
286
287 -k language
288 Use keyboard layout language (for example "fr" for French). This
289 option is only needed where it is not easy to get raw PC keycodes
290 (e.g. on Macs, with some X11 servers or with a VNC display). You
291 don't normally need to use it on PC/Linux or PC/Windows hosts.
292
293 The available layouts are:
294
295 ar de-ch es fo fr-ca hu ja mk no pt-br sv
296 da en-gb et fr fr-ch is lt nl pl ru th
297 de en-us fi fr-be hr it lv nl-be pt sl tr
298
299 The default is "en-us".
300
301 -audio-help
302 Will show the audio subsystem help: list of drivers, tunable
303 parameters.
304
305 -soundhw card1[,card2,...] or -soundhw all
306 Enable audio and selected sound hardware. Use ? to print all
307 available sound hardware.
308
309 qemu -soundhw sb16,adlib disk.img
310 qemu -soundhw es1370 disk.img
311 qemu -soundhw ac97 disk.img
312 qemu -soundhw all disk.img
313 qemu -soundhw ?
314
315 Note that Linux's i810_audio OSS kernel (for AC97) module might
316 require manually specifying clocking.
317
318 modprobe i810_audio clocking=48000
319
320 USB options:
321
322 -usb
323 Enable the USB driver (will be the default soon)
324
325 -usbdevice devname
326 Add the USB device devname.
327
328 mouse
329 Virtual Mouse. This will override the PS/2 mouse emulation when
330 activated.
331
332 tablet
333 Pointer device that uses absolute coordinates (like a
334 touchscreen). This means qemu is able to report the mouse
335 position without having to grab the mouse. Also overrides the
336 PS/2 mouse emulation when activated.
337
338 disk:[format=format]:file
339 Mass storage device based on file. The optional format argument
340 will be used rather than detecting the format. Can be used to
341 specifiy "format=raw" to avoid interpreting an untrusted format
342 header.
343
344 host:bus.addr
345 Pass through the host device identified by bus.addr (Linux
346 only).
347
348 host:vendor_id:product_id
349 Pass through the host device identified by vendor_id:product_id
350 (Linux only).
351
352 serial:[vendorid=vendor_id][,productid=product_id]:dev
353 Serial converter to host character device dev, see "-serial"
354 for the available devices.
355
356 braille
357 Braille device. This will use BrlAPI to display the braille
358 output on a real or fake device.
359
360 net:options
361 Network adapter that supports CDC ethernet and RNDIS protocols.
362
363 -device driver[,prop[=value][,...]]
364 Add device driver. prop=value sets driver properties. Valid
365 properties depend on the driver. To get help on possible drivers
366 and properties, use "-device ?" and "-device driver,?". File
367 system options:
368
369 The general form of a File system device option is:
370
371 -fsdev fstype ,id=id [,options]
372 Fstype is one of: local, The specific Fstype will determine the
373 applicable options.
374
375 Options to each backend are described below.
376
377 -fsdev local ,id=id ,path=path ,security_model=security_model
378 Create a file-system-"device" for local-filesystem.
379
380 local is only available on Linux.
381
382 path specifies the path to be exported. path is required.
383
384 security_model specifies the security model to be followed.
385 security_model is required.
386
387 Virtual File system pass-through options:
388
389 The general form of a Virtual File system pass-through option is:
390
391 -virtfs fstype [,options]
392 Fstype is one of: local, The specific Fstype will determine the
393 applicable options.
394
395 Options to each backend are described below.
396
397 -virtfs local ,path=path ,mount_tag=mount_tag
398 ,security_model=security_model
399 Create a Virtual file-system-pass through for local-filesystem.
400
401 local is only available on Linux.
402
403 path specifies the path to be exported. path is required.
404
405 security_model specifies the security model to be followed.
406 security_model is required.
407
408 mount_tag specifies the tag with which the exported file is
409 mounted. mount_tag is required.
410
411 -name name
412 Sets the name of the guest. This name will be displayed in the SDL
413 window caption. The name will also be used for the VNC server.
414 Also optionally set the top visible process name in Linux.
415
416 -uuid uuid
417 Set system UUID.
418
419 Display options:
420
421 -nographic
422 Normally, QEMU uses SDL to display the VGA output. With this
423 option, you can totally disable graphical output so that QEMU is a
424 simple command line application. The emulated serial port is
425 redirected on the console. Therefore, you can still use QEMU to
426 debug a Linux kernel with a serial console.
427
428 -curses
429 Normally, QEMU uses SDL to display the VGA output. With this
430 option, QEMU can display the VGA output when in text mode using a
431 curses/ncurses interface. Nothing is displayed in graphical mode.
432
433 -no-frame
434 Do not use decorations for SDL windows and start them using the
435 whole available screen space. This makes the using QEMU in a
436 dedicated desktop workspace more convenient.
437
438 -alt-grab
439 Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt).
440
441 -ctrl-grab
442 Use Right-Ctrl to grab mouse (instead of Ctrl-Alt).
443
444 -no-quit
445 Disable SDL window close capability.
446
447 -sdl
448 Enable SDL. Use Spice.
449
450 -portrait
451 Rotate graphical output 90 deg left (only PXA LCD).
452
453 -vga type
454 Select type of VGA card to emulate. Valid values for type are
455
456 cirrus
457 Cirrus Logic GD5446 Video card. All Windows versions starting
458 from Windows 95 should recognize and use this graphic card. For
459 optimal performances, use 16 bit color depth in the guest and
460 the host OS. (This one is the default)
461
462 std Standard VGA card with Bochs VBE extensions. If your guest OS
463 supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if
464 you want to use high resolution modes (>= 1280x1024x16) then
465 you should use this option.
466
467 vmware
468 VMWare SVGA-II compatible adapter. Use it if you have
469 sufficiently recent XFree86/XOrg server or Windows guest with a
470 driver for this card.
471
472 none
473 Disable VGA card.
474
475 -full-screen
476 Start in full screen.
477
478 -g widthxheight[xdepth]
479 Set the initial graphical resolution and depth (PPC, SPARC only).
480
481 -vnc display[,option[,option[,...]]]
482 Normally, QEMU uses SDL to display the VGA output. With this
483 option, you can have QEMU listen on VNC display display and
484 redirect the VGA display over the VNC session. It is very useful
485 to enable the usb tablet device when using this option (option
486 -usbdevice tablet). When using the VNC display, you must use the -k
487 parameter to set the keyboard layout if you are not using en-us.
488 Valid syntax for the display is
489
490 host:d
491 TCP connections will only be allowed from host on display d.
492 By convention the TCP port is 5900+d. Optionally, host can be
493 omitted in which case the server will accept connections from
494 any host.
495
496 unix:path
497 Connections will be allowed over UNIX domain sockets where path
498 is the location of a unix socket to listen for connections on.
499
500 none
501 VNC is initialized but not started. The monitor "change"
502 command can be used to later start the VNC server.
503
504 Following the display value there may be one or more option flags
505 separated by commas. Valid options are
506
507 reverse
508 Connect to a listening VNC client via a "reverse" connection.
509 The client is specified by the display. For reverse network
510 connections (host:d,"reverse"), the d argument is a TCP port
511 number, not a display number.
512
513 password
514 Require that password based authentication is used for client
515 connections. The password must be set separately using the
516 "change" command in the pcsys_monitor
517
518 tls Require that client use TLS when communicating with the VNC
519 server. This uses anonymous TLS credentials so is susceptible
520 to a man-in-the-middle attack. It is recommended that this
521 option be combined with either the x509 or x509verify options.
522
523 x509=/path/to/certificate/dir
524 Valid if tls is specified. Require that x509 credentials are
525 used for negotiating the TLS session. The server will send its
526 x509 certificate to the client. It is recommended that a
527 password be set on the VNC server to provide authentication of
528 the client when this is used. The path following this option
529 specifies where the x509 certificates are to be loaded from.
530 See the vnc_security section for details on generating
531 certificates.
532
533 x509verify=/path/to/certificate/dir
534 Valid if tls is specified. Require that x509 credentials are
535 used for negotiating the TLS session. The server will send its
536 x509 certificate to the client, and request that the client
537 send its own x509 certificate. The server will validate the
538 client's certificate against the CA certificate, and reject
539 clients when validation fails. If the certificate authority is
540 trusted, this is a sufficient authentication mechanism. You may
541 still wish to set a password on the VNC server as a second
542 authentication layer. The path following this option specifies
543 where the x509 certificates are to be loaded from. See the
544 vnc_security section for details on generating certificates.
545
546 sasl
547 Require that the client use SASL to authenticate with the VNC
548 server. The exact choice of authentication method used is
549 controlled from the system / user's SASL configuration file for
550 the 'qemu' service. This is typically found in
551 /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user,
552 an environment variable SASL_CONF_PATH can be used to make it
553 search alternate locations for the service config. While some
554 SASL auth methods can also provide data encryption (eg GSSAPI),
555 it is recommended that SASL always be combined with the 'tls'
556 and 'x509' settings to enable use of SSL and server
557 certificates. This ensures a data encryption preventing
558 compromise of authentication credentials. See the vnc_security
559 section for details on using SASL authentication.
560
561 acl Turn on access control lists for checking of the x509 client
562 certificate and SASL party. For x509 certs, the ACL check is
563 made against the certificate's distinguished name. This is
564 something that looks like "C=GB,O=ACME,L=Boston,CN=bob". For
565 SASL party, the ACL check is made against the username, which
566 depending on the SASL plugin, may include a realm component, eg
567 "bob" or "bob@EXAMPLE.COM". When the acl flag is set, the
568 initial access list will be empty, with a "deny" policy. Thus
569 no one will be allowed to use the VNC server until the ACLs
570 have been loaded. This can be achieved using the "acl" monitor
571 command.
572
573 lossy
574 Enable lossy compression methods (gradient, JPEG, ...). If this
575 option is set, VNC client may receive lossy framebuffer updates
576 depending on its encoding settings. Enabling this option can
577 save a lot of bandwidth at the expense of quality.
578
579 i386 target only:
580
581 -win2k-hack
582 Use it when installing Windows 2000 to avoid a disk full bug. After
583 Windows 2000 is installed, you no longer need this option (this
584 option slows down the IDE transfers).
585
586 -no-fd-bootchk
587 Disable boot signature checking for floppy disks in Bochs BIOS. It
588 may be needed to boot from old floppy disks. TODO: check reference
589 to Bochs BIOS.
590
591 -no-acpi
592 Disable ACPI (Advanced Configuration and Power Interface) support.
593 Use it if your guest OS complains about ACPI problems (PC target
594 machine only).
595
596 -no-hpet
597 Disable HPET support.
598
599 -balloon none
600 Disable balloon device.
601
602 -balloon virtio[,addr=addr]
603 Enable virtio balloon device (default), optionally with PCI address
604 addr.
605
606 -acpitable
607 [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n]
608 [,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...]
609 Add ACPI table with specified header fields and context from
610 specified files.
611
612 -smbios file=binary
613 Load SMBIOS entry from binary file.
614
615 -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]
616 Specify SMBIOS type 0 fields
617
618 -smbios type=1[,manufacturer=str][,product=str]
619 [,version=str][,serial=str][,uuid=uuid][,sku=str] [,family=str]
620 Specify SMBIOS type 1 fields
621
622 Network options:
623
624 -net nic[,vlan=n][,macaddr=mac][,model=type]
625 [,name=name][,addr=addr][,vectors=v]
626 Create a new Network Interface Card and connect it to VLAN n (n = 0
627 is the default). The NIC is an e1000 by default on the PC target.
628 Optionally, the MAC address can be changed to mac, the device
629 address set to addr (PCI cards only), and a name can be assigned
630 for use in monitor commands. Optionally, for PCI cards, you can
631 specify the number v of MSI-X vectors that the card should have;
632 this option currently only affects virtio cards; set v = 0 to
633 disable MSI-X. If no -net option is specified, a single NIC is
634 created. Qemu can emulate several different models of network
635 card. Valid values for type are "virtio", "i82551", "i82557b",
636 "i82559er", "ne2k_pci", "ne2k_isa", "pcnet", "rtl8139", "e1000",
637 "smc91c111", "lance" and "mcf_fec". Not all devices are supported
638 on all targets. Use -net nic,model=? for a list of available
639 devices for your target.
640
641 -net user[,option][,option][,...]
642 Use the user mode network stack which requires no administrator
643 privilege to run. Valid options are:
644
645 vlan=n
646 Connect user mode stack to VLAN n (n = 0 is the default).
647
648 name=name
649 Assign symbolic name for use in monitor commands.
650
651 net=addr[/mask]
652 Set IP network address the guest will see. Optionally specify
653 the netmask, either in the form a.b.c.d or as number of valid
654 top-most bits. Default is 10.0.2.0/8.
655
656 host=addr
657 Specify the guest-visible address of the host. Default is the
658 2nd IP in the guest network, i.e. x.x.x.2.
659
660 restrict=y|yes|n|no
661 If this options is enabled, the guest will be isolated, i.e. it
662 will not be able to contact the host and no guest IP packets
663 will be routed over the host to the outside. This option does
664 not affect explicitly set forwarding rule.
665
666 hostname=name
667 Specifies the client hostname reported by the builtin DHCP
668 server.
669
670 dhcpstart=addr
671 Specify the first of the 16 IPs the built-in DHCP server can
672 assign. Default is the 16th to 31st IP in the guest network,
673 i.e. x.x.x.16 to x.x.x.31.
674
675 dns=addr
676 Specify the guest-visible address of the virtual nameserver.
677 The address must be different from the host address. Default is
678 the 3rd IP in the guest network, i.e. x.x.x.3.
679
680 tftp=dir
681 When using the user mode network stack, activate a built-in
682 TFTP server. The files in dir will be exposed as the root of a
683 TFTP server. The TFTP client on the guest must be configured
684 in binary mode (use the command "bin" of the Unix TFTP client).
685
686 bootfile=file
687 When using the user mode network stack, broadcast file as the
688 BOOTP filename. In conjunction with tftp, this can be used to
689 network boot a guest from a local directory.
690
691 Example (using pxelinux):
692
693 qemu -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
694
695 smb=dir[,smbserver=addr]
696 When using the user mode network stack, activate a built-in SMB
697 server so that Windows OSes can access to the host files in dir
698 transparently. The IP address of the SMB server can be set to
699 addr. By default the 4th IP in the guest network is used, i.e.
700 x.x.x.4.
701
702 In the guest Windows OS, the line:
703
704 10.0.2.4 smbserver
705
706 must be added in the file C:\WINDOWS\LMHOSTS (for windows
707 9x/Me) or C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS (Windows
708 NT/2000).
709
710 Then dir can be accessed in \\smbserver\qemu.
711
712 Note that a SAMBA server must be installed on the host OS in
713 /usr/sbin/smbd. QEMU was tested successfully with smbd versions
714 from Red Hat 9, Fedora Core 3 and OpenSUSE 11.x.
715
716 hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport
717 Redirect incoming TCP or UDP connections to the host port
718 hostport to the guest IP address guestaddr on guest port
719 guestport. If guestaddr is not specified, its value is x.x.x.15
720 (default first address given by the built-in DHCP server). By
721 specifying hostaddr, the rule can be bound to a specific host
722 interface. If no connection type is set, TCP is used. This
723 option can be given multiple times.
724
725 For example, to redirect host X11 connection from screen 1 to
726 guest screen 0, use the following:
727
728 # on the host
729 qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
730 # this host xterm should open in the guest X11 server
731 xterm -display :1
732
733 To redirect telnet connections from host port 5555 to telnet
734 port on the guest, use the following:
735
736 # on the host
737 qemu -net user,hostfwd=tcp::5555-:23 [...]
738 telnet localhost 5555
739
740 Then when you use on the host "telnet localhost 5555", you
741 connect to the guest telnet server.
742
743 guestfwd=[tcp]:server:port-dev
744 Forward guest TCP connections to the IP address server on port
745 port to the character device dev. This option can be given
746 multiple times.
747
748 Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are
749 still processed and applied to -net user. Mixing them with the new
750 configuration syntax gives undefined results. Their use for new
751 applications is discouraged as they will be removed from future
752 versions.
753
754 -net tap[,vlan=n][,name=name][,fd=h][,ifname=name]
755 [,script=file][,downscript=dfile]
756 Connect the host TAP network interface name to VLAN n, use the
757 network script file to configure it and the network script dfile to
758 deconfigure it. If name is not provided, the OS automatically
759 provides one. fd=h can be used to specify the handle of an already
760 opened host TAP interface. The default network configure script is
761 /etc/qemu-ifup and the default network deconfigure script is
762 /etc/qemu-ifdown. Use script=no or downscript=no to disable script
763 execution. Example:
764
765 qemu linux.img -net nic -net tap
766
767 More complicated example (two NICs, each one connected to a TAP
768 device)
769
770 qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
771 -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
772
773 -net socket[,vlan=n][,name=name][,fd=h]
774 [,listen=[host]:port][,connect=host:port]
775 Connect the VLAN n to a remote VLAN in another QEMU virtual machine
776 using a TCP socket connection. If listen is specified, QEMU waits
777 for incoming connections on port (host is optional). connect is
778 used to connect to another QEMU instance using the listen option.
779 fd=h specifies an already opened TCP socket.
780
781 Example:
782
783 # launch a first QEMU instance
784 qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
785 -net socket,listen=:1234
786 # connect the VLAN 0 of this instance to the VLAN 0
787 # of the first instance
788 qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
789 -net socket,connect=127.0.0.1:1234
790
791 -net socket[,vlan=n][,name=name][,fd=h] [,mcast=maddr:port]
792 Create a VLAN n shared with another QEMU virtual machines using a
793 UDP multicast socket, effectively making a bus for every QEMU with
794 same multicast address maddr and port. NOTES:
795
796 1. Several QEMU can be running on different hosts and share same
797 bus (assuming correct multicast setup for these hosts).
798
799 2. mcast support is compatible with User Mode Linux (argument
800 ethN=mcast), see <http://user-mode-linux.sf.net>.
801
802 3. Use fd=h to specify an already opened UDP multicast socket.
803
804 Example:
805
806 # launch one QEMU instance
807 qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
808 -net socket,mcast=230.0.0.1:1234
809 # launch another QEMU instance on same "bus"
810 qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
811 -net socket,mcast=230.0.0.1:1234
812 # launch yet another QEMU instance on same "bus"
813 qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
814 -net socket,mcast=230.0.0.1:1234
815
816 Example (User Mode Linux compat.):
817
818 # launch QEMU instance (note mcast address selected
819 # is UML's default)
820 qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
821 -net socket,mcast=239.192.168.1:1102
822 # launch UML
823 /path/to/linux ubd0=/path/to/root_fs eth0=mcast
824
825 -net vde[,vlan=n][,name=name][,sock=socketpath]
826 [,port=n][,group=groupname][,mode=octalmode]
827 Connect VLAN n to PORT n of a vde switch running on host and
828 listening for incoming connections on socketpath. Use GROUP
829 groupname and MODE octalmode to change default ownership and
830 permissions for communication port. This option is available only
831 if QEMU has been compiled with vde support enabled.
832
833 Example:
834
835 # launch vde switch
836 vde_switch -F -sock /tmp/myswitch
837 # launch QEMU instance
838 qemu linux.img -net nic -net vde,sock=/tmp/myswitch
839
840 -net dump[,vlan=n][,file=file][,len=len]
841 Dump network traffic on VLAN n to file file (qemu-vlan0.pcap by
842 default). At most len bytes (64k by default) per packet are
843 stored. The file format is libpcap, so it can be analyzed with
844 tools such as tcpdump or Wireshark.
845
846 -net none
847 Indicate that no network devices should be configured. It is used
848 to override the default configuration (-net nic -net user) which is
849 activated if no -net options are provided.
850
851 Character device options:
852
853 The general form of a character device option is:
854
855 -chardev backend ,id=id [,mux=on|off] [,options]
856 Backend is one of: null, socket, udp, msmouse, vc, file, pipe,
857 console, serial, pty, stdio, braille, tty, parport. The specific
858 backend will determine the applicable options.
859
860 All devices must have an id, which can be any string up to 127
861 characters long. It is used to uniquely identify this device in
862 other command line directives.
863
864 A character device may be used in multiplexing mode by multiple
865 front-ends. The key sequence of Control-a and c will rotate the
866 input focus between attached front-ends. Specify mux=on to enable
867 this mode.
868
869 Options to each backend are described below.
870
871 -chardev null ,id=id
872 A void device. This device will not emit any data, and will drop
873 any data it receives. The null backend does not take any options.
874
875 -chardev socket ,id=id [TCP options or unix options] [,server]
876 [,nowait] [,telnet]
877 Create a two-way stream socket, which can be either a TCP or a unix
878 socket. A unix socket will be created if path is specified.
879 Behaviour is undefined if TCP options are specified for a unix
880 socket.
881
882 server specifies that the socket shall be a listening socket.
883
884 nowait specifies that QEMU should not block waiting for a client to
885 connect to a listening socket.
886
887 telnet specifies that traffic on the socket should interpret telnet
888 escape sequences.
889
890 TCP and unix socket options are given below:
891
892 TCP options: port=port [,host=host] [,to=to] [,ipv4] [,ipv6]
893 [,nodelay]
894 host for a listening socket specifies the local address to be
895 bound. For a connecting socket species the remote host to
896 connect to. host is optional for listening sockets. If not
897 specified it defaults to 0.0.0.0.
898
899 port for a listening socket specifies the local port to be
900 bound. For a connecting socket specifies the port on the remote
901 host to connect to. port can be given as either a port number
902 or a service name. port is required.
903
904 to is only relevant to listening sockets. If it is specified,
905 and port cannot be bound, QEMU will attempt to bind to
906 subsequent ports up to and including to until it succeeds. to
907 must be specified as a port number.
908
909 ipv4 and ipv6 specify that either IPv4 or IPv6 must be used.
910 If neither is specified the socket may use either protocol.
911
912 nodelay disables the Nagle algorithm.
913
914 unix options: path=path
915 path specifies the local path of the unix socket. path is
916 required.
917
918 -chardev udp ,id=id [,host=host] ,port=port [,localaddr=localaddr]
919 [,localport=localport] [,ipv4] [,ipv6]
920 Sends all traffic from the guest to a remote host over UDP.
921
922 host specifies the remote host to connect to. If not specified it
923 defaults to "localhost".
924
925 port specifies the port on the remote host to connect to. port is
926 required.
927
928 localaddr specifies the local address to bind to. If not specified
929 it defaults to 0.0.0.0.
930
931 localport specifies the local port to bind to. If not specified any
932 available local port will be used.
933
934 ipv4 and ipv6 specify that either IPv4 or IPv6 must be used. If
935 neither is specified the device may use either protocol.
936
937 -chardev msmouse ,id=id
938 Forward QEMU's emulated msmouse events to the guest. msmouse does
939 not take any options.
940
941 -chardev vc ,id=id [[,width=width] [,height=height]] [[,cols=cols]
942 [,rows=rows]]
943 Connect to a QEMU text console. vc may optionally be given a
944 specific size.
945
946 width and height specify the width and height respectively of the
947 console, in pixels.
948
949 cols and rows specify that the console be sized to fit a text
950 console with the given dimensions.
951
952 -chardev file ,id=id ,path=path
953 Log all traffic received from the guest to a file.
954
955 path specifies the path of the file to be opened. This file will be
956 created if it does not already exist, and overwritten if it does.
957 path is required.
958
959 -chardev pipe ,id=id ,path=path
960 Create a two-way connection to the guest. The behaviour differs
961 slightly between Windows hosts and other hosts:
962
963 On Windows, a single duplex pipe will be created at \\.pipe\path.
964
965 On other hosts, 2 pipes will be created called path.in and
966 path.out. Data written to path.in will be received by the guest.
967 Data written by the guest can be read from path.out. QEMU will not
968 create these fifos, and requires them to be present.
969
970 path forms part of the pipe path as described above. path is
971 required.
972
973 -chardev console ,id=id
974 Send traffic from the guest to QEMU's standard output. console does
975 not take any options.
976
977 console is only available on Windows hosts.
978
979 -chardev serial ,id=id ,path=path
980 Send traffic from the guest to a serial device on the host.
981
982 serial is only available on Windows hosts.
983
984 path specifies the name of the serial device to open.
985
986 -chardev pty ,id=id
987 Create a new pseudo-terminal on the host and connect to it. pty
988 does not take any options.
989
990 pty is not available on Windows hosts.
991
992 -chardev stdio ,id=id [,signal=on|off]
993 Connect to standard input and standard output of the qemu process.
994
995 signal controls if signals are enabled on the terminal, that
996 includes exiting QEMU with the key sequence Control-c. This option
997 is enabled by default, use signal=off to disable it.
998
999 stdio is not available on Windows hosts.
1000
1001 -chardev braille ,id=id
1002 Connect to a local BrlAPI server. braille does not take any
1003 options.
1004
1005 -chardev tty ,id=id ,path=path
1006 Connect to a local tty device.
1007
1008 tty is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
1009 DragonFlyBSD hosts.
1010
1011 path specifies the path to the tty. path is required.
1012
1013 -chardev parport ,id=id ,path=path
1014 parport is only available on Linux, FreeBSD and DragonFlyBSD hosts.
1015
1016 Connect to a local parallel port.
1017
1018 path specifies the path to the parallel port device. path is
1019 required.
1020
1021 Bluetooth(R) options:
1022
1023 -bt hci[...]
1024 Defines the function of the corresponding Bluetooth HCI. -bt
1025 options are matched with the HCIs present in the chosen machine
1026 type. For example when emulating a machine with only one HCI built
1027 into it, only the first "-bt hci[...]" option is valid and defines
1028 the HCI's logic. The Transport Layer is decided by the machine
1029 type. Currently the machines "n800" and "n810" have one HCI and
1030 all other machines have none.
1031
1032 The following three types are recognized:
1033
1034 -bt hci,null
1035 (default) The corresponding Bluetooth HCI assumes no internal
1036 logic and will not respond to any HCI commands or emit events.
1037
1038 -bt hci,host[:id]
1039 ("bluez" only) The corresponding HCI passes commands / events
1040 to / from the physical HCI identified by the name id (default:
1041 "hci0") on the computer running QEMU. Only available on
1042 "bluez" capable systems like Linux.
1043
1044 -bt hci[,vlan=n]
1045 Add a virtual, standard HCI that will participate in the
1046 Bluetooth scatternet n (default 0). Similarly to -net VLANs,
1047 devices inside a bluetooth network n can only communicate with
1048 other devices in the same network (scatternet).
1049
1050 -bt vhci[,vlan=n]
1051 (Linux-host only) Create a HCI in scatternet n (default 0) attached
1052 to the host bluetooth stack instead of to the emulated target.
1053 This allows the host and target machines to participate in a common
1054 scatternet and communicate. Requires the Linux "vhci" driver
1055 installed. Can be used as following:
1056
1057 qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
1058
1059 -bt device:dev[,vlan=n]
1060 Emulate a bluetooth device dev and place it in network n (default
1061 0). QEMU can only emulate one type of bluetooth devices currently:
1062
1063 keyboard
1064 Virtual wireless keyboard implementing the HIDP bluetooth
1065 profile.
1066
1067 Linux/Multiboot boot specific:
1068
1069 When using these options, you can use a given Linux or Multiboot kernel
1070 without installing it in the disk image. It can be useful for easier
1071 testing of various kernels.
1072
1073 -kernel bzImage
1074 Use bzImage as kernel image. The kernel can be either a Linux
1075 kernel or in multiboot format.
1076
1077 -append cmdline
1078 Use cmdline as kernel command line
1079
1080 -initrd file
1081 Use file as initial ram disk.
1082
1083 -initrd "file1 arg=foo,file2"
1084 This syntax is only available with multiboot.
1085
1086 Use file1 and file2 as modules and pass arg=foo as parameter to the
1087 first module.
1088
1089 Debug/Expert options:
1090
1091 -serial dev
1092 Redirect the virtual serial port to host character device dev. The
1093 default device is "vc" in graphical mode and "stdio" in non
1094 graphical mode.
1095
1096 This option can be used several times to simulate up to 4 serial
1097 ports.
1098
1099 Use "-serial none" to disable all serial ports.
1100
1101 Available character devices are:
1102
1103 vc[:WxH]
1104 Virtual console. Optionally, a width and height can be given in
1105 pixel with
1106
1107 vc:800x600
1108
1109 It is also possible to specify width or height in characters:
1110
1111 vc:80Cx24C
1112
1113 pty [Linux only] Pseudo TTY (a new PTY is automatically allocated)
1114
1115 none
1116 No device is allocated.
1117
1118 null
1119 void device
1120
1121 /dev/XXX
1122 [Linux only] Use host tty, e.g. /dev/ttyS0. The host serial
1123 port parameters are set according to the emulated ones.
1124
1125 /dev/parportN
1126 [Linux only, parallel port only] Use host parallel port N.
1127 Currently SPP and EPP parallel port features can be used.
1128
1129 file:filename
1130 Write output to filename. No character can be read.
1131
1132 stdio
1133 [Unix only] standard input/output
1134
1135 pipe:filename
1136 name pipe filename
1137
1138 COMn
1139 [Windows only] Use host serial port n
1140
1141 udp:[remote_host]:remote_port[@[src_ip]:src_port]
1142 This implements UDP Net Console. When remote_host or src_ip
1143 are not specified they default to 0.0.0.0. When not using a
1144 specified src_port a random port is automatically chosen.
1145
1146 If you just want a simple readonly console you can use "netcat"
1147 or "nc", by starting qemu with: "-serial udp::4555" and nc as:
1148 "nc -u -l -p 4555". Any time qemu writes something to that port
1149 it will appear in the netconsole session.
1150
1151 If you plan to send characters back via netconsole or you want
1152 to stop and start qemu a lot of times, you should have qemu use
1153 the same source port each time by using something like "-serial
1154 udp::4555@4556" to qemu. Another approach is to use a patched
1155 version of netcat which can listen to a TCP port and send and
1156 receive characters via udp. If you have a patched version of
1157 netcat which activates telnet remote echo and single char
1158 transfer, then you can use the following options to step up a
1159 netcat redirector to allow telnet on port 5555 to access the
1160 qemu port.
1161
1162 "Qemu Options:"
1163 -serial udp::4555@4556
1164
1165 "netcat options:"
1166 -u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
1167
1168 "telnet options:"
1169 localhost 5555
1170
1171 tcp:[host]:port[,server][,nowait][,nodelay]
1172 The TCP Net Console has two modes of operation. It can send
1173 the serial I/O to a location or wait for a connection from a
1174 location. By default the TCP Net Console is sent to host at
1175 the port. If you use the server option QEMU will wait for a
1176 client socket application to connect to the port before
1177 continuing, unless the "nowait" option was specified. The
1178 "nodelay" option disables the Nagle buffering algorithm. If
1179 host is omitted, 0.0.0.0 is assumed. Only one TCP connection at
1180 a time is accepted. You can use "telnet" to connect to the
1181 corresponding character device.
1182
1183 "Example to send tcp console to 192.168.0.2 port 4444"
1184 -serial tcp:192.168.0.2:4444
1185
1186 "Example to listen and wait on port 4444 for connection"
1187 -serial tcp::4444,server
1188
1189 "Example to not wait and listen on ip 192.168.0.100 port 4444"
1190 -serial tcp:192.168.0.100:4444,server,nowait
1191
1192 telnet:host:port[,server][,nowait][,nodelay]
1193 The telnet protocol is used instead of raw tcp sockets. The
1194 options work the same as if you had specified "-serial tcp".
1195 The difference is that the port acts like a telnet server or
1196 client using telnet option negotiation. This will also allow
1197 you to send the MAGIC_SYSRQ sequence if you use a telnet that
1198 supports sending the break sequence. Typically in unix telnet
1199 you do it with Control-] and then type "send break" followed by
1200 pressing the enter key.
1201
1202 unix:path[,server][,nowait]
1203 A unix domain socket is used instead of a tcp socket. The
1204 option works the same as if you had specified "-serial tcp"
1205 except the unix domain socket path is used for connections.
1206
1207 mon:dev_string
1208 This is a special option to allow the monitor to be multiplexed
1209 onto another serial port. The monitor is accessed with key
1210 sequence of Control-a and then pressing c. See monitor access
1211 pcsys_keys in the -nographic section for more keys. dev_string
1212 should be any one of the serial devices specified above. An
1213 example to multiplex the monitor onto a telnet server listening
1214 on port 4444 would be:
1215
1216 "-serial mon:telnet::4444,server,nowait"
1217 braille
1218 Braille device. This will use BrlAPI to display the braille
1219 output on a real or fake device.
1220
1221 msmouse
1222 Three button serial mouse. Configure the guest to use Microsoft
1223 protocol.
1224
1225 -parallel dev
1226 Redirect the virtual parallel port to host device dev (same devices
1227 as the serial port). On Linux hosts, /dev/parportN can be used to
1228 use hardware devices connected on the corresponding host parallel
1229 port.
1230
1231 This option can be used several times to simulate up to 3 parallel
1232 ports.
1233
1234 Use "-parallel none" to disable all parallel ports.
1235
1236 -monitor dev
1237 Redirect the monitor to host device dev (same devices as the serial
1238 port). The default device is "vc" in graphical mode and "stdio" in
1239 non graphical mode.
1240
1241 -qmp dev
1242 Like -monitor but opens in 'control' mode.
1243
1244 -mon chardev=[name][,mode=readline|control][,default]
1245 Setup monitor on chardev name.
1246
1247 -debugcon dev
1248 Redirect the debug console to host device dev (same devices as the
1249 serial port). The debug console is an I/O port which is typically
1250 port 0xe9; writing to that I/O port sends output to this device.
1251 The default device is "vc" in graphical mode and "stdio" in non
1252 graphical mode.
1253
1254 -pidfile file
1255 Store the QEMU process PID in file. It is useful if you launch QEMU
1256 from a script.
1257
1258 -singlestep
1259 Run the emulation in single step mode.
1260
1261 -S Do not start CPU at startup (you must type 'c' in the monitor).
1262
1263 -gdb dev
1264 Wait for gdb connection on device dev. Typical connections will
1265 likely be TCP-based, but also UDP, pseudo TTY, or even stdio are
1266 reasonable use case. The latter is allowing to start qemu from
1267 within gdb and establish the connection via a pipe:
1268
1269 (gdb) target remote | exec qemu -gdb stdio ...
1270
1271 -s Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port
1272 1234.
1273
1274 -d Output log in /tmp/qemu.log
1275
1276 -hdachs c,h,s,[,t]
1277 Force hard disk 0 physical geometry (1 <= c <= 16383, 1 <= h <= 16,
1278 1 <= s <= 63) and optionally force the BIOS translation mode
1279 (t=none, lba or auto). Usually QEMU can guess all those parameters.
1280 This option is useful for old MS-DOS disk images.
1281
1282 -L path
1283 Set the directory for the BIOS, VGA BIOS and keymaps.
1284
1285 -bios file
1286 Set the filename for the BIOS.
1287
1288 -enable-kvm
1289 Enable KVM full virtualization support. This option is only
1290 available if KVM support is enabled when compiling.
1291
1292 -xen-domid id
1293 Specify xen guest domain id (XEN only).
1294
1295 -xen-create
1296 Create domain using xen hypercalls, bypassing xend. Warning:
1297 should not be used when xend is in use (XEN only).
1298
1299 -xen-attach
1300 Attach to existing xen domain. xend will use this when starting
1301 qemu (XEN only).
1302
1303 -no-reboot
1304 Exit instead of rebooting.
1305
1306 -no-shutdown
1307 Don't exit QEMU on guest shutdown, but instead only stop the
1308 emulation. This allows for instance switching to monitor to commit
1309 changes to the disk image.
1310
1311 -loadvm file
1312 Start right away with a saved state ("loadvm" in monitor)
1313
1314 -daemonize
1315 Daemonize the QEMU process after initialization. QEMU will not
1316 detach from standard IO until it is ready to receive connections on
1317 any of its devices. This option is a useful way for external
1318 programs to launch QEMU without having to cope with initialization
1319 race conditions.
1320
1321 -option-rom file
1322 Load the contents of file as an option ROM. This option is useful
1323 to load things like EtherBoot.
1324
1325 -clock method
1326 Force the use of the given methods for timer alarm. To see what
1327 timers are available use -clock ?.
1328
1329 -rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]
1330 Specify base as "utc" or "localtime" to let the RTC start at the
1331 current UTC or local time, respectively. "localtime" is required
1332 for correct date in MS-DOS or Windows. To start at a specific point
1333 in time, provide date in the format "2006-06-17T16:01:21" or
1334 "2006-06-17". The default base is UTC.
1335
1336 By default the RTC is driven by the host system time. This allows
1337 to use the RTC as accurate reference clock inside the guest,
1338 specifically if the host time is smoothly following an accurate
1339 external reference clock, e.g. via NTP. If you want to isolate the
1340 guest time from the host, even prevent it from progressing during
1341 suspension, you can set clock to "vm" instead.
1342
1343 Enable driftfix (i386 targets only) if you experience time drift
1344 problems, specifically with Windows' ACPI HAL. This option will try
1345 to figure out how many timer interrupts were not processed by the
1346 Windows guest and will re-inject them.
1347
1348 -icount [N|auto]
1349 Enable virtual instruction counter. The virtual cpu will execute
1350 one instruction every 2^N ns of virtual time. If "auto" is
1351 specified then the virtual cpu speed will be automatically adjusted
1352 to keep virtual time within a few seconds of real time.
1353
1354 Note that while this option can give deterministic behavior, it
1355 does not provide cycle accurate emulation. Modern CPUs contain
1356 superscalar out of order cores with complex cache hierarchies. The
1357 number of instructions executed often has little or no correlation
1358 with actual performance.
1359
1360 -watchdog model
1361 Create a virtual hardware watchdog device. Once enabled (by a
1362 guest action), the watchdog must be periodically polled by an agent
1363 inside the guest or else the guest will be restarted.
1364
1365 The model is the model of hardware watchdog to emulate. Choices
1366 for model are: "ib700" (iBASE 700) which is a very simple ISA
1367 watchdog with a single timer, or "i6300esb" (Intel 6300ESB I/O
1368 controller hub) which is a much more featureful PCI-based dual-
1369 timer watchdog. Choose a model for which your guest has drivers.
1370
1371 Use "-watchdog ?" to list available hardware models. Only one
1372 watchdog can be enabled for a guest.
1373
1374 -watchdog-action action
1375 The action controls what QEMU will do when the watchdog timer
1376 expires. The default is "reset" (forcefully reset the guest).
1377 Other possible actions are: "shutdown" (attempt to gracefully
1378 shutdown the guest), "poweroff" (forcefully poweroff the guest),
1379 "pause" (pause the guest), "debug" (print a debug message and
1380 continue), or "none" (do nothing).
1381
1382 Note that the "shutdown" action requires that the guest responds to
1383 ACPI signals, which it may not be able to do in the sort of
1384 situations where the watchdog would have expired, and thus
1385 "-watchdog-action shutdown" is not recommended for production use.
1386
1387 Examples:
1388
1389 "-watchdog i6300esb -watchdog-action pause"
1390 "-watchdog ib700"
1391 -echr numeric_ascii_value
1392 Change the escape character used for switching to the monitor when
1393 using monitor and serial sharing. The default is 0x01 when using
1394 the "-nographic" option. 0x01 is equal to pressing "Control-a".
1395 You can select a different character from the ascii control keys
1396 where 1 through 26 map to Control-a through Control-z. For
1397 instance you could use the either of the following to change the
1398 escape character to Control-t.
1399
1400 "-echr 0x14"
1401 "-echr 20"
1402 -virtioconsole c
1403 Set virtio console.
1404
1405 This option is maintained for backward compatibility.
1406
1407 Please use "-device virtconsole" for the new way of invocation.
1408
1409 -show-cursor
1410 Show cursor.
1411
1412 -tb-size n
1413 Set TB size.
1414
1415 -incoming port
1416 Prepare for incoming migration, listen on port.
1417
1418 -nodefaults
1419 Don't create default devices.
1420
1421 -chroot dir
1422 Immediately before starting guest execution, chroot to the
1423 specified directory. Especially useful in combination with -runas.
1424
1425 -runas user
1426 Immediately before starting guest execution, drop root privileges,
1427 switching to the specified user.
1428
1429 -prom-env variable=value
1430 Set OpenBIOS nvram variable to given value (PPC, SPARC only).
1431
1432 -semihosting
1433 Semihosting mode (ARM, M68K only).
1434
1435 -old-param
1436 Old param mode (ARM only).
1437
1438 -readconfig file
1439 Read device configuration from file.
1440
1441 -writeconfig file
1442 Write device configuration to file.
1443
1444 -nodefconfig
1445 Normally QEMU loads a configuration file from sysconfdir/qemu.conf
1446 and sysconfdir/target-ARCH.conf on startup. The "-nodefconfig"
1447 option will prevent QEMU from loading these configuration files at
1448 startup.
1449
1450 During the graphical emulation, you can use the following keys:
1451
1452 Ctrl-Alt-f
1453 Toggle full screen
1454
1455 Ctrl-Alt-u
1456 Restore the screen's un-scaled dimensions
1457
1458 Ctrl-Alt-n
1459 Switch to virtual console 'n'. Standard console mappings are:
1460
1461 1 Target system display
1462
1463 2 Monitor
1464
1465 3 Serial port
1466
1467 Ctrl-Alt
1468 Toggle mouse and keyboard grab.
1469
1470 In the virtual consoles, you can use Ctrl-Up, Ctrl-Down, Ctrl-PageUp
1471 and Ctrl-PageDown to move in the back log.
1472
1473 During emulation, if you are using the -nographic option, use Ctrl-a h
1474 to get terminal commands:
1475
1476 Ctrl-a h
1477 Ctrl-a ?
1478 Print this help
1479
1480 Ctrl-a x
1481 Exit emulator
1482
1483 Ctrl-a s
1484 Save disk data back to file (if -snapshot)
1485
1486 Ctrl-a t
1487 Toggle console timestamps
1488
1489 Ctrl-a b
1490 Send break (magic sysrq in Linux)
1491
1492 Ctrl-a c
1493 Switch between console and monitor
1494
1495 Ctrl-a Ctrl-a
1496 Send Ctrl-a
1497
1498 The following options are specific to the PowerPC emulation:
1499
1500 -g WxH[xDEPTH]
1501 Set the initial VGA graphic mode. The default is 800x600x15.
1502
1503 -prom-env string
1504 Set OpenBIOS variables in NVRAM, for example:
1505
1506 qemu-system-ppc -prom-env 'auto-boot?=false' \
1507 -prom-env 'boot-device=hd:2,\yaboot' \
1508 -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
1509
1510 These variables are not used by Open Hack'Ware.
1511
1512 The following options are specific to the Sparc32 emulation:
1513
1514 -g WxHx[xDEPTH]
1515 Set the initial TCX graphic mode. The default is 1024x768x8,
1516 currently the only other possible mode is 1024x768x24.
1517
1518 -prom-env string
1519 Set OpenBIOS variables in NVRAM, for example:
1520
1521 qemu-system-sparc -prom-env 'auto-boot?=false' \
1522 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
1523
1524 -M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic]
1525 [|SPARCbook|SS-2|SS-1000|SS-2000]
1526 Set the emulated machine type. Default is SS-5.
1527
1528 The following options are specific to the Sparc64 emulation:
1529
1530 -prom-env string
1531 Set OpenBIOS variables in NVRAM, for example:
1532
1533 qemu-system-sparc64 -prom-env 'auto-boot?=false'
1534
1535 -M [sun4u|sun4v|Niagara]
1536 Set the emulated machine type. The default is sun4u.
1537
1539 The HTML documentation of QEMU for more precise information and Linux
1540 user mode emulator invocation.
1541
1543 Fabrice Bellard
1544
1545
1546
1547 2010-10-19 QEMU(1)