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