~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to qemu-doc.texi

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-07 06:20:34 UTC
  • mfrom: (1.1.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20090307062034-i3pead4mw653v2el
Tags: 0.10.0-1
[ Aurelien Jarno ]
* New upstream release:
  - Fix fr-be keyboard mapping (closes: bug#514462).
  - Fix stat64 structure on ppc-linux-user (closes: bug#470231).
  - Add a chroot option (closes: bug#415996).
  - Add evdev support (closes: bug#513210).
  - Fix loop on symlinks in user mode (closes: bug#297572).
  - Bump depends on openbios-sparc.
  - Depends on openbios-ppc.
  - Update 12_signal_powerpc_support.patch.
  - Update 21_net_soopts.patch.
  - Drop 44_socklen_t_check.patch (merged upstream).
  - Drop 49_null_check.patch (merged upstream).
  - Update 64_ppc_asm_constraints.patch.
  - Drop security/CVE-2008-0928-fedora.patch (merged upstream).
  - Drop security/CVE-2007-5730.patch (merged upstream).
* patches/80_stable-branch.patch: add patches from stable branch:
  - Fix race condition between signal handler/execution loop (closes:
    bug#474386, bug#501731).
* debian/copyright: update.
* Compile and install .dtb files:
  - debian/control: build-depends on device-tree-compiler.
  - debian/patches/81_compile_dtb.patch: new patch from upstream.
  - debian/rules: compile and install bamboo.dtb and mpc8544.dtb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
@item PC (x86 or x86_64 processor)
73
73
@item ISA PC (old style PC without PCI bus)
74
74
@item PREP (PowerPC processor)
75
 
@item G3 BW PowerMac (PowerPC processor)
 
75
@item G3 Beige PowerMac (PowerPC processor)
76
76
@item Mac99 PowerMac (PowerPC processor, in progress)
77
77
@item Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
78
 
@item Sun4u (64-bit Sparc processor, in progress)
 
78
@item Sun4u/Sun4v (64-bit Sparc processor, in progress)
79
79
@item Malta board (32-bit and 64-bit MIPS processors)
 
80
@item MIPS Magnum (64-bit MIPS processor)
80
81
@item ARM Integrator/CP (ARM)
81
82
@item ARM Versatile baseboard (ARM)
82
83
@item ARM RealView Emulation baseboard (ARM)
83
 
@item Spitz, Akita, Borzoi and Terrier PDAs (PXA270 processor)
 
84
@item Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
84
85
@item Luminary Micro LM3S811EVB (ARM Cortex-M3)
85
86
@item Luminary Micro LM3S6965EVB (ARM Cortex-M3)
86
87
@item Freescale MCF5208EVB (ColdFire V2).
87
88
@item Arnewsh MCF5206 evaluation board (ColdFire V2).
88
89
@item Palm Tungsten|E PDA (OMAP310 processor)
 
90
@item N800 and N810 tablets (OMAP2420 processor)
 
91
@item MusicPal (MV88W8618 ARM processor)
 
92
@item Gumstix "Connex" and "Verdex" motherboards (PXA255/270).
 
93
@item Siemens SX1 smartphone (OMAP310 processor)
89
94
@end itemize
90
95
 
91
96
For user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.
166
171
@item
167
172
ENSONIQ AudioPCI ES1370 sound card
168
173
@item
 
174
Intel 82801AA AC97 Audio compatible sound card
 
175
@item
169
176
Adlib(OPL2) - Yamaha YM3812 compatible chip
170
177
@item
 
178
Gravis Ultrasound GF1 sound card
 
179
@item
 
180
CS4231A compatible sound card
 
181
@item
171
182
PCI UHCI USB controller and a virtual USB hub.
172
183
@end itemize
173
184
 
174
185
SMP is supported with up to 255 CPUs.
175
186
 
176
 
Note that adlib is only available when QEMU was configured with
177
 
-enable-adlib
 
187
Note that adlib, gus and cs4231a are only available when QEMU was
 
188
configured with --audio-card-list option containing the name(s) of
 
189
required card(s).
178
190
 
179
191
QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
180
192
VGA BIOS.
181
193
 
182
194
QEMU uses YM3812 emulation by Tatsuyuki Satoh.
183
195
 
 
196
QEMU uses GUS emulation(GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
 
197
by Tibor "TS" Schütz.
 
198
 
 
199
CS4231A is the chip used in Windows Sound System and GUSMAX products
 
200
 
184
201
@c man end
185
202
 
186
203
@node pcsys_quickstart
204
221
@end example
205
222
 
206
223
@c man begin OPTIONS
207
 
@var{disk_image} is a raw hard disk image for IDE hard disk 0.
 
224
@var{disk_image} is a raw hard disk image for IDE hard disk 0. Some
 
225
targets do not need a disk image.
208
226
 
209
227
General options:
210
228
@table @option
 
229
@item -h
 
230
Display help and exit
 
231
 
211
232
@item -M @var{machine}
212
233
Select the emulated @var{machine} (@code{-M ?} for list)
213
234
 
 
235
@item -cpu @var{model}
 
236
Select CPU model (-cpu ? for list and additional feature selection)
 
237
 
 
238
@item -smp @var{n}
 
239
Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
 
240
CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
 
241
to 4.
 
242
 
214
243
@item -fda @var{file}
215
244
@item -fdb @var{file}
216
245
Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can
234
263
@table @code
235
264
@item file=@var{file}
236
265
This option defines which disk image (@pxref{disk_images}) to use with
237
 
this drive.
 
266
this drive. If the filename contains comma, you must double it
 
267
(for instance, "file=my,,file" to use file "my,file").
238
268
@item if=@var{interface}
239
269
This option defines on which type on interface the drive is connected.
240
 
Available types are: ide, scsi, sd, mtd, floppy, pflash.
 
270
Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio.
241
271
@item bus=@var{bus},unit=@var{unit}
242
272
These options define where is connected the drive by defining the bus number and
243
273
the unit id.
251
281
@item snapshot=@var{snapshot}
252
282
@var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}).
253
283
@item cache=@var{cache}
254
 
@var{cache} is "on" or "off" and allows to disable host cache to access data.
 
284
@var{cache} is "none", "writeback", or "writethrough" and controls how the host cache is used to access block data.
 
285
@item format=@var{format}
 
286
Specify which disk @var{format} will be used rather than detecting
 
287
the format.  Can be used to specifiy format=raw to avoid interpreting
 
288
an untrusted format header.
 
289
@item serial=@var{serial}
 
290
This option specifies the serial number to assign to the device.
255
291
@end table
256
292
 
 
293
By default, writethrough caching is used for all block device.  This means that
 
294
the host page cache will be used to read and write data but write notification
 
295
will be sent to the guest only when the data has been reported as written by
 
296
the storage subsystem.
 
297
 
 
298
Writeback caching will report data writes as completed as soon as the data is
 
299
present in the host page cache.  This is safe as long as you trust your host.
 
300
If your host crashes or loses power, then the guest may experience data
 
301
corruption.  When using the @option{-snapshot} option, writeback caching is
 
302
used by default.
 
303
 
 
304
The host page can be avoided entirely with @option{cache=none}.  This will
 
305
attempt to do disk IO directly to the guests memory.  QEMU may still perform
 
306
an internal copy of the data.
 
307
 
 
308
Some block drivers perform badly with @option{cache=writethrough}, most notably,
 
309
qcow2.  If performance is more important than correctness,
 
310
@option{cache=writeback} should be used with qcow2.  By default, if no explicit
 
311
caching is specified for a qcow2 disk image, @option{cache=writeback} will be
 
312
used.  For all other disk types, @option{cache=writethrough} is the default.
 
313
 
257
314
Instead of @option{-cdrom} you can use:
258
315
@example
259
316
qemu -drive file=file,index=2,media=cdrom
299
356
qemu -hda a -hdb b
300
357
@end example
301
358
 
 
359
@item -mtdblock file
 
360
Use 'file' as on-board Flash memory image.
 
361
 
 
362
@item -sd file
 
363
Use 'file' as SecureDigital card image.
 
364
 
 
365
@item -pflash file
 
366
Use 'file' as a parallel flash image.
 
367
 
302
368
@item -boot [a|c|d|n]
303
369
Boot on floppy (a), hard disk (c), CD-ROM (d), or Etherboot (n). Hard disk boot
304
370
is the default.
308
374
the raw disk image you use is not written back. You can however force
309
375
the write back by pressing @key{C-a s} (@pxref{disk_images}).
310
376
 
311
 
@item -no-fd-bootchk
312
 
Disable boot signature checking for floppy disks in Bochs BIOS. It may
313
 
be needed to boot from old floppy disks.
314
 
 
315
377
@item -m @var{megs}
316
 
Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.
317
 
 
318
 
@item -smp @var{n}
319
 
Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
320
 
CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
321
 
to 4.
 
378
Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
 
379
a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
 
380
gigabytes respectively.
 
381
 
 
382
@item -k @var{language}
 
383
 
 
384
Use keyboard layout @var{language} (for example @code{fr} for
 
385
French). This option is only needed where it is not easy to get raw PC
 
386
keycodes (e.g. on Macs, with some X11 servers or with a VNC
 
387
display). You don't normally need to use it on PC/Linux or PC/Windows
 
388
hosts.
 
389
 
 
390
The available layouts are:
 
391
@example
 
392
ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
 
393
da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
 
394
de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
 
395
@end example
 
396
 
 
397
The default is @code{en-us}.
322
398
 
323
399
@item -audio-help
324
400
 
331
407
available sound hardware.
332
408
 
333
409
@example
334
 
qemu -soundhw sb16,adlib hda
335
 
qemu -soundhw es1370 hda
336
 
qemu -soundhw all hda
 
410
qemu -soundhw sb16,adlib disk.img
 
411
qemu -soundhw es1370 disk.img
 
412
qemu -soundhw ac97 disk.img
 
413
qemu -soundhw all disk.img
337
414
qemu -soundhw ?
338
415
@end example
339
416
 
340
 
@item -localtime
341
 
Set the real time clock to local time (the default is to UTC
342
 
time). This option is needed to have correct date in MS-DOS or
343
 
Windows.
344
 
 
345
 
@item -startdate @var{date}
346
 
Set the initial date of the real time clock. Valid format for
347
 
@var{date} are: @code{now} or @code{2006-06-17T16:01:21} or
348
 
@code{2006-06-17}. The default value is @code{now}.
349
 
 
350
 
@item -pidfile @var{file}
351
 
Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
352
 
from a script.
353
 
 
354
 
@item -daemonize
355
 
Daemonize the QEMU process after initialization.  QEMU will not detach from
356
 
standard IO until it is ready to receive connections on any of its devices.
357
 
This option is a useful way for external programs to launch QEMU without having
358
 
to cope with initialization race conditions.
359
 
 
360
 
@item -win2k-hack
361
 
Use it when installing Windows 2000 to avoid a disk full bug. After
362
 
Windows 2000 is installed, you no longer need this option (this option
363
 
slows down the IDE transfers).
364
 
 
365
 
@item -option-rom @var{file}
366
 
Load the contents of @var{file} as an option ROM.
367
 
This option is useful to load things like EtherBoot.
 
417
Note that Linux's i810_audio OSS kernel (for AC97) module might
 
418
require manually specifying clocking.
 
419
 
 
420
@example
 
421
modprobe i810_audio clocking=48000
 
422
@end example
 
423
 
 
424
@end table
 
425
 
 
426
USB options:
 
427
@table @option
 
428
 
 
429
@item -usb
 
430
Enable the USB driver (will be the default soon)
 
431
 
 
432
@item -usbdevice @var{devname}
 
433
Add the USB device @var{devname}. @xref{usb_devices}.
 
434
 
 
435
@table @code
 
436
 
 
437
@item mouse
 
438
Virtual Mouse. This will override the PS/2 mouse emulation when activated.
 
439
 
 
440
@item tablet
 
441
Pointer device that uses absolute coordinates (like a touchscreen). This
 
442
means qemu is able to report the mouse position without having to grab the
 
443
mouse. Also overrides the PS/2 mouse emulation when activated.
 
444
 
 
445
@item disk:[format=@var{format}]:file
 
446
Mass storage device based on file. The optional @var{format} argument
 
447
will be used rather than detecting the format. Can be used to specifiy
 
448
format=raw to avoid interpreting an untrusted format header.
 
449
 
 
450
@item host:bus.addr
 
451
Pass through the host device identified by bus.addr (Linux only).
 
452
 
 
453
@item host:vendor_id:product_id
 
454
Pass through the host device identified by vendor_id:product_id (Linux only).
 
455
 
 
456
@item serial:[vendorid=@var{vendor_id}][,productid=@var{product_id}]:@var{dev}
 
457
Serial converter to host character device @var{dev}, see @code{-serial} for the
 
458
available devices.
 
459
 
 
460
@item braille
 
461
Braille device.  This will use BrlAPI to display the braille output on a real
 
462
or fake device.
 
463
 
 
464
@item net:options
 
465
Network adapter that supports CDC ethernet and RNDIS protocols.
 
466
 
 
467
@end table
368
468
 
369
469
@item -name @var{name}
370
470
Sets the @var{name} of the guest.
371
 
This name will be display in the SDL window caption.
 
471
This name will be displayed in the SDL window caption.
372
472
The @var{name} will also be used for the VNC server.
373
473
 
 
474
@item -uuid @var{uuid}
 
475
Set system UUID.
 
476
 
374
477
@end table
375
478
 
376
479
Display options:
384
487
the console. Therefore, you can still use QEMU to debug a Linux kernel
385
488
with a serial console.
386
489
 
 
490
@item -curses
 
491
 
 
492
Normally, QEMU uses SDL to display the VGA output.  With this option,
 
493
QEMU can display the VGA output when in text mode using a 
 
494
curses/ncurses interface.  Nothing is displayed in graphical mode.
 
495
 
387
496
@item -no-frame
388
497
 
389
498
Do not use decorations for SDL windows and start them using the whole
390
499
available screen space. This makes the using QEMU in a dedicated desktop
391
500
workspace more convenient.
392
501
 
 
502
@item -alt-grab
 
503
 
 
504
Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt).
 
505
 
 
506
@item -no-quit
 
507
 
 
508
Disable SDL window close capability.
 
509
 
 
510
@item -sdl
 
511
 
 
512
Enable SDL.
 
513
 
 
514
@item -portrait
 
515
 
 
516
Rotate graphical output 90 deg left (only PXA LCD).
 
517
 
 
518
@item -vga @var{type}
 
519
Select type of VGA card to emulate. Valid values for @var{type} are
 
520
@table @code
 
521
@item cirrus
 
522
Cirrus Logic GD5446 Video card. All Windows versions starting from
 
523
Windows 95 should recognize and use this graphic card. For optimal
 
524
performances, use 16 bit color depth in the guest and the host OS.
 
525
(This one is the default)
 
526
@item std
 
527
Standard VGA card with Bochs VBE extensions.  If your guest OS
 
528
supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
 
529
to use high resolution modes (>= 1280x1024x16) then you should use
 
530
this option.
 
531
@item vmware
 
532
VMWare SVGA-II compatible adapter. Use it if you have sufficiently
 
533
recent XFree86/XOrg server or Windows guest with a driver for this
 
534
card.
 
535
@item none
 
536
Disable VGA card.
 
537
@end table
 
538
 
393
539
@item -full-screen
394
540
Start in full screen.
395
541
 
405
551
 
406
552
@table @code
407
553
 
408
 
@item @var{interface}:@var{d}
409
 
 
410
 
TCP connections will only be allowed from @var{interface} on display @var{d}.
411
 
By convention the TCP port is 5900+@var{d}. Optionally, @var{interface} can
412
 
be omitted in which case the server will bind to all interfaces.
413
 
 
414
 
@item @var{unix}:@var{path}
 
554
@item @var{host}:@var{d}
 
555
 
 
556
TCP connections will only be allowed from @var{host} on display @var{d}.
 
557
By convention the TCP port is 5900+@var{d}. Optionally, @var{host} can
 
558
be omitted in which case the server will accept connections from any host.
 
559
 
 
560
@item @code{unix}:@var{path}
415
561
 
416
562
Connections will be allowed over UNIX domain sockets where @var{path} is the
417
563
location of a unix socket to listen for connections on.
418
564
 
419
565
@item none
420
566
 
421
 
VNC is initialized by not started. The monitor @code{change} command can be used
422
 
to later start the VNC server.
 
567
VNC is initialized but not started. The monitor @code{change} command
 
568
can be used to later start the VNC server.
423
569
 
424
570
@end table
425
571
 
428
574
 
429
575
@table @code
430
576
 
 
577
@item reverse
 
578
 
 
579
Connect to a listening VNC client via a ``reverse'' connection. The
 
580
client is specified by the @var{display}. For reverse network
 
581
connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
 
582
is a TCP port number, not a display number.
 
583
 
431
584
@item password
432
585
 
433
586
Require that password based authentication is used for client connections.
465
618
 
466
619
@end table
467
620
 
468
 
@item -k @var{language}
469
 
 
470
 
Use keyboard layout @var{language} (for example @code{fr} for
471
 
French). This option is only needed where it is not easy to get raw PC
472
 
keycodes (e.g. on Macs, with some X11 servers or with a VNC
473
 
display). You don't normally need to use it on PC/Linux or PC/Windows
474
 
hosts.
475
 
 
476
 
The available layouts are:
477
 
@example
478
 
ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
479
 
da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
480
 
de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
481
 
@end example
482
 
 
483
 
The default is @code{en-us}.
484
 
 
485
 
@end table
486
 
 
487
 
USB options:
488
 
@table @option
489
 
 
490
 
@item -usb
491
 
Enable the USB driver (will be the default soon)
492
 
 
493
 
@item -usbdevice @var{devname}
494
 
Add the USB device @var{devname}. @xref{usb_devices}.
495
621
@end table
496
622
 
497
623
Network options:
498
624
 
499
625
@table @option
500
626
 
501
 
@item -net nic[,vlan=@var{n}][,macaddr=@var{addr}][,model=@var{type}]
 
627
@item -net nic[,vlan=@var{n}][,macaddr=@var{addr}][,model=@var{type}][,name=@var{name}]
502
628
Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
503
629
= 0 is the default). The NIC is an ne2k_pci by default on the PC
504
 
target. Optionally, the MAC address can be changed. If no
 
630
target. Optionally, the MAC address can be changed to @var{addr}
 
631
and a @var{name} can be assigned for use in monitor commands. If no
505
632
@option{-net} option is specified, a single NIC is created.
506
633
Qemu can emulate several different models of network card.
507
634
Valid values for @var{type} are
508
635
@code{i82551}, @code{i82557b}, @code{i82559er},
509
636
@code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
510
 
@code{smc91c111}, @code{lance} and @code{mcf_fec}.
 
637
@code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
511
638
Not all devices are supported on all targets.  Use -net nic,model=?
512
639
for a list of available devices for your target.
513
640
 
514
 
@item -net user[,vlan=@var{n}][,hostname=@var{name}]
 
641
@item -net user[,vlan=@var{n}][,hostname=@var{name}][,name=@var{name}]
515
642
Use the user mode network stack which requires no administrator
516
643
privilege to run.  @option{hostname=name} can be used to specify the client
517
644
hostname reported by the builtin DHCP server.
518
645
 
519
 
@item -net tap[,vlan=@var{n}][,fd=@var{h}][,ifname=@var{name}][,script=@var{file}]
520
 
Connect the host TAP network interface @var{name} to VLAN @var{n} and
521
 
use the network script @var{file} to configure it. The default
522
 
network script is @file{/etc/qemu-ifup}. Use @option{script=no} to
523
 
disable script execution. If @var{name} is not
524
 
provided, the OS automatically provides one. @option{fd}=@var{h} can be
525
 
used to specify the handle of an already opened host TAP interface. Example:
 
646
@item -net channel,@var{port}:@var{dev}
 
647
Forward @option{user} TCP connection to port @var{port} to character device @var{dev}
 
648
 
 
649
@item -net tap[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,ifname=@var{name}][,script=@var{file}][,downscript=@var{dfile}]
 
650
Connect the host TAP network interface @var{name} to VLAN @var{n}, use
 
651
the network script @var{file} to configure it and the network script 
 
652
@var{dfile} to deconfigure it. If @var{name} is not provided, the OS 
 
653
automatically provides one. @option{fd}=@var{h} can be used to specify
 
654
the handle of an already opened host TAP interface. The default network 
 
655
configure script is @file{/etc/qemu-ifup} and the default network 
 
656
deconfigure script is @file{/etc/qemu-ifdown}. Use @option{script=no} 
 
657
or @option{downscript=no} to disable script execution. Example:
526
658
 
527
659
@example
528
660
qemu linux.img -net nic -net tap
535
667
@end example
536
668
 
537
669
 
538
 
@item -net socket[,vlan=@var{n}][,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
 
670
@item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
539
671
 
540
672
Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
541
673
machine using a TCP socket connection. If @option{listen} is
555
687
               -net socket,connect=127.0.0.1:1234
556
688
@end example
557
689
 
558
 
@item -net socket[,vlan=@var{n}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}]
 
690
@item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}]
559
691
 
560
692
Create a VLAN @var{n} shared with another QEMU virtual
561
693
machines using a UDP multicast socket, effectively making a bus for
595
727
/path/to/linux ubd0=/path/to/root_fs eth0=mcast
596
728
@end example
597
729
 
 
730
@item -net vde[,vlan=@var{n}][,name=@var{name}][,sock=@var{socketpath}][,port=@var{n}][,group=@var{groupname}][,mode=@var{octalmode}]
 
731
Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
 
732
listening for incoming connections on @var{socketpath}. Use GROUP @var{groupname}
 
733
and MODE @var{octalmode} to change default ownership and permissions for
 
734
communication port. This option is available only if QEMU has been compiled
 
735
with vde support enabled.
 
736
 
 
737
Example:
 
738
@example
 
739
# launch vde switch
 
740
vde_switch -F -sock /tmp/myswitch
 
741
# launch QEMU instance
 
742
qemu linux.img -net nic -net vde,sock=/tmp/myswitch
 
743
@end example
 
744
 
598
745
@item -net none
599
746
Indicate that no network devices should be configured. It is used to
600
747
override the default configuration (@option{-net nic -net user}) which
667
814
 
668
815
@end table
669
816
 
 
817
Bluetooth(R) options:
 
818
@table @option
 
819
 
 
820
@item -bt hci[...]
 
821
Defines the function of the corresponding Bluetooth HCI.  -bt options
 
822
are matched with the HCIs present in the chosen machine type.  For
 
823
example when emulating a machine with only one HCI built into it, only
 
824
the first @code{-bt hci[...]} option is valid and defines the HCI's
 
825
logic.  The Transport Layer is decided by the machine type.  Currently
 
826
the machines @code{n800} and @code{n810} have one HCI and all other
 
827
machines have none.
 
828
 
 
829
@anchor{bt-hcis}
 
830
The following three types are recognized:
 
831
 
 
832
@table @code
 
833
@item -bt hci,null
 
834
(default) The corresponding Bluetooth HCI assumes no internal logic
 
835
and will not respond to any HCI commands or emit events.
 
836
 
 
837
@item -bt hci,host[:@var{id}]
 
838
(@code{bluez} only) The corresponding HCI passes commands / events
 
839
to / from the physical HCI identified by the name @var{id} (default:
 
840
@code{hci0}) on the computer running QEMU.  Only available on @code{bluez}
 
841
capable systems like Linux.
 
842
 
 
843
@item -bt hci[,vlan=@var{n}]
 
844
Add a virtual, standard HCI that will participate in the Bluetooth
 
845
scatternet @var{n} (default @code{0}).  Similarly to @option{-net}
 
846
VLANs, devices inside a bluetooth network @var{n} can only communicate
 
847
with other devices in the same network (scatternet).
 
848
@end table
 
849
 
 
850
@item -bt vhci[,vlan=@var{n}]
 
851
(Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
 
852
to the host bluetooth stack instead of to the emulated target.  This
 
853
allows the host and target machines to participate in a common scatternet
 
854
and communicate.  Requires the Linux @code{vhci} driver installed.  Can
 
855
be used as following:
 
856
 
 
857
@example
 
858
qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
 
859
@end example
 
860
 
 
861
@item -bt device:@var{dev}[,vlan=@var{n}]
 
862
Emulate a bluetooth device @var{dev} and place it in network @var{n}
 
863
(default @code{0}).  QEMU can only emulate one type of bluetooth devices
 
864
currently:
 
865
 
 
866
@table @code
 
867
@item keyboard
 
868
Virtual wireless keyboard implementing the HIDP bluetooth profile.
 
869
@end table
 
870
 
 
871
@end table
 
872
 
 
873
i386 target only:
 
874
 
 
875
@table @option
 
876
 
 
877
@item -win2k-hack
 
878
Use it when installing Windows 2000 to avoid a disk full bug. After
 
879
Windows 2000 is installed, you no longer need this option (this option
 
880
slows down the IDE transfers).
 
881
 
 
882
@item -rtc-td-hack
 
883
Use it if you experience time drift problem in Windows with ACPI HAL.
 
884
This option will try to figure out how many timer interrupts were not
 
885
processed by the Windows guest and will re-inject them.
 
886
 
 
887
@item -no-fd-bootchk
 
888
Disable boot signature checking for floppy disks in Bochs BIOS. It may
 
889
be needed to boot from old floppy disks.
 
890
 
 
891
@item -no-acpi
 
892
Disable ACPI (Advanced Configuration and Power Interface) support. Use
 
893
it if your guest OS complains about ACPI problems (PC target machine
 
894
only).
 
895
 
 
896
@item -no-hpet
 
897
Disable HPET support.
 
898
 
 
899
@item -acpitable [sig=@var{str}][,rev=@var{n}][,oem_id=@var{str}][,oem_table_id=@var{str}][,oem_rev=@var{n}] [,asl_compiler_id=@var{str}][,asl_compiler_rev=@var{n}][,data=@var{file1}[:@var{file2}]...]
 
900
Add ACPI table with specified header fields and context from specified files.
 
901
 
 
902
@end table
 
903
 
670
904
Linux boot specific: When using these options, you can use a given
671
905
Linux kernel without installing it in the disk image. It can be useful
672
906
for easier testing of various kernels.
692
926
@var{dev}. The default device is @code{vc} in graphical mode and
693
927
@code{stdio} in non graphical mode.
694
928
 
695
 
This option can be used several times to simulate up to 4 serials
 
929
This option can be used several times to simulate up to 4 serial
696
930
ports.
697
931
 
698
932
Use @code{-serial none} to disable all serial ports.
733
967
When @var{remote_host} or @var{src_ip} are not specified
734
968
they default to @code{0.0.0.0}.
735
969
When not using a specified @var{src_port} a random port is automatically chosen.
 
970
@item msmouse
 
971
Three button serial mouse. Configure the guest to use Microsoft protocol.
736
972
 
737
973
If you just want a simple readonly console you can use @code{netcat} or
738
974
@code{nc}, by starting qemu with: @code{-serial udp::4555} and nc as:
803
1039
@item -serial mon:telnet::4444,server,nowait
804
1040
@end table
805
1041
 
 
1042
@item braille
 
1043
Braille device.  This will use BrlAPI to display the braille output on a real
 
1044
or fake device.
 
1045
 
806
1046
@end table
807
1047
 
808
1048
@item -parallel @var{dev}
822
1062
The default device is @code{vc} in graphical mode and @code{stdio} in
823
1063
non graphical mode.
824
1064
 
825
 
@item -echr numeric_ascii_value
826
 
Change the escape character used for switching to the monitor when using
827
 
monitor and serial sharing.  The default is @code{0x01} when using the
828
 
@code{-nographic} option.  @code{0x01} is equal to pressing
829
 
@code{Control-a}.  You can select a different character from the ascii
830
 
control keys where 1 through 26 map to Control-a through Control-z.  For
831
 
instance you could use the either of the following to change the escape
832
 
character to Control-t.
833
 
@table @code
834
 
@item -echr 0x14
835
 
@item -echr 20
836
 
@end table
 
1065
@item -pidfile @var{file}
 
1066
Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
 
1067
from a script.
 
1068
 
 
1069
@item -S
 
1070
Do not start CPU at startup (you must type 'c' in the monitor).
837
1071
 
838
1072
@item -s
839
1073
Wait gdb connection to port 1234 (@pxref{gdb_usage}).
 
1074
 
840
1075
@item -p @var{port}
841
1076
Change gdb connection port.  @var{port} can be either a decimal number
842
1077
to specify a TCP port, or a host device (same devices as the serial port).
843
 
@item -S
844
 
Do not start CPU at startup (you must type 'c' in the monitor).
 
1078
 
845
1079
@item -d
846
1080
Output log in /tmp/qemu.log
847
1081
@item -hdachs @var{c},@var{h},@var{s},[,@var{t}]
851
1085
all those parameters. This option is useful for old MS-DOS disk
852
1086
images.
853
1087
 
854
 
@item -L path
 
1088
@item -L  @var{path}
855
1089
Set the directory for the BIOS, VGA BIOS and keymaps.
856
1090
 
857
 
@item -std-vga
858
 
Simulate a standard VGA card with Bochs VBE extensions (default is
859
 
Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0
860
 
VBE extensions (e.g. Windows XP) and if you want to use high
861
 
resolution modes (>= 1280x1024x16) then you should use this option.
862
 
 
863
 
@item -no-acpi
864
 
Disable ACPI (Advanced Configuration and Power Interface) support. Use
865
 
it if your guest OS complains about ACPI problems (PC target machine
866
 
only).
 
1091
@item -bios @var{file}
 
1092
Set the filename for the BIOS.
 
1093
 
 
1094
@item -kernel-kqemu
 
1095
Enable KQEMU full virtualization (default is user mode only).
 
1096
 
 
1097
@item -no-kqemu
 
1098
Disable KQEMU kernel module usage. KQEMU options are only available if
 
1099
KQEMU support is enabled when compiling.
 
1100
 
 
1101
@item -enable-kvm
 
1102
Enable KVM full virtualization support. This option is only available
 
1103
if KVM support is enabled when compiling.
867
1104
 
868
1105
@item -no-reboot
869
1106
Exit instead of rebooting.
870
1107
 
871
 
@item -loadvm file
 
1108
@item -no-shutdown
 
1109
Don't exit QEMU on guest shutdown, but instead only stop the emulation.
 
1110
This allows for instance switching to monitor to commit changes to the
 
1111
disk image.
 
1112
 
 
1113
@item -loadvm @var{file}
872
1114
Start right away with a saved state (@code{loadvm} in monitor)
873
1115
 
874
 
@item -semihosting
875
 
Enable semihosting syscall emulation (ARM and M68K target machines only).
876
 
 
877
 
On ARM this implements the "Angel" interface.
878
 
On M68K this implements the "ColdFire GDB" interface used by libgloss.
879
 
 
880
 
Note that this allows guest direct access to the host filesystem,
881
 
so should only be used with trusted guest OS.
 
1116
@item -daemonize
 
1117
Daemonize the QEMU process after initialization.  QEMU will not detach from
 
1118
standard IO until it is ready to receive connections on any of its devices.
 
1119
This option is a useful way for external programs to launch QEMU without having
 
1120
to cope with initialization race conditions.
 
1121
 
 
1122
@item -option-rom @var{file}
 
1123
Load the contents of @var{file} as an option ROM.
 
1124
This option is useful to load things like EtherBoot.
 
1125
 
 
1126
@item -clock @var{method}
 
1127
Force the use of the given methods for timer alarm. To see what timers
 
1128
are available use -clock ?.
 
1129
 
 
1130
@item -localtime
 
1131
Set the real time clock to local time (the default is to UTC
 
1132
time). This option is needed to have correct date in MS-DOS or
 
1133
Windows.
 
1134
 
 
1135
@item -startdate @var{date}
 
1136
Set the initial date of the real time clock. Valid formats for
 
1137
@var{date} are: @code{now} or @code{2006-06-17T16:01:21} or
 
1138
@code{2006-06-17}. The default value is @code{now}.
 
1139
 
 
1140
@item -icount [N|auto]
 
1141
Enable virtual instruction counter.  The virtual cpu will execute one
 
1142
instruction every 2^N ns of virtual time.  If @code{auto} is specified
 
1143
then the virtual cpu speed will be automatically adjusted to keep virtual
 
1144
time within a few seconds of real time.
 
1145
 
 
1146
Note that while this option can give deterministic behavior, it does not
 
1147
provide cycle accurate emulation.  Modern CPUs contain superscalar out of
 
1148
order cores with complex cache hierarchies.  The number of instructions
 
1149
executed often has little or no correlation with actual performance.
 
1150
 
 
1151
@item -echr numeric_ascii_value
 
1152
Change the escape character used for switching to the monitor when using
 
1153
monitor and serial sharing.  The default is @code{0x01} when using the
 
1154
@code{-nographic} option.  @code{0x01} is equal to pressing
 
1155
@code{Control-a}.  You can select a different character from the ascii
 
1156
control keys where 1 through 26 map to Control-a through Control-z.  For
 
1157
instance you could use the either of the following to change the escape
 
1158
character to Control-t.
 
1159
@table @code
 
1160
@item -echr 0x14
 
1161
@item -echr 20
 
1162
@end table
 
1163
 
 
1164
@item -chroot dir
 
1165
Immediately before starting guest execution, chroot to the specified
 
1166
directory.  Especially useful in combination with -runas.
 
1167
 
 
1168
@item -runas user
 
1169
Immediately before starting guest execution, drop root privileges, switching
 
1170
to the specified user.
 
1171
 
882
1172
@end table
883
1173
 
884
1174
@c man end
916
1206
 
917
1207
@table @key
918
1208
@item Ctrl-a h
 
1209
@item Ctrl-a ?
919
1210
Print this help
920
1211
@item Ctrl-a x
921
1212
Exit emulator
922
1213
@item Ctrl-a s
923
1214
Save disk data back to file (if -snapshot)
924
1215
@item Ctrl-a t
925
 
toggle console timestamps
 
1216
Toggle console timestamps
926
1217
@item Ctrl-a b
927
1218
Send break (magic sysrq in Linux)
928
1219
@item Ctrl-a c
981
1272
Show various information about the system state.
982
1273
 
983
1274
@table @option
 
1275
@item info version
 
1276
show the version of QEMU
984
1277
@item info network
985
1278
show the various VLANs and the associated devices
 
1279
@item info chardev
 
1280
show the character devices
986
1281
@item info block
987
1282
show the block devices
 
1283
@item info block
 
1284
show block device statistics
988
1285
@item info registers
989
1286
show the cpu registers
 
1287
@item info cpus
 
1288
show infos for each CPU
990
1289
@item info history
991
1290
show the command line history
 
1291
@item info irq
 
1292
show the interrupts statistics (if available)
 
1293
@item info pic
 
1294
show i8259 (PIC) state
992
1295
@item info pci
993
 
show emulated PCI device
 
1296
show emulated PCI device info
 
1297
@item info tlb
 
1298
show virtual to physical memory mappings (i386 only)
 
1299
@item info mem
 
1300
show the active virtual memory mappings (i386 only)
 
1301
@item info hpet
 
1302
show state of HPET (i386 only)
 
1303
@item info kqemu
 
1304
show KQEMU information
 
1305
@item info kvm
 
1306
show KVM information
994
1307
@item info usb
995
1308
show USB devices plugged on the virtual USB hub
996
1309
@item info usbhost
997
1310
show all USB host devices
 
1311
@item info profile
 
1312
show profiling information
998
1313
@item info capture
999
1314
show information about active capturing
1000
1315
@item info snapshots
1001
1316
show list of VM snapshots
 
1317
@item info status
 
1318
show the current VM status (running|paused)
 
1319
@item info pcmcia
 
1320
show guest PCMCIA status
1002
1321
@item info mice
1003
1322
show which guest mouse is receiving events
 
1323
@item info vnc
 
1324
show the vnc server status
 
1325
@item info name
 
1326
show the current VM name
 
1327
@item info uuid
 
1328
show the current VM UUID
 
1329
@item info cpustats
 
1330
show CPU statistics
 
1331
@item info slirp
 
1332
show SLIRP statistics (if available)
 
1333
@item info migrate
 
1334
show migration status
 
1335
@item info balloon
 
1336
show balloon information
1004
1337
@end table
1005
1338
 
1006
1339
@item q or quit
1014
1347
Change the configuration of a device.
1015
1348
 
1016
1349
@table @option
1017
 
@item change @var{diskdevice} @var{filename}
 
1350
@item change @var{diskdevice} @var{filename} [@var{format}]
1018
1351
Change the medium for a removable disk device to point to @var{filename}. eg
1019
1352
 
1020
1353
@example
1021
 
(qemu) change cdrom /path/to/some.iso
 
1354
(qemu) change ide1-cd0 /path/to/some.iso
1022
1355
@end example
1023
1356
 
 
1357
@var{format} is optional.
 
1358
 
1024
1359
@item change vnc @var{display},@var{options}
1025
1360
Change the configuration of the VNC server. The valid syntax for @var{display}
1026
1361
and @var{options} are described at @ref{sec_invocation}. eg
1029
1364
(qemu) change vnc localhost:1
1030
1365
@end example
1031
1366
 
1032
 
@item change vnc password
 
1367
@item change vnc password [@var{password}]
1033
1368
 
1034
 
Change the password associated with the VNC server. The monitor will prompt for
1035
 
the new password to be entered. VNC passwords are only significant upto 8 letters.
1036
 
eg.
 
1369
Change the password associated with the VNC server. If the new password is not
 
1370
supplied, the monitor will prompt for it to be entered. VNC passwords are only
 
1371
significant up to 8 letters. eg
1037
1372
 
1038
1373
@example
1039
1374
(qemu) change vnc password
1045
1380
@item screendump @var{filename}
1046
1381
Save screen into PPM image @var{filename}.
1047
1382
 
1048
 
@item mouse_move @var{dx} @var{dy} [@var{dz}]
1049
 
Move the active mouse to the specified coordinates @var{dx} @var{dy}
1050
 
with optional scroll axis @var{dz}.
1051
 
 
1052
 
@item mouse_button @var{val}
1053
 
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
1054
 
 
1055
 
@item mouse_set @var{index}
1056
 
Set which mouse device receives events at given @var{index}, index
1057
 
can be obtained with
1058
 
@example
1059
 
info mice
1060
 
@end example
1061
 
 
1062
 
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
1063
 
Capture audio into @var{filename}. Using sample rate @var{frequency}
1064
 
bits per sample @var{bits} and number of channels @var{channels}.
1065
 
 
1066
 
Defaults:
1067
 
@itemize @minus
1068
 
@item Sample rate = 44100 Hz - CD quality
1069
 
@item Bits = 16
1070
 
@item Number of channels = 2 - Stereo
1071
 
@end itemize
1072
 
 
1073
 
@item stopcapture @var{index}
1074
 
Stop capture with a given @var{index}, index can be obtained with
1075
 
@example
1076
 
info capture
1077
 
@end example
 
1383
@item logfile @var{filename}
 
1384
Output logs to @var{filename}.
1078
1385
 
1079
1386
@item log @var{item1}[,...]
1080
1387
Activate logging of the specified items to @file{/tmp/qemu.log}.
1167
1474
 
1168
1475
@item sendkey @var{keys}
1169
1476
 
1170
 
Send @var{keys} to the emulator. Use @code{-} to press several keys
1171
 
simultaneously. Example:
 
1477
Send @var{keys} to the emulator. @var{keys} could be the name of the
 
1478
key or @code{#} followed by the raw value in either decimal or hexadecimal
 
1479
format. Use @code{-} to press several keys simultaneously. Example:
1172
1480
@example
1173
1481
sendkey ctrl-alt-f1
1174
1482
@end example
1180
1488
 
1181
1489
Reset the system.
1182
1490
 
 
1491
@item system_powerdown
 
1492
 
 
1493
Power down the system (if supported).
 
1494
 
 
1495
@item sum @var{addr} @var{size}
 
1496
 
 
1497
Compute the checksum of a memory region.
 
1498
 
1183
1499
@item usb_add @var{devname}
1184
1500
 
1185
1501
Add the USB device @var{devname}.  For details of available devices see
1191
1507
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
1192
1508
command @code{info usb} to see the devices you can remove.
1193
1509
 
 
1510
@item mouse_move @var{dx} @var{dy} [@var{dz}]
 
1511
Move the active mouse to the specified coordinates @var{dx} @var{dy}
 
1512
with optional scroll axis @var{dz}.
 
1513
 
 
1514
@item mouse_button @var{val}
 
1515
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
 
1516
 
 
1517
@item mouse_set @var{index}
 
1518
Set which mouse device receives events at given @var{index}, index
 
1519
can be obtained with
 
1520
@example
 
1521
info mice
 
1522
@end example
 
1523
 
 
1524
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
 
1525
Capture audio into @var{filename}. Using sample rate @var{frequency}
 
1526
bits per sample @var{bits} and number of channels @var{channels}.
 
1527
 
 
1528
Defaults:
 
1529
@itemize @minus
 
1530
@item Sample rate = 44100 Hz - CD quality
 
1531
@item Bits = 16
 
1532
@item Number of channels = 2 - Stereo
 
1533
@end itemize
 
1534
 
 
1535
@item stopcapture @var{index}
 
1536
Stop capture with a given @var{index}, index can be obtained with
 
1537
@example
 
1538
info capture
 
1539
@end example
 
1540
 
 
1541
@item memsave @var{addr} @var{size} @var{file}
 
1542
save to disk virtual memory dump starting at @var{addr} of size @var{size}.
 
1543
 
 
1544
@item pmemsave @var{addr} @var{size} @var{file}
 
1545
save to disk physical memory dump starting at @var{addr} of size @var{size}.
 
1546
 
 
1547
@item boot_set @var{bootdevicelist}
 
1548
 
 
1549
Define new values for the boot device list. Those values will override
 
1550
the values specified on the command line through the @code{-boot} option.
 
1551
 
 
1552
The values that can be specified here depend on the machine type, but are
 
1553
the same that can be specified in the @code{-boot} command line option.
 
1554
 
 
1555
@item nmi @var{cpu}
 
1556
Inject an NMI on the given CPU.
 
1557
 
 
1558
@item migrate [-d] @var{uri}
 
1559
Migrate to @var{uri} (using -d to not wait for completion).
 
1560
 
 
1561
@item migrate_cancel
 
1562
Cancel the current VM migration.
 
1563
 
 
1564
@item migrate_set_speed @var{value}
 
1565
Set maximum speed to @var{value} (in bytes) for migrations.
 
1566
 
 
1567
@item balloon @var{value}
 
1568
Request VM to change its memory allocation to @var{value} (in MB).
 
1569
 
 
1570
@item set_link @var{name} [up|down]
 
1571
Set link @var{name} up or down.
 
1572
 
1194
1573
@end table
1195
1574
 
1196
1575
@subsection Integer expressions
1213
1592
* disk_images_snapshot_mode:: Snapshot mode
1214
1593
* vm_snapshots::              VM snapshots
1215
1594
* qemu_img_invocation::       qemu-img Invocation
 
1595
* qemu_nbd_invocation::       qemu-nbd Invocation
1216
1596
* host_drives::               Using host drives
1217
1597
* disk_images_fat_images::    Virtual FAT disk images
 
1598
* disk_images_nbd::           NBD access
1218
1599
@end menu
1219
1600
 
1220
1601
@node disk_images_quickstart
1295
1676
 
1296
1677
@include qemu-img.texi
1297
1678
 
 
1679
@node qemu_nbd_invocation
 
1680
@subsection @code{qemu-nbd} Invocation
 
1681
 
 
1682
@include qemu-nbd.texi
 
1683
 
1298
1684
@node host_drives
1299
1685
@subsection Using host drives
1300
1686
 
1392
1778
@item write to the FAT directory on the host system while accessing it with the guest system.
1393
1779
@end itemize
1394
1780
 
 
1781
@node disk_images_nbd
 
1782
@subsection NBD access
 
1783
 
 
1784
QEMU can access directly to block device exported using the Network Block Device
 
1785
protocol.
 
1786
 
 
1787
@example
 
1788
qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
 
1789
@end example
 
1790
 
 
1791
If the NBD server is located on the same host, you can use an unix socket instead
 
1792
of an inet socket:
 
1793
 
 
1794
@example
 
1795
qemu linux.img -hdb nbd:unix:/tmp/my_socket
 
1796
@end example
 
1797
 
 
1798
In this case, the block device must be exported using qemu-nbd:
 
1799
 
 
1800
@example
 
1801
qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
 
1802
@end example
 
1803
 
 
1804
The use of qemu-nbd allows to share a disk between several guests:
 
1805
@example
 
1806
qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
 
1807
@end example
 
1808
 
 
1809
and then you can use it with two guests:
 
1810
@example
 
1811
qemu linux1.img -hdb nbd:unix:/tmp/my_socket
 
1812
qemu linux2.img -hdb nbd:unix:/tmp/my_socket
 
1813
@end example
 
1814
 
1395
1815
@node pcsys_network
1396
1816
@section Network emulation
1397
1817
 
1527
1947
USB devices can be connected with the @option{-usbdevice} commandline option
1528
1948
or the @code{usb_add} monitor command.  Available devices are:
1529
1949
 
1530
 
@table @var
1531
 
@item @code{mouse}
 
1950
@table @code
 
1951
@item mouse
1532
1952
Virtual Mouse.  This will override the PS/2 mouse emulation when activated.
1533
 
@item @code{tablet}
 
1953
@item tablet
1534
1954
Pointer device that uses absolute coordinates (like a touchscreen).
1535
1955
This means qemu is able to report the mouse position without having
1536
1956
to grab the mouse.  Also overrides the PS/2 mouse emulation when activated.
1537
 
@item @code{disk:@var{file}}
 
1957
@item disk:@var{file}
1538
1958
Mass storage device based on @var{file} (@pxref{disk_images})
1539
 
@item @code{host:@var{bus.addr}}
 
1959
@item host:@var{bus.addr}
1540
1960
Pass through the host device identified by @var{bus.addr}
1541
1961
(Linux only)
1542
 
@item @code{host:@var{vendor_id:product_id}}
 
1962
@item host:@var{vendor_id:product_id}
1543
1963
Pass through the host device identified by @var{vendor_id:product_id}
1544
1964
(Linux only)
1545
 
@item @code{wacom-tablet}
 
1965
@item wacom-tablet
1546
1966
Virtual Wacom PenPartner tablet.  This device is similar to the @code{tablet}
1547
1967
above but it can be used with the tslib library because in addition to touch
1548
1968
coordinates it reports touch pressure.
1549
 
@item @code{keyboard}
 
1969
@item keyboard
1550
1970
Standard USB keyboard.  Will override the PS/2 keyboard (if present).
 
1971
@item serial:[vendorid=@var{vendor_id}][,product_id=@var{product_id}]:@var{dev}
 
1972
Serial converter. This emulates an FTDI FT232BM chip connected to host character
 
1973
device @var{dev}. The available character devices are the same as for the
 
1974
@code{-serial} option. The @code{vendorid} and @code{productid} options can be
 
1975
used to override the default 0403:6001. For instance, 
 
1976
@example
 
1977
usb_add serial:productid=FA00:tcp:192.168.0.2:4444
 
1978
@end example
 
1979
will connect to tcp port 4444 of ip 192.168.0.2, and plug that to the virtual
 
1980
serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00).
 
1981
@item braille
 
1982
Braille device.  This will use BrlAPI to display the braille output on a real
 
1983
or fake device.
 
1984
@item net:@var{options}
 
1985
Network adapter that supports CDC ethernet and RNDIS protocols.  @var{options}
 
1986
specifies NIC options as with @code{-net nic,}@var{options} (see description).
 
1987
For instance, user-mode networking can be used with
 
1988
@example
 
1989
qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
 
1990
@end example
 
1991
Currently this cannot be used in machines that support PCI NICs.
 
1992
@item bt[:@var{hci-type}]
 
1993
Bluetooth dongle whose type is specified in the same format as with
 
1994
the @option{-bt hci} option, @pxref{bt-hcis,,allowed HCI types}.  If
 
1995
no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
 
1996
This USB device implements the USB Transport Layer of HCI.  Example
 
1997
usage:
 
1998
@example
 
1999
qemu [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
 
2000
@end example
1551
2001
@end table
1552
2002
 
1553
2003
@node host_usb_devices
1637
2087
to provide high security. The password can be fairly easily brute-forced by
1638
2088
a client making repeat connections. For this reason, a VNC server using password
1639
2089
authentication should be restricted to only listen on the loopback interface
1640
 
or UNIX domain sockets. Password ayuthentication is requested with the @code{password}
 
2090
or UNIX domain sockets. Password authentication is requested with the @code{password}
1641
2091
option, and then once QEMU is running the password is set with the monitor. Until
1642
2092
the monitor is used to set the password all clients will be rejected.
1643
2093
 
1847
2297
@code{x/10i $cs*16+$eip} to dump the code at the PC position.
1848
2298
@end enumerate
1849
2299
 
 
2300
Advanced debugging options:
 
2301
 
 
2302
The default single stepping behavior is step with the IRQs and timer service routines off.  It is set this way because when gdb executes a single step it expects to advance beyond the current instruction.  With the IRQs and and timer service routines on, a single step might jump into the one of the interrupt or exception vectors instead of executing the current instruction. This means you may hit the same breakpoint a number of times before executing the instruction gdb wants to have executed.  Because there are rare circumstances where you want to single step into an interrupt vector the behavior can be controlled from GDB.  There are three commands you can query and set the single step behavior:
 
2303
@table @code
 
2304
@item maintenance packet qqemu.sstepbits
 
2305
 
 
2306
This will display the MASK bits used to control the single stepping IE:
 
2307
@example
 
2308
(gdb) maintenance packet qqemu.sstepbits
 
2309
sending: "qqemu.sstepbits"
 
2310
received: "ENABLE=1,NOIRQ=2,NOTIMER=4"
 
2311
@end example
 
2312
@item maintenance packet qqemu.sstep
 
2313
 
 
2314
This will display the current value of the mask used when single stepping IE:
 
2315
@example
 
2316
(gdb) maintenance packet qqemu.sstep
 
2317
sending: "qqemu.sstep"
 
2318
received: "0x7"
 
2319
@end example
 
2320
@item maintenance packet Qqemu.sstep=HEX_VALUE
 
2321
 
 
2322
This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
 
2323
@example
 
2324
(gdb) maintenance packet Qqemu.sstep=0x5
 
2325
sending: "qemu.sstep=0x5"
 
2326
received: "OK"
 
2327
@end example
 
2328
@end table
 
2329
 
1850
2330
@node pcsys_os_specific
1851
2331
@section Target OS specific information
1852
2332
 
1967
2447
 
1968
2448
@itemize @minus
1969
2449
@item
1970
 
UniNorth PCI Bridge
 
2450
UniNorth or Grackle PCI Bridge
1971
2451
@item
1972
2452
PCI VGA compatible card with VESA Bochs Extensions
1973
2453
@item
2004
2484
QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at
2005
2485
@url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}.
2006
2486
 
 
2487
Since version 0.9.1, QEMU uses OpenBIOS @url{http://www.openbios.org/}
 
2488
for the g3beige and mac99 PowerMac machines. OpenBIOS is a free (GPL
 
2489
v2) portable firmware implementation. The goal is to implement a 100%
 
2490
IEEE 1275-1994 (referred to as Open Firmware) compliant firmware.
 
2491
 
2007
2492
@c man begin OPTIONS
2008
2493
 
2009
2494
The following options are specific to the PowerPC emulation:
2014
2499
 
2015
2500
Set the initial VGA graphic mode. The default is 800x600x15.
2016
2501
 
 
2502
@item -prom-env string
 
2503
 
 
2504
Set OpenBIOS variables in NVRAM, for example:
 
2505
 
 
2506
@example
 
2507
qemu-system-ppc -prom-env 'auto-boot?=false' \
 
2508
 -prom-env 'boot-device=hd:2,\yaboot' \
 
2509
 -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
 
2510
@end example
 
2511
 
 
2512
These variables are not used by Open Hack'Ware.
 
2513
 
2017
2514
@end table
2018
2515
 
2019
2516
@c man end
2025
2522
@node Sparc32 System emulator
2026
2523
@section Sparc32 System emulator
2027
2524
 
2028
 
Use the executable @file{qemu-system-sparc} to simulate a SPARCstation
2029
 
5, SPARCstation 10, SPARCstation 20, SPARCserver 600MP (sun4m
2030
 
architecture), SPARCstation 2 (sun4c architecture), SPARCserver 1000,
2031
 
or SPARCcenter 2000 (sun4d architecture). The emulation is somewhat
2032
 
complete.  SMP up to 16 CPUs is supported, but Linux limits the number
2033
 
of usable CPUs to 4.
2034
 
 
2035
 
QEMU emulates the following sun4m/sun4d peripherals:
 
2525
Use the executable @file{qemu-system-sparc} to simulate the following
 
2526
Sun4m architecture machines:
 
2527
@itemize @minus
 
2528
@item
 
2529
SPARCstation 4
 
2530
@item
 
2531
SPARCstation 5
 
2532
@item
 
2533
SPARCstation 10
 
2534
@item
 
2535
SPARCstation 20
 
2536
@item
 
2537
SPARCserver 600MP
 
2538
@item
 
2539
SPARCstation LX
 
2540
@item
 
2541
SPARCstation Voyager
 
2542
@item
 
2543
SPARCclassic
 
2544
@item
 
2545
SPARCbook
 
2546
@end itemize
 
2547
 
 
2548
The emulation is somewhat complete. SMP up to 16 CPUs is supported,
 
2549
but Linux limits the number of usable CPUs to 4.
 
2550
 
 
2551
It's also possible to simulate a SPARCstation 2 (sun4c architecture),
 
2552
SPARCserver 1000, or SPARCcenter 2000 (sun4d architecture), but these
 
2553
emulators are not usable yet.
 
2554
 
 
2555
QEMU emulates the following sun4m/sun4c/sun4d peripherals:
2036
2556
 
2037
2557
@itemize @minus
2038
2558
@item
2042
2562
@item
2043
2563
Lance (Am7990) Ethernet
2044
2564
@item
2045
 
Non Volatile RAM M48T08
 
2565
Non Volatile RAM M48T02/M48T08
2046
2566
@item
2047
2567
Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
2048
2568
and power/reset logic
2064
2584
1275-1994 (referred to as Open Firmware) compliant firmware.
2065
2585
 
2066
2586
A sample Linux 2.6 series kernel and ram disk image are available on
2067
 
the QEMU web site. Please note that currently NetBSD, OpenBSD or
2068
 
Solaris kernels don't work.
 
2587
the QEMU web site. There are still issues with NetBSD and OpenBSD, but
 
2588
some kernel versions work. Please note that currently Solaris kernels
 
2589
don't work probably due to interface issues between OpenBIOS and
 
2590
Solaris.
2069
2591
 
2070
2592
@c man begin OPTIONS
2071
2593
 
2087
2609
 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
2088
2610
@end example
2089
2611
 
2090
 
@item -M [SS-5|SS-10|SS-20|SS-600MP|SS-2|SS-1000|SS-2000]
 
2612
@item -M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic|SPARCbook|SS-2|SS-1000|SS-2000]
2091
2613
 
2092
2614
Set the emulated machine type. Default is SS-5.
2093
2615
 
2098
2620
@node Sparc64 System emulator
2099
2621
@section Sparc64 System emulator
2100
2622
 
2101
 
Use the executable @file{qemu-system-sparc64} to simulate a Sun4u machine.
2102
 
The emulator is not usable for anything yet.
 
2623
Use the executable @file{qemu-system-sparc64} to simulate a Sun4u
 
2624
(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
 
2625
Niagara (T1) machine. The emulator is not usable for anything yet, but
 
2626
it can launch some kernels.
2103
2627
 
2104
 
QEMU emulates the following sun4u peripherals:
 
2628
QEMU emulates the following peripherals:
2105
2629
 
2106
2630
@itemize @minus
2107
2631
@item
2109
2633
@item
2110
2634
PCI VGA compatible card with VESA Bochs Extensions
2111
2635
@item
 
2636
PS/2 mouse and keyboard
 
2637
@item
2112
2638
Non Volatile RAM M48T59
2113
2639
@item
2114
2640
PC-compatible serial ports
 
2641
@item
 
2642
2 PCI IDE interfaces with hard disk and CD-ROM support
 
2643
@item
 
2644
Floppy disk
2115
2645
@end itemize
2116
2646
 
 
2647
@c man begin OPTIONS
 
2648
 
 
2649
The following options are specific to the Sparc64 emulation:
 
2650
 
 
2651
@table @option
 
2652
 
 
2653
@item -prom-env string
 
2654
 
 
2655
Set OpenBIOS variables in NVRAM, for example:
 
2656
 
 
2657
@example
 
2658
qemu-system-sparc64 -prom-env 'auto-boot?=false'
 
2659
@end example
 
2660
 
 
2661
@item -M [sun4u|sun4v|Niagara]
 
2662
 
 
2663
Set the emulated machine type. The default is sun4u.
 
2664
 
 
2665
@end table
 
2666
 
 
2667
@c man end
 
2668
 
2117
2669
@node MIPS System emulator
2118
2670
@section MIPS System emulator
2119
2671
 
2120
2672
Four executables cover simulation of 32 and 64-bit MIPS systems in
2121
2673
both endian options, @file{qemu-system-mips}, @file{qemu-system-mipsel}
2122
2674
@file{qemu-system-mips64} and @file{qemu-system-mips64el}.
2123
 
Four different machine types are emulated:
 
2675
Five different machine types are emulated:
2124
2676
 
2125
2677
@itemize @minus
2126
2678
@item
2131
2683
An ACER Pica "pica61". This machine needs the 64-bit emulator.
2132
2684
@item
2133
2685
MIPS emulator pseudo board "mipssim"
 
2686
@item
 
2687
A MIPS Magnum R4000 machine "magnum". This machine needs the 64-bit emulator.
2134
2688
@end itemize
2135
2689
 
2136
2690
The generic emulation is supported by Debian 'Etch' and is able to
2162
2716
@item
2163
2717
Malta FPGA serial device
2164
2718
@item
2165
 
Cirrus VGA graphics card
 
2719
Cirrus (default) or any other PCI VGA graphics card
2166
2720
@end itemize
2167
2721
 
2168
2722
The ACER Pica emulation supports:
2191
2745
MIPSnet network emulation
2192
2746
@end itemize
2193
2747
 
 
2748
The MIPS Magnum R4000 emulation supports:
 
2749
 
 
2750
@itemize @minus
 
2751
@item
 
2752
MIPS R4000 CPU
 
2753
@item
 
2754
PC-style IRQ controller
 
2755
@item
 
2756
PC Keyboard
 
2757
@item
 
2758
SCSI controller
 
2759
@item
 
2760
G364 framebuffer
 
2761
@end itemize
 
2762
 
 
2763
 
2194
2764
@node ARM System emulator
2195
2765
@section ARM System emulator
2196
2766
 
2320
2890
Three on-chip UARTs
2321
2891
@end itemize
2322
2892
 
 
2893
Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48)
 
2894
emulation supports the following elements:
 
2895
 
 
2896
@itemize @minus
 
2897
@item
 
2898
Texas Instruments OMAP2420 System-on-chip (ARM 1136 core)
 
2899
@item
 
2900
RAM and non-volatile OneNAND Flash memories
 
2901
@item
 
2902
Display connected to EPSON remote framebuffer chip and OMAP on-chip
 
2903
display controller and a LS041y3 MIPI DBI-C controller
 
2904
@item
 
2905
TI TSC2301 (in N800) and TI TSC2005 (in N810) touchscreen controllers
 
2906
driven through SPI bus
 
2907
@item
 
2908
National Semiconductor LM8323-controlled qwerty keyboard driven
 
2909
through I@math{^2}C bus
 
2910
@item
 
2911
Secure Digital card connected to OMAP MMC/SD host
 
2912
@item
 
2913
Three OMAP on-chip UARTs and on-chip STI debugging console
 
2914
@item
 
2915
A Bluetooth(R) transciever and HCI connected to an UART
 
2916
@item
 
2917
Mentor Graphics "Inventra" dual-role USB controller embedded in a TI
 
2918
TUSB6010 chip - only USB host mode is supported
 
2919
@item
 
2920
TI TMP105 temperature sensor driven through I@math{^2}C bus
 
2921
@item
 
2922
TI TWL92230C power management companion with an RTC on I@math{^2}C bus
 
2923
@item
 
2924
Nokia RETU and TAHVO multi-purpose chips with an RTC, connected
 
2925
through CBUS
 
2926
@end itemize
 
2927
 
2323
2928
The Luminary Micro Stellaris LM3S811EVB emulation includes the following
2324
2929
devices:
2325
2930
 
2348
2953
OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI.
2349
2954
@end itemize
2350
2955
 
 
2956
The Freecom MusicPal internet radio emulation includes the following
 
2957
elements:
 
2958
 
 
2959
@itemize @minus
 
2960
@item
 
2961
Marvell MV88W8618 ARM core.
 
2962
@item
 
2963
32 MB RAM, 256 KB SRAM, 8 MB flash.
 
2964
@item
 
2965
Up to 2 16550 UARTs
 
2966
@item
 
2967
MV88W8xx8 Ethernet controller
 
2968
@item
 
2969
MV88W8618 audio controller, WM8750 CODEC and mixer
 
2970
@item
 
2971
128�64 display with brightness control
 
2972
@item
 
2973
2 buttons, 2 navigation wheels with button function
 
2974
@end itemize
 
2975
 
 
2976
The Siemens SX1 models v1 and v2 (default) basic emulation.
 
2977
The emulaton includes the following elements:
 
2978
 
 
2979
@itemize @minus
 
2980
@item
 
2981
Texas Instruments OMAP310 System-on-chip (ARM 925T core)
 
2982
@item
 
2983
ROM and RAM memories (ROM firmware image can be loaded with -pflash)
 
2984
V1
 
2985
1 Flash of 16MB and 1 Flash of 8MB
 
2986
V2
 
2987
1 Flash of 32MB
 
2988
@item
 
2989
On-chip LCD controller
 
2990
@item
 
2991
On-chip Real Time Clock
 
2992
@item
 
2993
Secure Digital card connected to OMAP MMC/SD host
 
2994
@item
 
2995
Three on-chip UARTs
 
2996
@end itemize
 
2997
 
2351
2998
A Linux 2.6 test image is available on the QEMU web site. More
2352
2999
information is available in the QEMU mailing-list archive.
2353
3000
 
 
3001
@c man begin OPTIONS
 
3002
 
 
3003
The following options are specific to the ARM emulation:
 
3004
 
 
3005
@table @option
 
3006
 
 
3007
@item -semihosting
 
3008
Enable semihosting syscall emulation.
 
3009
 
 
3010
On ARM this implements the "Angel" interface.
 
3011
 
 
3012
Note that this allows guest direct access to the host filesystem,
 
3013
so should only be used with trusted guest OS.
 
3014
 
 
3015
@end table
 
3016
 
2354
3017
@node ColdFire System emulator
2355
3018
@section ColdFire System emulator
2356
3019
 
2377
3040
Two on-chip UARTs.
2378
3041
@end itemize
2379
3042
 
 
3043
@c man begin OPTIONS
 
3044
 
 
3045
The following options are specific to the ARM emulation:
 
3046
 
 
3047
@table @option
 
3048
 
 
3049
@item -semihosting
 
3050
Enable semihosting syscall emulation.
 
3051
 
 
3052
On M68K this implements the "ColdFire GDB" interface used by libgloss.
 
3053
 
 
3054
Note that this allows guest direct access to the host filesystem,
 
3055
so should only be used with trusted guest OS.
 
3056
 
 
3057
@end table
 
3058
 
2380
3059
@node QEMU User space emulator
2381
3060
@chapter QEMU User space emulator
2382
3061
 
2384
3063
* Supported Operating Systems ::
2385
3064
* Linux User space emulator::
2386
3065
* Mac OS X/Darwin User space emulator ::
 
3066
* BSD User space emulator ::
2387
3067
@end menu
2388
3068
 
2389
3069
@node Supported Operating Systems
2396
3076
Linux (referred as qemu-linux-user)
2397
3077
@item
2398
3078
Mac OS X/Darwin (referred as qemu-darwin-user)
 
3079
@item
 
3080
BSD (referred as qemu-bsd-user)
2399
3081
@end itemize
2400
3082
 
2401
3083
@node Linux User space emulator
2492
3174
@subsection Command line options
2493
3175
 
2494
3176
@example
2495
 
usage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]
 
3177
usage: qemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] program [arguments...]
2496
3178
@end example
2497
3179
 
2498
3180
@table @option
2502
3184
Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
2503
3185
@item -s size
2504
3186
Set the x86 stack size in bytes (default=524288)
 
3187
@item -cpu model
 
3188
Select CPU model (-cpu ? for list and additional feature selection)
2505
3189
@end table
2506
3190
 
2507
3191
Debug options:
2511
3195
Activate log (logfile=/tmp/qemu.log)
2512
3196
@item -p pagesize
2513
3197
Act as if the host page size was 'pagesize' bytes
 
3198
@item -g port
 
3199
Wait gdb connection to port
2514
3200
@end table
2515
3201
 
2516
3202
Environment variables:
2538
3224
 
2539
3225
The binary format is detected automatically.
2540
3226
 
 
3227
@command{qemu-sparc} can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).
 
3228
 
2541
3229
@command{qemu-sparc32plus} can execute Sparc32 and SPARC32PLUS binaries
2542
3230
(Sparc64 CPU, 32 bit ABI).
2543
3231
 
2629
3317
Act as if the host page size was 'pagesize' bytes
2630
3318
@end table
2631
3319
 
 
3320
@node BSD User space emulator
 
3321
@section BSD User space emulator
 
3322
 
 
3323
@menu
 
3324
* BSD Status::
 
3325
* BSD Quick Start::
 
3326
* BSD Command line options::
 
3327
@end menu
 
3328
 
 
3329
@node BSD Status
 
3330
@subsection BSD Status
 
3331
 
 
3332
@itemize @minus
 
3333
@item
 
3334
target Sparc64 on Sparc64: Some trivial programs work.
 
3335
@end itemize
 
3336
 
 
3337
@node BSD Quick Start
 
3338
@subsection Quick Start
 
3339
 
 
3340
In order to launch a BSD process, QEMU needs the process executable
 
3341
itself and all the target dynamic libraries used by it.
 
3342
 
 
3343
@itemize
 
3344
 
 
3345
@item On Sparc64, you can just try to launch any process by using the native
 
3346
libraries:
 
3347
 
 
3348
@example
 
3349
qemu-sparc64 /bin/ls
 
3350
@end example
 
3351
 
 
3352
@end itemize
 
3353
 
 
3354
@node BSD Command line options
 
3355
@subsection Command line options
 
3356
 
 
3357
@example
 
3358
usage: qemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]
 
3359
@end example
 
3360
 
 
3361
@table @option
 
3362
@item -h
 
3363
Print the help
 
3364
@item -L path
 
3365
Set the library root path (default=/)
 
3366
@item -s size
 
3367
Set the stack size in bytes (default=524288)
 
3368
@item -bsd type
 
3369
Set the type of the emulated BSD Operating system. Valid values are
 
3370
FreeBSD, NetBSD and OpenBSD (default).
 
3371
@end table
 
3372
 
 
3373
Debug options:
 
3374
 
 
3375
@table @option
 
3376
@item -d
 
3377
Activate log (logfile=/tmp/qemu.log)
 
3378
@item -p pagesize
 
3379
Act as if the host page size was 'pagesize' bytes
 
3380
@end table
 
3381
 
2632
3382
@node compilation
2633
3383
@chapter Compilation from the sources
2634
3384