~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to qemu-doc.texi

  • Committer: ths
  • Date: 2007-10-08 12:45:38 UTC
  • Revision ID: git-v1:450d4ff553af32fc9d83fef20d7106b0151526b8
CRIS disassembler, originally from binutils, by Edgar E. Iglesias.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3356 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
@item PREP (PowerPC processor)
75
75
@item G3 BW PowerMac (PowerPC processor)
76
76
@item Mac99 PowerMac (PowerPC processor, in progress)
77
 
@item Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
78
 
@item Sun4u/Sun4v (64-bit Sparc processor, in progress)
79
 
@item Malta board (32-bit and 64-bit MIPS processors)
80
 
@item MIPS Magnum (64-bit MIPS processor)
81
 
@item ARM Integrator/CP (ARM)
82
 
@item ARM Versatile baseboard (ARM)
83
 
@item ARM RealView Emulation baseboard (ARM)
 
77
@item Sun4m (32-bit Sparc processor)
 
78
@item Sun4u (64-bit Sparc processor, in progress)
 
79
@item Malta board (32-bit MIPS processor)
 
80
@item ARM Integrator/CP (ARM926E, 1026E or 946E processor)
 
81
@item ARM Versatile baseboard (ARM926E)
 
82
@item ARM RealView Emulation baseboard (ARM926EJ-S)
84
83
@item Spitz, Akita, Borzoi and Terrier PDAs (PXA270 processor)
85
 
@item Luminary Micro LM3S811EVB (ARM Cortex-M3)
86
 
@item Luminary Micro LM3S6965EVB (ARM Cortex-M3)
87
84
@item Freescale MCF5208EVB (ColdFire V2).
88
85
@item Arnewsh MCF5206 evaluation board (ColdFire V2).
89
 
@item Palm Tungsten|E PDA (OMAP310 processor)
90
 
@item N800 and N810 tablets (OMAP2420 processor)
91
 
@item MusicPal (MV88W8618 ARM processor)
92
86
@end itemize
93
87
 
94
 
For user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.
 
88
For user emulation, x86, PowerPC, ARM, MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.
95
89
 
96
90
@node Installation
97
91
@chapter Installation
169
163
@item
170
164
ENSONIQ AudioPCI ES1370 sound card
171
165
@item
172
 
Intel 82801AA AC97 Audio compatible sound card
173
 
@item
174
166
Adlib(OPL2) - Yamaha YM3812 compatible chip
175
167
@item
176
 
Gravis Ultrasound GF1 sound card
177
 
@item
178
 
CS4231A compatible sound card
179
 
@item
180
168
PCI UHCI USB controller and a virtual USB hub.
181
169
@end itemize
182
170
 
183
171
SMP is supported with up to 255 CPUs.
184
172
 
185
 
Note that adlib, ac97, gus and cs4231a are only available when QEMU
186
 
was configured with --audio-card-list option containing the name(s) of
187
 
required card(s).
 
173
Note that adlib is only available when QEMU was configured with
 
174
-enable-adlib
188
175
 
189
176
QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
190
177
VGA BIOS.
191
178
 
192
179
QEMU uses YM3812 emulation by Tatsuyuki Satoh.
193
180
 
194
 
QEMU uses GUS emulation(GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
195
 
by Tibor "TS" Schütz.
196
 
 
197
 
CS4231A is the chip used in Windows Sound System and GUSMAX products
198
 
 
199
181
@c man end
200
182
 
201
183
@node pcsys_quickstart
214
196
 
215
197
@example
216
198
@c man begin SYNOPSIS
217
 
usage: qemu [options] [@var{disk_image}]
 
199
usage: qemu [options] [disk_image]
218
200
@c man end
219
201
@end example
220
202
 
223
205
 
224
206
General options:
225
207
@table @option
226
 
@item -M @var{machine}
227
 
Select the emulated @var{machine} (@code{-M ?} for list)
 
208
@item -M machine
 
209
Select the emulated machine (@code{-M ?} for list)
228
210
 
229
 
@item -fda @var{file}
230
 
@item -fdb @var{file}
 
211
@item -fda file
 
212
@item -fdb file
231
213
Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can
232
214
use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}).
233
215
 
234
 
@item -hda @var{file}
235
 
@item -hdb @var{file}
236
 
@item -hdc @var{file}
237
 
@item -hdd @var{file}
 
216
@item -hda file
 
217
@item -hdb file
 
218
@item -hdc file
 
219
@item -hdd file
238
220
Use @var{file} as hard disk 0, 1, 2 or 3 image (@pxref{disk_images}).
239
221
 
240
 
@item -cdrom @var{file}
241
 
Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and
 
222
@item -cdrom file
 
223
Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and and
242
224
@option{-cdrom} at the same time). You can use the host CD-ROM by
243
225
using @file{/dev/cdrom} as filename (@pxref{host_drives}).
244
226
 
245
 
@item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
246
 
 
247
 
Define a new drive. Valid options are:
248
 
 
249
 
@table @code
250
 
@item file=@var{file}
251
 
This option defines which disk image (@pxref{disk_images}) to use with
252
 
this drive. If the filename contains comma, you must double it
253
 
(for instance, "file=my,,file" to use file "my,file").
254
 
@item if=@var{interface}
255
 
This option defines on which type on interface the drive is connected.
256
 
Available types are: ide, scsi, sd, mtd, floppy, pflash.
257
 
@item bus=@var{bus},unit=@var{unit}
258
 
These options define where is connected the drive by defining the bus number and
259
 
the unit id.
260
 
@item index=@var{index}
261
 
This option defines where is connected the drive by using an index in the list
262
 
of available connectors of a given interface type.
263
 
@item media=@var{media}
264
 
This option defines the type of the media: disk or cdrom.
265
 
@item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]
266
 
These options have the same definition as they have in @option{-hdachs}.
267
 
@item snapshot=@var{snapshot}
268
 
@var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}).
269
 
@item cache=@var{cache}
270
 
@var{cache} is "none", "writeback", or "writethrough" and controls how the host cache is used to access block data.
271
 
@item format=@var{format}
272
 
Specify which disk @var{format} will be used rather than detecting
273
 
the format.  Can be used to specifiy format=raw to avoid interpreting
274
 
an untrusted format header.
275
 
@end table
276
 
 
277
 
By default, writethrough caching is used for all block device.  This means that
278
 
the host page cache will be used to read and write data but write notification
279
 
will be sent to the guest only when the data has been reported as written by
280
 
the storage subsystem.
281
 
 
282
 
Writeback caching will report data writes as completed as soon as the data is
283
 
present in the host page cache.  This is safe as long as you trust your host.
284
 
If your host crashes or loses power, then the guest may experience data
285
 
corruption.  When using the @option{-snapshot} option, writeback caching is
286
 
used by default.
287
 
 
288
 
The host page can be avoided entirely with @option{cache=none}.  This will
289
 
attempt to do disk IO directly to the guests memory.  QEMU may still perform
290
 
an internal copy of the data.
291
 
 
292
 
Instead of @option{-cdrom} you can use:
293
 
@example
294
 
qemu -drive file=file,index=2,media=cdrom
295
 
@end example
296
 
 
297
 
Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
298
 
use:
299
 
@example
300
 
qemu -drive file=file,index=0,media=disk
301
 
qemu -drive file=file,index=1,media=disk
302
 
qemu -drive file=file,index=2,media=disk
303
 
qemu -drive file=file,index=3,media=disk
304
 
@end example
305
 
 
306
 
You can connect a CDROM to the slave of ide0:
307
 
@example
308
 
qemu -drive file=file,if=ide,index=1,media=cdrom
309
 
@end example
310
 
 
311
 
If you don't specify the "file=" argument, you define an empty drive:
312
 
@example
313
 
qemu -drive if=ide,index=1,media=cdrom
314
 
@end example
315
 
 
316
 
You can connect a SCSI disk with unit ID 6 on the bus #0:
317
 
@example
318
 
qemu -drive file=file,if=scsi,bus=0,unit=6
319
 
@end example
320
 
 
321
 
Instead of @option{-fda}, @option{-fdb}, you can use:
322
 
@example
323
 
qemu -drive file=file,index=0,if=floppy
324
 
qemu -drive file=file,index=1,if=floppy
325
 
@end example
326
 
 
327
 
By default, @var{interface} is "ide" and @var{index} is automatically
328
 
incremented:
329
 
@example
330
 
qemu -drive file=a -drive file=b"
331
 
@end example
332
 
is interpreted like:
333
 
@example
334
 
qemu -hda a -hdb b
335
 
@end example
336
 
 
337
227
@item -boot [a|c|d|n]
338
228
Boot on floppy (a), hard disk (c), CD-ROM (d), or Etherboot (n). Hard disk boot
339
229
is the default.
347
237
Disable boot signature checking for floppy disks in Bochs BIOS. It may
348
238
be needed to boot from old floppy disks.
349
239
 
350
 
@item -m @var{megs}
351
 
Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
352
 
a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
353
 
gigabytes respectively.
354
 
 
355
 
@item -cpu @var{model}
356
 
Select CPU model (-cpu ? for list and additional feature selection)
357
 
 
358
 
@item -smp @var{n}
 
240
@item -m megs
 
241
Set virtual RAM size to @var{megs} megabytes. Default is 128 MB.
 
242
 
 
243
@item -smp n
359
244
Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
360
 
CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
361
 
to 4.
 
245
CPUs are supported.
362
246
 
363
247
@item -audio-help
364
248
 
365
249
Will show the audio subsystem help: list of drivers, tunable
366
250
parameters.
367
251
 
368
 
@item -soundhw @var{card1}[,@var{card2},...] or -soundhw all
 
252
@item -soundhw card1,card2,... or -soundhw all
369
253
 
370
254
Enable audio and selected sound hardware. Use ? to print all
371
255
available sound hardware.
373
257
@example
374
258
qemu -soundhw sb16,adlib hda
375
259
qemu -soundhw es1370 hda
376
 
qemu -soundhw ac97 hda
377
260
qemu -soundhw all hda
378
261
qemu -soundhw ?
379
262
@end example
380
263
 
381
 
Note that Linux's i810_audio OSS kernel (for AC97) module might
382
 
require manually specifying clocking.
383
 
 
384
 
@example
385
 
modprobe i810_audio clocking=48000
386
 
@end example
387
 
 
388
264
@item -localtime
389
265
Set the real time clock to local time (the default is to UTC
390
266
time). This option is needed to have correct date in MS-DOS or
391
267
Windows.
392
268
 
393
 
@item -startdate @var{date}
394
 
Set the initial date of the real time clock. Valid format for
395
 
@var{date} are: @code{now} or @code{2006-06-17T16:01:21} or
396
 
@code{2006-06-17}. The default value is @code{now}.
397
 
 
398
 
@item -pidfile @var{file}
 
269
@item -pidfile file
399
270
Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
400
271
from a script.
401
272
 
410
281
Windows 2000 is installed, you no longer need this option (this option
411
282
slows down the IDE transfers).
412
283
 
413
 
@item -option-rom @var{file}
414
 
Load the contents of @var{file} as an option ROM.
415
 
This option is useful to load things like EtherBoot.
 
284
@item -option-rom file
 
285
Load the contents of file as an option ROM.  This option is useful to load
 
286
things like EtherBoot.
416
287
 
417
 
@item -name @var{name}
418
 
Sets the @var{name} of the guest.
419
 
This name will be display in the SDL window caption.
420
 
The @var{name} will also be used for the VNC server.
 
288
@item -name string
 
289
Sets the name of the guest.  This name will be display in the SDL window
 
290
caption.  The name will also be used for the VNC server.
421
291
 
422
292
@end table
423
293
 
432
302
the console. Therefore, you can still use QEMU to debug a Linux kernel
433
303
with a serial console.
434
304
 
435
 
@item -curses
436
 
 
437
 
Normally, QEMU uses SDL to display the VGA output.  With this option,
438
 
QEMU can display the VGA output when in text mode using a 
439
 
curses/ncurses interface.  Nothing is displayed in graphical mode.
440
 
 
441
305
@item -no-frame
442
306
 
443
307
Do not use decorations for SDL windows and start them using the whole
444
308
available screen space. This makes the using QEMU in a dedicated desktop
445
309
workspace more convenient.
446
310
 
447
 
@item -no-quit
448
 
 
449
 
Disable SDL window close capability.
450
 
 
451
311
@item -full-screen
452
312
Start in full screen.
453
313
 
454
 
@item -vnc @var{display}[,@var{option}[,@var{option}[,...]]]
 
314
@item -vnc display[,option[,option[,...]]]
455
315
 
456
316
Normally, QEMU uses SDL to display the VGA output.  With this option,
457
317
you can have QEMU listen on VNC display @var{display} and redirect the VGA
463
323
 
464
324
@table @code
465
325
 
466
 
@item @var{host}:@var{d}
467
 
 
468
 
TCP connections will only be allowed from @var{host} on display @var{d}.
469
 
By convention the TCP port is 5900+@var{d}. Optionally, @var{host} can
470
 
be omitted in which case the server will accept connections from any host.
471
 
 
472
 
@item @code{unix}:@var{path}
 
326
@item @var{interface:d}
 
327
 
 
328
TCP connections will only be allowed from @var{interface} on display @var{d}.
 
329
By convention the TCP port is 5900+@var{d}. Optionally, @var{interface} can
 
330
be omitted in which case the server will bind to all interfaces.
 
331
 
 
332
@item @var{unix:path}
473
333
 
474
334
Connections will be allowed over UNIX domain sockets where @var{path} is the
475
335
location of a unix socket to listen for connections on.
476
336
 
477
 
@item none
 
337
@item @var{none}
478
338
 
479
 
VNC is initialized but not started. The monitor @code{change} command
480
 
can be used to later start the VNC server.
 
339
VNC is initialized by not started. The monitor @code{change} command can be used
 
340
to later start the VNC server.
481
341
 
482
342
@end table
483
343
 
486
346
 
487
347
@table @code
488
348
 
489
 
@item reverse
490
 
 
491
 
Connect to a listening VNC client via a ``reverse'' connection. The
492
 
client is specified by the @var{display}. For reverse network
493
 
connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
494
 
is a TCP port number, not a display number.
495
 
 
496
 
@item password
 
349
@item @var{password}
497
350
 
498
351
Require that password based authentication is used for client connections.
499
352
The password must be set separately using the @code{change} command in the
500
353
@ref{pcsys_monitor}
501
354
 
502
 
@item tls
 
355
@item @var{tls}
503
356
 
504
357
Require that client use TLS when communicating with the VNC server. This
505
358
uses anonymous TLS credentials so is susceptible to a man-in-the-middle
506
359
attack. It is recommended that this option be combined with either the
507
360
@var{x509} or @var{x509verify} options.
508
361
 
509
 
@item x509=@var{/path/to/certificate/dir}
 
362
@item @var{x509=/path/to/certificate/dir}
510
363
 
511
 
Valid if @option{tls} is specified. Require that x509 credentials are used
 
364
Valid if @var{tls} is specified. Require that x509 credentials are used
512
365
for negotiating the TLS session. The server will send its x509 certificate
513
366
to the client. It is recommended that a password be set on the VNC server
514
367
to provide authentication of the client when this is used. The path following
515
368
this option specifies where the x509 certificates are to be loaded from.
516
369
See the @ref{vnc_security} section for details on generating certificates.
517
370
 
518
 
@item x509verify=@var{/path/to/certificate/dir}
 
371
@item @var{x509verify=/path/to/certificate/dir}
519
372
 
520
 
Valid if @option{tls} is specified. Require that x509 credentials are used
 
373
Valid if @var{tls} is specified. Require that x509 credentials are used
521
374
for negotiating the TLS session. The server will send its x509 certificate
522
375
to the client, and request that the client send its own x509 certificate.
523
376
The server will validate the client's certificate against the CA certificate,
530
383
 
531
384
@end table
532
385
 
533
 
@item -k @var{language}
 
386
@item -k language
534
387
 
535
388
Use keyboard layout @var{language} (for example @code{fr} for
536
389
French). This option is only needed where it is not easy to get raw PC
555
408
@item -usb
556
409
Enable the USB driver (will be the default soon)
557
410
 
558
 
@item -usbdevice @var{devname}
 
411
@item -usbdevice devname
559
412
Add the USB device @var{devname}. @xref{usb_devices}.
560
 
 
561
 
@table @code
562
 
 
563
 
@item mouse
564
 
Virtual Mouse. This will override the PS/2 mouse emulation when activated.
565
 
 
566
 
@item tablet
567
 
Pointer device that uses absolute coordinates (like a touchscreen). This
568
 
means qemu is able to report the mouse position without having to grab the
569
 
mouse. Also overrides the PS/2 mouse emulation when activated.
570
 
 
571
 
@item disk:[format=@var{format}]:file
572
 
Mass storage device based on file. The optional @var{format} argument
573
 
will be used rather than detecting the format. Can be used to specifiy
574
 
format=raw to avoid interpreting an untrusted format header.
575
 
 
576
 
@item host:bus.addr
577
 
Pass through the host device identified by bus.addr (Linux only).
578
 
 
579
 
@item host:vendor_id:product_id
580
 
Pass through the host device identified by vendor_id:product_id (Linux only).
581
 
 
582
 
@item serial:[vendorid=@var{vendor_id}][,productid=@var{product_id}]:@var{dev}
583
 
Serial converter to host character device @var{dev}, see @code{-serial} for the
584
 
available devices.
585
 
 
586
 
@item braille
587
 
Braille device.  This will use BrlAPI to display the braille output on a real
588
 
or fake device.
589
 
 
590
 
@item net:options
591
 
Network adapter that supports CDC ethernet and RNDIS protocols.
592
 
 
593
 
@end table
594
 
 
595
413
@end table
596
414
 
597
415
Network options:
598
416
 
599
417
@table @option
600
418
 
601
 
@item -net nic[,vlan=@var{n}][,macaddr=@var{addr}][,model=@var{type}]
 
419
@item -net nic[,vlan=n][,macaddr=addr][,model=type]
602
420
Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
603
421
= 0 is the default). The NIC is an ne2k_pci by default on the PC
604
422
target. Optionally, the MAC address can be changed. If no
607
425
Valid values for @var{type} are
608
426
@code{i82551}, @code{i82557b}, @code{i82559er},
609
427
@code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
610
 
@code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
 
428
@code{smc91c111}, @code{lance} and @code{mcf_fec}.
611
429
Not all devices are supported on all targets.  Use -net nic,model=?
612
430
for a list of available devices for your target.
613
431
 
614
 
@item -net user[,vlan=@var{n}][,hostname=@var{name}]
 
432
@item -net user[,vlan=n][,hostname=name]
615
433
Use the user mode network stack which requires no administrator
616
434
privilege to run.  @option{hostname=name} can be used to specify the client
617
435
hostname reported by the builtin DHCP server.
618
436
 
619
 
@item -net tap[,vlan=@var{n}][,fd=@var{h}][,ifname=@var{name}][,script=@var{file}]
 
437
@item -net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
620
438
Connect the host TAP network interface @var{name} to VLAN @var{n} and
621
439
use the network script @var{file} to configure it. The default
622
440
network script is @file{/etc/qemu-ifup}. Use @option{script=no} to
623
441
disable script execution. If @var{name} is not
624
 
provided, the OS automatically provides one. @option{fd}=@var{h} can be
 
442
provided, the OS automatically provides one.  @option{fd=h} can be
625
443
used to specify the handle of an already opened host TAP interface. Example:
626
444
 
627
445
@example
635
453
@end example
636
454
 
637
455
 
638
 
@item -net socket[,vlan=@var{n}][,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
 
456
@item -net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port]
639
457
 
640
458
Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
641
459
machine using a TCP socket connection. If @option{listen} is
642
460
specified, QEMU waits for incoming connections on @var{port}
643
461
(@var{host} is optional). @option{connect} is used to connect to
644
 
another QEMU instance using the @option{listen} option. @option{fd}=@var{h}
 
462
another QEMU instance using the @option{listen} option. @option{fd=h}
645
463
specifies an already opened TCP socket.
646
464
 
647
465
Example:
655
473
               -net socket,connect=127.0.0.1:1234
656
474
@end example
657
475
 
658
 
@item -net socket[,vlan=@var{n}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}]
 
476
@item -net socket[,vlan=n][,fd=h][,mcast=maddr:port]
659
477
 
660
478
Create a VLAN @var{n} shared with another QEMU virtual
661
479
machines using a UDP multicast socket, effectively making a bus for
695
513
/path/to/linux ubd0=/path/to/root_fs eth0=mcast
696
514
@end example
697
515
 
698
 
@item -net vde[,vlan=@var{n}][,sock=@var{socketpath}][,port=@var{n}][,group=@var{groupname}][,mode=@var{octalmode}]
699
 
Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
700
 
listening for incoming connections on @var{socketpath}. Use GROUP @var{groupname}
701
 
and MODE @var{octalmode} to change default ownership and permissions for
702
 
communication port. This option is available only if QEMU has been compiled
703
 
with vde support enabled.
704
 
 
705
 
Example:
706
 
@example
707
 
# launch vde switch
708
 
vde_switch -F -sock /tmp/myswitch
709
 
# launch QEMU instance
710
 
qemu linux.img -net nic -net vde,sock=/tmp/myswitch
711
 
@end example
712
 
 
713
516
@item -net none
714
517
Indicate that no network devices should be configured. It is used to
715
518
override the default configuration (@option{-net nic -net user}) which
716
519
is activated if no @option{-net} options are provided.
717
520
 
718
 
@item -tftp @var{dir}
 
521
@item -tftp dir
719
522
When using the user mode network stack, activate a built-in TFTP
720
523
server. The files in @var{dir} will be exposed as the root of a TFTP server.
721
524
The TFTP client on the guest must be configured in binary mode (use the command
722
525
@code{bin} of the Unix TFTP client). The host IP address on the guest is as
723
526
usual 10.0.2.2.
724
527
 
725
 
@item -bootp @var{file}
 
528
@item -bootp file
726
529
When using the user mode network stack, broadcast @var{file} as the BOOTP
727
530
filename.  In conjunction with @option{-tftp}, this can be used to network boot
728
531
a guest from a local directory.
732
535
qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0
733
536
@end example
734
537
 
735
 
@item -smb @var{dir}
 
538
@item -smb dir
736
539
When using the user mode network stack, activate a built-in SMB
737
 
server so that Windows OSes can access to the host files in @file{@var{dir}}
 
540
server so that Windows OSes can access to the host files in @file{dir}
738
541
transparently.
739
542
 
740
543
In the guest Windows OS, the line:
744
547
must be added in the file @file{C:\WINDOWS\LMHOSTS} (for windows 9x/Me)
745
548
or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000).
746
549
 
747
 
Then @file{@var{dir}} can be accessed in @file{\\smbserver\qemu}.
 
550
Then @file{dir} can be accessed in @file{\\smbserver\qemu}.
748
551
 
749
552
Note that a SAMBA server must be installed on the host OS in
750
553
@file{/usr/sbin/smbd}. QEMU was tested successfully with smbd version
751
554
2.2.7a from the Red Hat 9 and version 3.0.10-1.fc3 from Fedora Core 3.
752
555
 
753
 
@item -redir [tcp|udp]:@var{host-port}:[@var{guest-host}]:@var{guest-port}
 
556
@item -redir [tcp|udp]:host-port:[guest-host]:guest-port
754
557
 
755
558
When using the user mode network stack, redirect incoming TCP or UDP
756
559
connections to the host port @var{host-port} to the guest
782
585
 
783
586
@end table
784
587
 
785
 
Bluetooth(R) options:
786
 
@table @option
787
 
 
788
 
@item -bt hci[...]
789
 
Defines the function of the corresponding Bluetooth HCI.  -bt options
790
 
are matched with the HCIs present in the chosen machine type.  For
791
 
example when emulating a machine with only one HCI built into it, only
792
 
the first @code{-bt hci[...]} option is valid and defines the HCI's
793
 
logic.  The Transport Layer is decided by the machine type.  Currently
794
 
the machines @code{n800} and @code{n810} have one HCI and all other
795
 
machines have none.
796
 
 
797
 
@anchor{bt-hcis}
798
 
The following three types are recognized:
799
 
 
800
 
@table @code
801
 
@item -bt hci,null
802
 
(default) The corresponding Bluetooth HCI assumes no internal logic
803
 
and will not respond to any HCI commands or emit events.
804
 
 
805
 
@item -bt hci,host[:@var{id}]
806
 
(@code{bluez} only) The corresponding HCI passes commands / events
807
 
to / from the physical HCI identified by the name @var{id} (default:
808
 
@code{hci0}) on the computer running QEMU.  Only available on @code{bluez}
809
 
capable systems like Linux.
810
 
 
811
 
@item -bt hci[,vlan=@var{n}]
812
 
Add a virtual, standard HCI that will participate in the Bluetooth
813
 
scatternet @var{n} (default @code{0}).  Similarly to @option{-net}
814
 
VLANs, devices inside a bluetooth network @var{n} can only communicate
815
 
with other devices in the same network (scatternet).
816
 
@end table
817
 
 
818
 
@item -bt vhci[,vlan=@var{n}]
819
 
(Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
820
 
to the host bluetooth stack instead of to the emulated target.  This
821
 
allows the host and target machines to participate in a common scatternet
822
 
and communicate.  Requires the Linux @code{vhci} driver installed.  Can
823
 
be used as following:
824
 
 
825
 
@example
826
 
qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
827
 
@end example
828
 
 
829
 
@item -bt device:@var{dev}[,vlan=@var{n}]
830
 
Emulate a bluetooth device @var{dev} and place it in network @var{n}
831
 
(default @code{0}).  QEMU can only emulate one type of bluetooth devices
832
 
currently:
833
 
 
834
 
@table @code
835
 
@item keyboard
836
 
Virtual wireless keyboard implementing the HIDP bluetooth profile.
837
 
@end table
838
 
 
839
 
@end table
840
 
 
841
588
Linux boot specific: When using these options, you can use a given
842
589
Linux kernel without installing it in the disk image. It can be useful
843
590
for easier testing of various kernels.
844
591
 
845
592
@table @option
846
593
 
847
 
@item -kernel @var{bzImage}
 
594
@item -kernel bzImage
848
595
Use @var{bzImage} as kernel image.
849
596
 
850
 
@item -append @var{cmdline}
 
597
@item -append cmdline
851
598
Use @var{cmdline} as kernel command line
852
599
 
853
 
@item -initrd @var{file}
 
600
@item -initrd file
854
601
Use @var{file} as initial ram disk.
855
602
 
856
603
@end table
858
605
Debug/Expert options:
859
606
@table @option
860
607
 
861
 
@item -serial @var{dev}
 
608
@item -serial dev
862
609
Redirect the virtual serial port to host character device
863
610
@var{dev}. The default device is @code{vc} in graphical mode and
864
611
@code{stdio} in non graphical mode.
888
635
@item /dev/XXX
889
636
[Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
890
637
parameters are set according to the emulated ones.
891
 
@item /dev/parport@var{N}
 
638
@item /dev/parportN
892
639
[Linux only, parallel port only] Use host parallel port
893
640
@var{N}. Currently SPP and EPP parallel port features can be used.
894
 
@item file:@var{filename}
895
 
Write output to @var{filename}. No character can be read.
 
641
@item file:filename
 
642
Write output to filename. No character can be read.
896
643
@item stdio
897
644
[Unix only] standard input/output
898
 
@item pipe:@var{filename}
 
645
@item pipe:filename
899
646
name pipe @var{filename}
900
 
@item COM@var{n}
 
647
@item COMn
901
648
[Windows only] Use host serial port @var{n}
902
 
@item udp:[@var{remote_host}]:@var{remote_port}[@@[@var{src_ip}]:@var{src_port}]
903
 
This implements UDP Net Console.
904
 
When @var{remote_host} or @var{src_ip} are not specified
905
 
they default to @code{0.0.0.0}.
906
 
When not using a specified @var{src_port} a random port is automatically chosen.
 
649
@item udp:[remote_host]:remote_port[@@[src_ip]:src_port]
 
650
This implements UDP Net Console.  When @var{remote_host} or @var{src_ip} are not specified they default to @code{0.0.0.0}.  When not using a specified @var{src_port} a random port is automatically chosen.
907
651
 
908
652
If you just want a simple readonly console you can use @code{netcat} or
909
653
@code{nc}, by starting qemu with: @code{-serial udp::4555} and nc as:
929
673
@end table
930
674
 
931
675
 
932
 
@item tcp:[@var{host}]:@var{port}[,@var{server}][,nowait][,nodelay]
 
676
@item tcp:[host]:port[,server][,nowait][,nodelay]
933
677
The TCP Net Console has two modes of operation.  It can send the serial
934
678
I/O to a location or wait for a connection from a location.  By default
935
679
the TCP Net Console is sent to @var{host} at the @var{port}.  If you use
948
692
-serial tcp:192.168.0.100:4444,server,nowait
949
693
@end table
950
694
 
951
 
@item telnet:@var{host}:@var{port}[,server][,nowait][,nodelay]
 
695
@item telnet:host:port[,server][,nowait][,nodelay]
952
696
The telnet protocol is used instead of raw tcp sockets.  The options
953
697
work the same as if you had specified @code{-serial tcp}.  The
954
698
difference is that the port acts like a telnet server or client using
957
701
sequence.  Typically in unix telnet you do it with Control-] and then
958
702
type "send break" followed by pressing the enter key.
959
703
 
960
 
@item unix:@var{path}[,server][,nowait]
 
704
@item unix:path[,server][,nowait]
961
705
A unix domain socket is used instead of a tcp socket.  The option works the
962
706
same as if you had specified @code{-serial tcp} except the unix domain socket
963
707
@var{path} is used for connections.
964
708
 
965
 
@item mon:@var{dev_string}
 
709
@item mon:dev_string
966
710
This is a special option to allow the monitor to be multiplexed onto
967
711
another serial port.  The monitor is accessed with key sequence of
968
712
@key{Control-a} and then pressing @key{c}. See monitor access
974
718
@item -serial mon:telnet::4444,server,nowait
975
719
@end table
976
720
 
977
 
@item braille
978
 
Braille device.  This will use BrlAPI to display the braille output on a real
979
 
or fake device.
980
 
 
981
721
@end table
982
722
 
983
 
@item -parallel @var{dev}
 
723
@item -parallel dev
984
724
Redirect the virtual parallel port to host device @var{dev} (same
985
725
devices as the serial port). On Linux hosts, @file{/dev/parportN} can
986
726
be used to use hardware devices connected on the corresponding host
991
731
 
992
732
Use @code{-parallel none} to disable all parallel ports.
993
733
 
994
 
@item -monitor @var{dev}
 
734
@item -monitor dev
995
735
Redirect the monitor to host device @var{dev} (same devices as the
996
736
serial port).
997
737
The default device is @code{vc} in graphical mode and @code{stdio} in
1012
752
 
1013
753
@item -s
1014
754
Wait gdb connection to port 1234 (@pxref{gdb_usage}).
1015
 
@item -p @var{port}
 
755
@item -p port
1016
756
Change gdb connection port.  @var{port} can be either a decimal number
1017
757
to specify a TCP port, or a host device (same devices as the serial port).
1018
758
@item -S
1019
759
Do not start CPU at startup (you must type 'c' in the monitor).
1020
760
@item -d
1021
761
Output log in /tmp/qemu.log
1022
 
@item -hdachs @var{c},@var{h},@var{s},[,@var{t}]
 
762
@item -hdachs c,h,s,[,t]
1023
763
Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
1024
764
@var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
1025
765
translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
1029
769
@item -L path
1030
770
Set the directory for the BIOS, VGA BIOS and keymaps.
1031
771
 
1032
 
@item -vga @var{type}
1033
 
Select type of VGA card to emulate. Valid values for @var{type} are
1034
 
@table @code
1035
 
@item cirrus
1036
 
Cirrus Logic GD5446 Video card. All Windows versions starting from
1037
 
Windows 95 should recognize and use this graphic card. For optimal
1038
 
performances, use 16 bit color depth in the guest and the host OS.
1039
 
(This one is the default)
1040
 
@item std
1041
 
Standard VGA card with Bochs VBE extensions.  If your guest OS
1042
 
supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
1043
 
to use high resolution modes (>= 1280x1024x16) then you should use
1044
 
this option.
1045
 
@item vmware
1046
 
VMWare SVGA-II compatible adapter. Use it if you have sufficiently
1047
 
recent XFree86/XOrg server or Windows guest with a driver for this
1048
 
card.
1049
 
@end table
 
772
@item -std-vga
 
773
Simulate a standard VGA card with Bochs VBE extensions (default is
 
774
Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0
 
775
VBE extensions (e.g. Windows XP) and if you want to use high
 
776
resolution modes (>= 1280x1024x16) then you should use this option.
1050
777
 
1051
778
@item -no-acpi
1052
779
Disable ACPI (Advanced Configuration and Power Interface) support. Use
1056
783
@item -no-reboot
1057
784
Exit instead of rebooting.
1058
785
 
1059
 
@item -no-shutdown
1060
 
Don't exit QEMU on guest shutdown, but instead only stop the emulation.
1061
 
This allows for instance switching to monitor to commit changes to the
1062
 
disk image.
1063
 
 
1064
786
@item -loadvm file
1065
787
Start right away with a saved state (@code{loadvm} in monitor)
1066
788
 
1072
794
 
1073
795
Note that this allows guest direct access to the host filesystem,
1074
796
so should only be used with trusted guest OS.
1075
 
 
1076
 
@item -icount [N|auto]
1077
 
Enable virtual instruction counter.  The virtual cpu will execute one
1078
 
instruction every 2^N ns of virtual time.  If @code{auto} is specified
1079
 
then the virtual cpu speed will be automatically adjusted to keep virtual
1080
 
time within a few seconds of real time.
1081
 
 
1082
 
Note that while this option can give deterministic behavior, it does not
1083
 
provide cycle accurate emulation.  Modern CPUs contain superscalar out of
1084
 
order cores with complex cache hierarchies.  The number of instructions
1085
 
executed often has little or no correlation with actual performance.
1086
797
@end table
1087
798
 
1088
799
@c man end
1159
870
 
1160
871
@item
1161
872
Remove or insert removable media images
1162
 
(such as CD-ROM or floppies).
 
873
(such as CD-ROM or floppies)
1163
874
 
1164
875
@item
1165
876
Freeze/unfreeze the Virtual Machine (VM) and save or restore its state
1175
886
 
1176
887
@table @option
1177
888
 
1178
 
@item help or ? [@var{cmd}]
 
889
@item help or ? [cmd]
1179
890
Show the help for all commands or just for command @var{cmd}.
1180
891
 
1181
892
@item commit
1182
 
Commit changes to the disk images (if -snapshot is used).
 
893
Commit changes to the disk images (if -snapshot is used)
1183
894
 
1184
 
@item info @var{subcommand}
1185
 
Show various information about the system state.
 
895
@item info subcommand
 
896
show various information about the system state
1186
897
 
1187
898
@table @option
1188
899
@item info network
1210
921
@item q or quit
1211
922
Quit the emulator.
1212
923
 
1213
 
@item eject [-f] @var{device}
 
924
@item eject [-f] device
1214
925
Eject a removable medium (use -f to force it).
1215
926
 
1216
 
@item change @var{device} @var{setting}
 
927
@item change device setting
1217
928
 
1218
 
Change the configuration of a device.
 
929
Change the configuration of a device
1219
930
 
1220
931
@table @option
1221
932
@item change @var{diskdevice} @var{filename}
1222
933
Change the medium for a removable disk device to point to @var{filename}. eg
1223
934
 
1224
935
@example
1225
 
(qemu) change ide1-cd0 /path/to/some.iso
 
936
(qemu) change cdrom /path/to/some.iso
1226
937
@end example
1227
938
 
1228
 
@item change vnc @var{display},@var{options}
 
939
@item change vnc @var{display,options}
1229
940
Change the configuration of the VNC server. The valid syntax for @var{display}
1230
941
and @var{options} are described at @ref{sec_invocation}. eg
1231
942
 
1246
957
 
1247
958
@end table
1248
959
 
1249
 
@item screendump @var{filename}
 
960
@item screendump filename
1250
961
Save screen into PPM image @var{filename}.
1251
962
 
1252
 
@item mouse_move @var{dx} @var{dy} [@var{dz}]
 
963
@item mouse_move dx dy [dz]
1253
964
Move the active mouse to the specified coordinates @var{dx} @var{dy}
1254
965
with optional scroll axis @var{dz}.
1255
966
 
1256
 
@item mouse_button @var{val}
 
967
@item mouse_button val
1257
968
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
1258
969
 
1259
 
@item mouse_set @var{index}
 
970
@item mouse_set index
1260
971
Set which mouse device receives events at given @var{index}, index
1261
972
can be obtained with
1262
973
@example
1263
974
info mice
1264
975
@end example
1265
976
 
1266
 
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
 
977
@item wavcapture filename [frequency [bits [channels]]]
1267
978
Capture audio into @var{filename}. Using sample rate @var{frequency}
1268
979
bits per sample @var{bits} and number of channels @var{channels}.
1269
980
 
1274
985
@item Number of channels = 2 - Stereo
1275
986
@end itemize
1276
987
 
1277
 
@item stopcapture @var{index}
 
988
@item stopcapture index
1278
989
Stop capture with a given @var{index}, index can be obtained with
1279
990
@example
1280
991
info capture
1281
992
@end example
1282
993
 
1283
 
@item log @var{item1}[,...]
 
994
@item log item1[,...]
1284
995
Activate logging of the specified items to @file{/tmp/qemu.log}.
1285
996
 
1286
 
@item savevm [@var{tag}|@var{id}]
 
997
@item savevm [tag|id]
1287
998
Create a snapshot of the whole virtual machine. If @var{tag} is
1288
999
provided, it is used as human readable identifier. If there is already
1289
1000
a snapshot with the same tag or ID, it is replaced. More info at
1290
1001
@ref{vm_snapshots}.
1291
1002
 
1292
 
@item loadvm @var{tag}|@var{id}
 
1003
@item loadvm tag|id
1293
1004
Set the whole virtual machine to the snapshot identified by the tag
1294
1005
@var{tag} or the unique snapshot ID @var{id}.
1295
1006
 
1296
 
@item delvm @var{tag}|@var{id}
 
1007
@item delvm tag|id
1297
1008
Delete the snapshot identified by @var{tag} or @var{id}.
1298
1009
 
1299
1010
@item stop
1302
1013
@item c or cont
1303
1014
Resume emulation.
1304
1015
 
1305
 
@item gdbserver [@var{port}]
1306
 
Start gdbserver session (default @var{port}=1234)
 
1016
@item gdbserver [port]
 
1017
Start gdbserver session (default port=1234)
1307
1018
 
1308
 
@item x/fmt @var{addr}
 
1019
@item x/fmt addr
1309
1020
Virtual memory dump starting at @var{addr}.
1310
1021
 
1311
 
@item xp /@var{fmt} @var{addr}
 
1022
@item xp /fmt addr
1312
1023
Physical memory dump starting at @var{addr}.
1313
1024
 
1314
1025
@var{fmt} is a format which tells the command how to format the
1364
1075
@end smallexample
1365
1076
@end itemize
1366
1077
 
1367
 
@item p or print/@var{fmt} @var{expr}
 
1078
@item p or print/fmt expr
1368
1079
 
1369
1080
Print expression value. Only the @var{format} part of @var{fmt} is
1370
1081
used.
1371
1082
 
1372
 
@item sendkey @var{keys}
 
1083
@item sendkey keys
1373
1084
 
1374
 
Send @var{keys} to the emulator. @var{keys} could be the name of the
1375
 
key or @code{#} followed by the raw value in either decimal or hexadecimal
1376
 
format. Use @code{-} to press several keys simultaneously. Example:
 
1085
Send @var{keys} to the emulator. Use @code{-} to press several keys
 
1086
simultaneously. Example:
1377
1087
@example
1378
1088
sendkey ctrl-alt-f1
1379
1089
@end example
1385
1095
 
1386
1096
Reset the system.
1387
1097
 
1388
 
@item boot_set @var{bootdevicelist}
1389
 
 
1390
 
Define new values for the boot device list. Those values will override
1391
 
the values specified on the command line through the @code{-boot} option.
1392
 
 
1393
 
The values that can be specified here depend on the machine type, but are
1394
 
the same that can be specified in the @code{-boot} command line option.
1395
 
 
1396
 
@item usb_add @var{devname}
 
1098
@item usb_add devname
1397
1099
 
1398
1100
Add the USB device @var{devname}.  For details of available devices see
1399
1101
@ref{usb_devices}
1400
1102
 
1401
 
@item usb_del @var{devname}
 
1103
@item usb_del devname
1402
1104
 
1403
1105
Remove the USB device @var{devname} from the QEMU virtual USB
1404
1106
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
1426
1128
* disk_images_snapshot_mode:: Snapshot mode
1427
1129
* vm_snapshots::              VM snapshots
1428
1130
* qemu_img_invocation::       qemu-img Invocation
1429
 
* qemu_nbd_invocation::       qemu-nbd Invocation
1430
1131
* host_drives::               Using host drives
1431
1132
* disk_images_fat_images::    Virtual FAT disk images
1432
 
* disk_images_nbd::           NBD access
1433
1133
@end menu
1434
1134
 
1435
1135
@node disk_images_quickstart
1510
1210
 
1511
1211
@include qemu-img.texi
1512
1212
 
1513
 
@node qemu_nbd_invocation
1514
 
@subsection @code{qemu-nbd} Invocation
1515
 
 
1516
 
@include qemu-nbd.texi
1517
 
 
1518
1213
@node host_drives
1519
1214
@subsection Using host drives
1520
1215
 
1559
1254
is better to use the @code{change} or @code{eject} monitor commands to
1560
1255
change or eject media.
1561
1256
@item Hard disks
1562
 
Hard disks can be used with the syntax: @file{\\.\PhysicalDrive@var{N}}
 
1257
Hard disks can be used with the syntax: @file{\\.\PhysicalDriveN}
1563
1258
where @var{N} is the drive number (0 is the first hard disk).
1564
1259
 
1565
1260
WARNING: unless you know what you do, it is better to only make
1612
1307
@item write to the FAT directory on the host system while accessing it with the guest system.
1613
1308
@end itemize
1614
1309
 
1615
 
@node disk_images_nbd
1616
 
@subsection NBD access
1617
 
 
1618
 
QEMU can access directly to block device exported using the Network Block Device
1619
 
protocol.
1620
 
 
1621
 
@example
1622
 
qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
1623
 
@end example
1624
 
 
1625
 
If the NBD server is located on the same host, you can use an unix socket instead
1626
 
of an inet socket:
1627
 
 
1628
 
@example
1629
 
qemu linux.img -hdb nbd:unix:/tmp/my_socket
1630
 
@end example
1631
 
 
1632
 
In this case, the block device must be exported using qemu-nbd:
1633
 
 
1634
 
@example
1635
 
qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
1636
 
@end example
1637
 
 
1638
 
The use of qemu-nbd allows to share a disk between several guests:
1639
 
@example
1640
 
qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
1641
 
@end example
1642
 
 
1643
 
and then you can use it with two guests:
1644
 
@example
1645
 
qemu linux1.img -hdb nbd:unix:/tmp/my_socket
1646
 
qemu linux2.img -hdb nbd:unix:/tmp/my_socket
1647
 
@end example
1648
 
 
1649
1310
@node pcsys_network
1650
1311
@section Network emulation
1651
1312
 
1781
1442
USB devices can be connected with the @option{-usbdevice} commandline option
1782
1443
or the @code{usb_add} monitor command.  Available devices are:
1783
1444
 
1784
 
@table @code
1785
 
@item mouse
 
1445
@table @var
 
1446
@item @code{mouse}
1786
1447
Virtual Mouse.  This will override the PS/2 mouse emulation when activated.
1787
 
@item tablet
 
1448
@item @code{tablet}
1788
1449
Pointer device that uses absolute coordinates (like a touchscreen).
1789
1450
This means qemu is able to report the mouse position without having
1790
1451
to grab the mouse.  Also overrides the PS/2 mouse emulation when activated.
1791
 
@item disk:@var{file}
 
1452
@item @code{disk:file}
1792
1453
Mass storage device based on @var{file} (@pxref{disk_images})
1793
 
@item host:@var{bus.addr}
 
1454
@item @code{host:bus.addr}
1794
1455
Pass through the host device identified by @var{bus.addr}
1795
1456
(Linux only)
1796
 
@item host:@var{vendor_id:product_id}
 
1457
@item @code{host:vendor_id:product_id}
1797
1458
Pass through the host device identified by @var{vendor_id:product_id}
1798
1459
(Linux only)
1799
 
@item wacom-tablet
 
1460
@item @code{wacom-tablet}
1800
1461
Virtual Wacom PenPartner tablet.  This device is similar to the @code{tablet}
1801
1462
above but it can be used with the tslib library because in addition to touch
1802
1463
coordinates it reports touch pressure.
1803
 
@item keyboard
 
1464
@item @code{keyboard}
1804
1465
Standard USB keyboard.  Will override the PS/2 keyboard (if present).
1805
 
@item serial:[vendorid=@var{vendor_id}][,product_id=@var{product_id}]:@var{dev}
1806
 
Serial converter. This emulates an FTDI FT232BM chip connected to host character
1807
 
device @var{dev}. The available character devices are the same as for the
1808
 
@code{-serial} option. The @code{vendorid} and @code{productid} options can be
1809
 
used to override the default 0403:6001. For instance, 
1810
 
@example
1811
 
usb_add serial:productid=FA00:tcp:192.168.0.2:4444
1812
 
@end example
1813
 
will connect to tcp port 4444 of ip 192.168.0.2, and plug that to the virtual
1814
 
serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00).
1815
 
@item braille
1816
 
Braille device.  This will use BrlAPI to display the braille output on a real
1817
 
or fake device.
1818
 
@item net:@var{options}
1819
 
Network adapter that supports CDC ethernet and RNDIS protocols.  @var{options}
1820
 
specifies NIC options as with @code{-net nic,}@var{options} (see description).
1821
 
For instance, user-mode networking can be used with
1822
 
@example
1823
 
qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
1824
 
@end example
1825
 
Currently this cannot be used in machines that support PCI NICs.
1826
 
@item bt[:@var{hci-type}]
1827
 
Bluetooth dongle whose type is specified in the same format as with
1828
 
the @option{-bt hci} option, @pxref{bt-hcis,,allowed HCI types}.  If
1829
 
no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
1830
 
This USB device implements the USB Transport Layer of HCI.  Example
1831
 
usage:
1832
 
@example
1833
 
qemu [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
1834
 
@end example
1835
1466
@end table
1836
1467
 
1837
1468
@node host_usb_devices
1921
1552
to provide high security. The password can be fairly easily brute-forced by
1922
1553
a client making repeat connections. For this reason, a VNC server using password
1923
1554
authentication should be restricted to only listen on the loopback interface
1924
 
or UNIX domain sockets. Password authentication is requested with the @code{password}
 
1555
or UNIX domain sockets. Password ayuthentication is requested with the @code{password}
1925
1556
option, and then once QEMU is running the password is set with the monitor. Until
1926
1557
the monitor is used to set the password all clients will be rejected.
1927
1558
 
2131
1762
@code{x/10i $cs*16+$eip} to dump the code at the PC position.
2132
1763
@end enumerate
2133
1764
 
2134
 
Advanced debugging options:
2135
 
 
2136
 
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:
2137
 
@table @code
2138
 
@item maintenance packet qqemu.sstepbits
2139
 
 
2140
 
This will display the MASK bits used to control the single stepping IE:
2141
 
@example
2142
 
(gdb) maintenance packet qqemu.sstepbits
2143
 
sending: "qqemu.sstepbits"
2144
 
received: "ENABLE=1,NOIRQ=2,NOTIMER=4"
2145
 
@end example
2146
 
@item maintenance packet qqemu.sstep
2147
 
 
2148
 
This will display the current value of the mask used when single stepping IE:
2149
 
@example
2150
 
(gdb) maintenance packet qqemu.sstep
2151
 
sending: "qqemu.sstep"
2152
 
received: "0x7"
2153
 
@end example
2154
 
@item maintenance packet Qqemu.sstep=HEX_VALUE
2155
 
 
2156
 
This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
2157
 
@example
2158
 
(gdb) maintenance packet Qqemu.sstep=0x5
2159
 
sending: "qemu.sstep=0x5"
2160
 
received: "OK"
2161
 
@end example
2162
 
@end table
2163
 
 
2164
1765
@node pcsys_os_specific
2165
1766
@section Target OS specific information
2166
1767
 
2339
1940
@node Sparc32 System emulator
2340
1941
@section Sparc32 System emulator
2341
1942
 
2342
 
Use the executable @file{qemu-system-sparc} to simulate the following
2343
 
Sun4m architecture machines:
2344
 
@itemize @minus
2345
 
@item
2346
 
SPARCstation 4
2347
 
@item
2348
 
SPARCstation 5
2349
 
@item
2350
 
SPARCstation 10
2351
 
@item
2352
 
SPARCstation 20
2353
 
@item
2354
 
SPARCserver 600MP
2355
 
@item
2356
 
SPARCstation LX
2357
 
@item
2358
 
SPARCstation Voyager
2359
 
@item
2360
 
SPARCclassic
2361
 
@item
2362
 
SPARCbook
2363
 
@end itemize
2364
 
 
2365
 
The emulation is somewhat complete. SMP up to 16 CPUs is supported,
2366
 
but Linux limits the number of usable CPUs to 4.
2367
 
 
2368
 
It's also possible to simulate a SPARCstation 2 (sun4c architecture),
2369
 
SPARCserver 1000, or SPARCcenter 2000 (sun4d architecture), but these
2370
 
emulators are not usable yet.
2371
 
 
2372
 
QEMU emulates the following sun4m/sun4c/sun4d peripherals:
2373
 
 
2374
 
@itemize @minus
2375
 
@item
2376
 
IOMMU or IO-UNITs
 
1943
Use the executable @file{qemu-system-sparc} to simulate a SparcStation 5
 
1944
or SparcStation 10 (sun4m architecture). The emulation is somewhat complete.
 
1945
 
 
1946
QEMU emulates the following sun4m peripherals:
 
1947
 
 
1948
@itemize @minus
 
1949
@item
 
1950
IOMMU
2377
1951
@item
2378
1952
TCX Frame buffer
2379
1953
@item
2380
1954
Lance (Am7990) Ethernet
2381
1955
@item
2382
 
Non Volatile RAM M48T02/M48T08
 
1956
Non Volatile RAM M48T08
2383
1957
@item
2384
1958
Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
2385
1959
and power/reset logic
2386
1960
@item
2387
1961
ESP SCSI controller with hard disk and CD-ROM support
2388
1962
@item
2389
 
Floppy drive (not on SS-600MP)
 
1963
Floppy drive
2390
1964
@item
2391
1965
CS4231 sound device (only on SS-5, not working yet)
2392
1966
@end itemize
2393
1967
 
2394
 
The number of peripherals is fixed in the architecture.  Maximum
2395
 
memory size depends on the machine type, for SS-5 it is 256MB and for
2396
 
others 2047MB.
 
1968
The number of peripherals is fixed in the architecture.
2397
1969
 
2398
1970
Since version 0.8.2, QEMU uses OpenBIOS
2399
1971
@url{http://www.openbios.org/}. OpenBIOS is a free (GPL v2) portable
2401
1973
1275-1994 (referred to as Open Firmware) compliant firmware.
2402
1974
 
2403
1975
A sample Linux 2.6 series kernel and ram disk image are available on
2404
 
the QEMU web site. There are still issues with NetBSD and OpenBSD, but
2405
 
some kernel versions work. Please note that currently Solaris kernels
2406
 
don't work probably due to interface issues between OpenBIOS and
2407
 
Solaris.
 
1976
the QEMU web site. Please note that currently NetBSD, OpenBSD or
 
1977
Solaris kernels don't work.
2408
1978
 
2409
1979
@c man begin OPTIONS
2410
1980
 
2426
1996
 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
2427
1997
@end example
2428
1998
 
2429
 
@item -M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic|SPARCbook|SS-2|SS-1000|SS-2000]
 
1999
@item -M [SS-5|SS-10]
2430
2000
 
2431
2001
Set the emulated machine type. Default is SS-5.
2432
2002
 
2437
2007
@node Sparc64 System emulator
2438
2008
@section Sparc64 System emulator
2439
2009
 
2440
 
Use the executable @file{qemu-system-sparc64} to simulate a Sun4u
2441
 
(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
2442
 
Niagara (T1) machine. The emulator is not usable for anything yet, but
2443
 
it can launch some kernels.
 
2010
Use the executable @file{qemu-system-sparc64} to simulate a Sun4u machine.
 
2011
The emulator is not usable for anything yet.
2444
2012
 
2445
 
QEMU emulates the following peripherals:
 
2013
QEMU emulates the following sun4u peripherals:
2446
2014
 
2447
2015
@itemize @minus
2448
2016
@item
2450
2018
@item
2451
2019
PCI VGA compatible card with VESA Bochs Extensions
2452
2020
@item
2453
 
PS/2 mouse and keyboard
2454
 
@item
2455
2021
Non Volatile RAM M48T59
2456
2022
@item
2457
2023
PC-compatible serial ports
2458
 
@item
2459
 
2 PCI IDE interfaces with hard disk and CD-ROM support
2460
 
@item
2461
 
Floppy disk
2462
2024
@end itemize
2463
2025
 
2464
 
@c man begin OPTIONS
2465
 
 
2466
 
The following options are specific to the Sparc64 emulation:
2467
 
 
2468
 
@table @option
2469
 
 
2470
 
@item -prom-env string
2471
 
 
2472
 
Set OpenBIOS variables in NVRAM, for example:
2473
 
 
2474
 
@example
2475
 
qemu-system-sparc64 -prom-env 'auto-boot?=false'
2476
 
@end example
2477
 
 
2478
 
@item -M [sun4u|sun4v|Niagara]
2479
 
 
2480
 
Set the emulated machine type. The default is sun4u.
2481
 
 
2482
 
@end table
2483
 
 
2484
 
@c man end
2485
 
 
2486
2026
@node MIPS System emulator
2487
2027
@section MIPS System emulator
2488
2028
 
2489
 
Four executables cover simulation of 32 and 64-bit MIPS systems in
2490
 
both endian options, @file{qemu-system-mips}, @file{qemu-system-mipsel}
2491
 
@file{qemu-system-mips64} and @file{qemu-system-mips64el}.
2492
 
Five different machine types are emulated:
 
2029
Use the executable @file{qemu-system-mips} to simulate a MIPS machine.
 
2030
Three different machine types are emulated:
2493
2031
 
2494
2032
@itemize @minus
2495
2033
@item
2497
2035
@item
2498
2036
The MIPS Malta prototype board "malta"
2499
2037
@item
2500
 
An ACER Pica "pica61". This machine needs the 64-bit emulator.
2501
 
@item
2502
 
MIPS emulator pseudo board "mipssim"
2503
 
@item
2504
 
A MIPS Magnum R4000 machine "magnum". This machine needs the 64-bit emulator.
 
2038
An ACER Pica "pica61"
2505
2039
@end itemize
2506
2040
 
2507
2041
The generic emulation is supported by Debian 'Etch' and is able to
2510
2044
 
2511
2045
@itemize @minus
2512
2046
@item
2513
 
A range of MIPS CPUs, default is the 24Kf
 
2047
MIPS 24Kf CPU
2514
2048
@item
2515
2049
PC style serial port
2516
2050
@item
2549
2083
IDE controller
2550
2084
@end itemize
2551
2085
 
2552
 
The mipssim pseudo board emulation provides an environment similiar
2553
 
to what the proprietary MIPS emulator uses for running Linux.
2554
 
It supports:
2555
 
 
2556
 
@itemize @minus
2557
 
@item
2558
 
A range of MIPS CPUs, default is the 24Kf
2559
 
@item
2560
 
PC style serial port
2561
 
@item
2562
 
MIPSnet network emulation
2563
 
@end itemize
2564
 
 
2565
 
The MIPS Magnum R4000 emulation supports:
2566
 
 
2567
 
@itemize @minus
2568
 
@item
2569
 
MIPS R4000 CPU
2570
 
@item
2571
 
PC-style IRQ controller
2572
 
@item
2573
 
PC Keyboard
2574
 
@item
2575
 
SCSI controller
2576
 
@item
2577
 
G364 framebuffer
2578
 
@end itemize
2579
 
 
2580
 
 
2581
2086
@node ARM System emulator
2582
2087
@section ARM System emulator
2583
2088
 
2587
2092
 
2588
2093
@itemize @minus
2589
2094
@item
2590
 
ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU
 
2095
ARM926E, ARM1026E or ARM946E CPU
2591
2096
@item
2592
2097
Two PL011 UARTs
2593
2098
@item
2604
2109
 
2605
2110
@itemize @minus
2606
2111
@item
2607
 
ARM926E, ARM1136 or Cortex-A8 CPU
 
2112
ARM926E CPU
2608
2113
@item
2609
2114
PL190 Vectored Interrupt Controller
2610
2115
@item
2633
2138
 
2634
2139
@itemize @minus
2635
2140
@item
2636
 
ARM926E, ARM1136, ARM11MPCORE(x4) or Cortex-A8 CPU
 
2141
ARM926E CPU
2637
2142
@item
2638
2143
ARM AMBA Generic/Distributed Interrupt Controller
2639
2144
@item
2684
2189
WM8750 audio CODEC on I@math{^2}C and I@math{^2}S busses
2685
2190
@end itemize
2686
2191
 
2687
 
The Palm Tungsten|E PDA (codename "Cheetah") emulation includes the
2688
 
following elements:
2689
 
 
2690
 
@itemize @minus
2691
 
@item
2692
 
Texas Instruments OMAP310 System-on-chip (ARM 925T core)
2693
 
@item
2694
 
ROM and RAM memories (ROM firmware image can be loaded with -option-rom)
2695
 
@item
2696
 
On-chip LCD controller
2697
 
@item
2698
 
On-chip Real Time Clock
2699
 
@item
2700
 
TI TSC2102i touchscreen controller / analog-digital converter / Audio
2701
 
CODEC, connected through MicroWire and I@math{^2}S busses
2702
 
@item
2703
 
GPIO-connected matrix keypad
2704
 
@item
2705
 
Secure Digital card connected to OMAP MMC/SD host
2706
 
@item
2707
 
Three on-chip UARTs
2708
 
@end itemize
2709
 
 
2710
 
Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48)
2711
 
emulation supports the following elements:
2712
 
 
2713
 
@itemize @minus
2714
 
@item
2715
 
Texas Instruments OMAP2420 System-on-chip (ARM 1136 core)
2716
 
@item
2717
 
RAM and non-volatile OneNAND Flash memories
2718
 
@item
2719
 
Display connected to EPSON remote framebuffer chip and OMAP on-chip
2720
 
display controller and a LS041y3 MIPI DBI-C controller
2721
 
@item
2722
 
TI TSC2301 (in N800) and TI TSC2005 (in N810) touchscreen controllers
2723
 
driven through SPI bus
2724
 
@item
2725
 
National Semiconductor LM8323-controlled qwerty keyboard driven
2726
 
through I@math{^2}C bus
2727
 
@item
2728
 
Secure Digital card connected to OMAP MMC/SD host
2729
 
@item
2730
 
Three OMAP on-chip UARTs and on-chip STI debugging console
2731
 
@item
2732
 
A Bluetooth(R) transciever and HCI connected to an UART
2733
 
@item
2734
 
Mentor Graphics "Inventra" dual-role USB controller embedded in a TI
2735
 
TUSB6010 chip - only USB host mode is supported
2736
 
@item
2737
 
TI TMP105 temperature sensor driven through I@math{^2}C bus
2738
 
@item
2739
 
TI TWL92230C power management companion with an RTC on I@math{^2}C bus
2740
 
@item
2741
 
Nokia RETU and TAHVO multi-purpose chips with an RTC, connected
2742
 
through CBUS
2743
 
@end itemize
2744
 
 
2745
 
The Luminary Micro Stellaris LM3S811EVB emulation includes the following
2746
 
devices:
2747
 
 
2748
 
@itemize @minus
2749
 
@item
2750
 
Cortex-M3 CPU core.
2751
 
@item
2752
 
64k Flash and 8k SRAM.
2753
 
@item
2754
 
Timers, UARTs, ADC and I@math{^2}C interface.
2755
 
@item
2756
 
OSRAM Pictiva 96x16 OLED with SSD0303 controller on I@math{^2}C bus.
2757
 
@end itemize
2758
 
 
2759
 
The Luminary Micro Stellaris LM3S6965EVB emulation includes the following
2760
 
devices:
2761
 
 
2762
 
@itemize @minus
2763
 
@item
2764
 
Cortex-M3 CPU core.
2765
 
@item
2766
 
256k Flash and 64k SRAM.
2767
 
@item
2768
 
Timers, UARTs, ADC, I@math{^2}C and SSI interfaces.
2769
 
@item
2770
 
OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI.
2771
 
@end itemize
2772
 
 
2773
 
The Freecom MusicPal internet radio emulation includes the following
2774
 
elements:
2775
 
 
2776
 
@itemize @minus
2777
 
@item
2778
 
Marvell MV88W8618 ARM core.
2779
 
@item
2780
 
32 MB RAM, 256 KB SRAM, 8 MB flash.
2781
 
@item
2782
 
Up to 2 16550 UARTs
2783
 
@item
2784
 
MV88W8xx8 Ethernet controller
2785
 
@item
2786
 
MV88W8618 audio controller, WM8750 CODEC and mixer
2787
 
@item
2788
 
128�64 display with brightness control
2789
 
@item
2790
 
2 buttons, 2 navigation wheels with button function
2791
 
@end itemize
2792
 
 
2793
2192
A Linux 2.6 test image is available on the QEMU web site. More
2794
2193
information is available in the QEMU mailing-list archive.
2795
2194
 
2826
2225
* Supported Operating Systems ::
2827
2226
* Linux User space emulator::
2828
2227
* Mac OS X/Darwin User space emulator ::
2829
 
* BSD User space emulator ::
2830
2228
@end menu
2831
2229
 
2832
2230
@node Supported Operating Systems
2839
2237
Linux (referred as qemu-linux-user)
2840
2238
@item
2841
2239
Mac OS X/Darwin (referred as qemu-darwin-user)
2842
 
@item
2843
 
BSD (referred as qemu-bsd-user)
2844
2240
@end itemize
2845
2241
 
2846
2242
@node Linux User space emulator
2937
2333
@subsection Command line options
2938
2334
 
2939
2335
@example
2940
 
usage: qemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] program [arguments...]
 
2336
usage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]
2941
2337
@end example
2942
2338
 
2943
2339
@table @option
2947
2343
Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
2948
2344
@item -s size
2949
2345
Set the x86 stack size in bytes (default=524288)
2950
 
@item -cpu model
2951
 
Select CPU model (-cpu ? for list and additional feature selection)
2952
2346
@end table
2953
2347
 
2954
2348
Debug options:
2958
2352
Activate log (logfile=/tmp/qemu.log)
2959
2353
@item -p pagesize
2960
2354
Act as if the host page size was 'pagesize' bytes
2961
 
@item -g port
2962
 
Wait gdb connection to port
2963
 
@end table
2964
 
 
2965
 
Environment variables:
2966
 
 
2967
 
@table @env
2968
 
@item QEMU_STRACE
2969
 
Print system calls and arguments similar to the 'strace' program
2970
 
(NOTE: the actual 'strace' program will not work because the user
2971
 
space emulator hasn't implemented ptrace).  At the moment this is
2972
 
incomplete.  All system calls that don't have a specific argument
2973
 
format are printed with information for six arguments.  Many
2974
 
flag-style arguments don't have decoders and will show up as numbers.
2975
2355
@end table
2976
2356
 
2977
2357
@node Other binaries
2987
2367
 
2988
2368
The binary format is detected automatically.
2989
2369
 
2990
 
@command{qemu-sparc} can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).
2991
 
 
2992
 
@command{qemu-sparc32plus} can execute Sparc32 and SPARC32PLUS binaries
2993
 
(Sparc64 CPU, 32 bit ABI).
2994
 
 
2995
 
@command{qemu-sparc64} can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and
2996
 
SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).
2997
 
 
2998
2370
@node Mac OS X/Darwin User space emulator
2999
2371
@section Mac OS X/Darwin User space emulator
3000
2372
 
3080
2452
Act as if the host page size was 'pagesize' bytes
3081
2453
@end table
3082
2454
 
3083
 
@node BSD User space emulator
3084
 
@section BSD User space emulator
3085
 
 
3086
 
@menu
3087
 
* BSD Status::
3088
 
* BSD Quick Start::
3089
 
* BSD Command line options::
3090
 
@end menu
3091
 
 
3092
 
@node BSD Status
3093
 
@subsection BSD Status
3094
 
 
3095
 
@itemize @minus
3096
 
@item
3097
 
target Sparc64 on Sparc64: Some trivial programs work.
3098
 
@end itemize
3099
 
 
3100
 
@node BSD Quick Start
3101
 
@subsection Quick Start
3102
 
 
3103
 
In order to launch a BSD process, QEMU needs the process executable
3104
 
itself and all the target dynamic libraries used by it.
3105
 
 
3106
 
@itemize
3107
 
 
3108
 
@item On Sparc64, you can just try to launch any process by using the native
3109
 
libraries:
3110
 
 
3111
 
@example
3112
 
qemu-sparc64 /bin/ls
3113
 
@end example
3114
 
 
3115
 
@end itemize
3116
 
 
3117
 
@node BSD Command line options
3118
 
@subsection Command line options
3119
 
 
3120
 
@example
3121
 
usage: qemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]
3122
 
@end example
3123
 
 
3124
 
@table @option
3125
 
@item -h
3126
 
Print the help
3127
 
@item -L path
3128
 
Set the library root path (default=/)
3129
 
@item -s size
3130
 
Set the stack size in bytes (default=524288)
3131
 
@item -bsd type
3132
 
Set the type of the emulated BSD Operating system. Valid values are
3133
 
FreeBSD, NetBSD and OpenBSD (default).
3134
 
@end table
3135
 
 
3136
 
Debug options:
3137
 
 
3138
 
@table @option
3139
 
@item -d
3140
 
Activate log (logfile=/tmp/qemu.log)
3141
 
@item -p pagesize
3142
 
Act as if the host page size was 'pagesize' bytes
3143
 
@end table
3144
 
 
3145
2455
@node compilation
3146
2456
@chapter Compilation from the sources
3147
2457