QEMU 使用手册(英文)

QEMU是一款强大的系统模拟器,支持多种外围设备模拟,如i440FX PCI桥、PS/2键盘鼠标、IDE硬盘、网络适配器等。它使用Seabios和Bochs BIOS,支持SMP系统,最多可模拟255个CPU。QEMU还提供了丰富的命令行选项,如-smp用于设置模拟的多核系统,-cpu指定CPU模型,-accel启用加速器如kvm、hax等,以及内存和磁盘映像管理等。此外,它支持通过网络访问远程存储资源,如iSCSI、NBD、SSH、Sheepdog和GlusterFS。
摘要由CSDN通过智能技术生成

获取方法:

man qemu|multimarkdown>qemu-manual.html

手册内容:

QEMU(1) QEMU QEMU(1)

NAME qemu - QEMU User Documentation

SYNOPSIS qemu-system-x86_64 [options] [disk_image]

DESCRIPTION The QEMU PC System emulator simulates the following peripherals:

• i440FX host PCI bridge and PIIX3 PCI to ISA bridge

• Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA extensions (hardware level, including all non standard modes).

• PS/2 mouse and keyboard

• 2 PCI IDE interfaces with hard disk and CD-ROM support

• Floppy disk

• PCI and ISA network adapters

• Serial ports

• IPMI BMC, either and internal or external one

• Creative SoundBlaster 16 sound card

• ENSONIQ AudioPCI ES1370 sound card

• Intel 82801AA AC97 Audio compatible sound card

• Intel HD Audio Controller and HDA codec

• Adlib (OPL2) - Yamaha YM3812 compatible chip

• Gravis Ultrasound GF1 sound card

• CS4231A compatible sound card

• PCI UHCI, OHCI, EHCI or XHCI USB controller and a virtual USB-1.1 hub.

SMP is supported with up to 255 CPUs.

QEMU uses the PC BIOS from the Seabios project and the Plex86/Bochs LGPL VGA BIOS.

QEMU uses YM3812 emulation by Tatsuyuki Satoh.

QEMU uses GUS emulation (GUSEMU32 http://www.deinmeister.de/gusemu/) by Tibor “TS” Schütz.

Note that, by default, GUS shares IRQ(7) with parallel ports and so QEMU must be told to not have parallel ports to have working GUS.

  qemu_system-x86_64 dos.img -soundhw gus -parallel none

Alternatively:

  qemu_system-x86_64 dos.img -device gus,irq=5

Or some other unclaimed IRQ.

CS4231A is the chip used in Windows Sound System and GUSMAX products

OPTIONS disk_image is a raw hard disk image for IDE hard disk 0. Some targets do not need a disk image.

Standard options -h Display help and exit

-version
Display version information and exit

-machine [type=]name[,prop=value[,…]]
Select the emulated machine by name. Use -machine help to list available machines.

      For architectures which aim to support live migration compatibility across releases, each release will introduce a new versioned machine type.
      For example, the 2.8.0 release introduced machine types "pc-i440fx-2.8" and "pc-q35-2.8" for the x86_64/i686 architectures.

      To allow live migration of guests from QEMU version 2.8.0, to QEMU version 2.9.0, the 2.9.0  version  must  support  the  "pc-i440fx-2.8"  and
      "pc-q35-2.8"  machines too. To allow users live migrating VMs to skip multiple intermediate releases when upgrading, new releases of QEMU will
      support machine types from many previous versions.

      Supported machine properties are:

      accel=accels1[:accels2[:...]]
             This is used to enable an accelerator. Depending on the target architecture, kvm, xen, hax, hvf, whpx or tcg can be available.  By  de‐
             fault, tcg is used. If there is more than one accelerator specified, the next one is used if the previous one fails to initialize.

      vmport=on|off|auto
             Enables  emulation  of  VMWare IO port, for vmmouse etc. auto says to select the value based on accel. For accel=xen the default is off
             otherwise the default is on.

      dump-guest-core=on|off
             Include guest memory in a core dump. The default is on.

      mem-merge=on|off
             Enables or disables memory merge support. This feature, when supported by the host, de-duplicates identical memory pages among VMs  in‐
             stances (enabled by default).

      aes-key-wrap=on|off
             Enables or disables AES key wrapping support on s390-ccw hosts.  This feature controls whether AES wrapping keys will be created to al‐
             low execution of AES cryptographic functions. The default is on.

      dea-key-wrap=on|off
             Enables or disables DEA key wrapping support on s390-ccw hosts.  This feature controls whether DEA wrapping keys will be created to al‐
             low execution of DEA cryptographic functions. The default is on.

      nvdimm=on|off
             Enables or disables NVDIMM support. The default is off.

      enforce-config-section=on|off
             If  enforce-config-section  is  set  to on, force migration code to send configuration section even if the machine-type sets the migra‐
             tion.send-configuration property to off. NOTE: this parameter is deprecated. Please use -global migration.send-configuration=on|off in‐
             stead.

      memory-encryption=
             Memory encryption object to use. The default is none.

      hmat=on|off
             Enables or disables ACPI Heterogeneous Memory Attribute Table (HMAT) support. The default is off.

-cpu model
Select CPU model (-cpu help for list and additional feature selection)

-accel name[,prop=value[,…]]
This is used to enable an accelerator. Depending on the target architecture, kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg
is used. If there is more than one accelerator specified, the next one is used if the previous one fails to initialize.

      igd-passthru=on|off
             When Xen is in use, this option controls whether Intel integrated graphics devices can be passed through to the guest (default=off)

      kernel-irqchip=on|off|split
             Controls KVM in-kernel irqchip support. The default is full acceleration of the interrupt controllers. On x86,  split  irqchip  reduces
             the  kernel attack surface, at a performance cost for non-MSI interrupts. Disabling the in-kernel irqchip completely is not recommended
             except for debugging purposes.

      kvm-shadow-mem=size
             Defines the size of the KVM shadow MMU.

      tb-size=n
             Controls the size (in MiB) of the TCG translation block cache.

      thread=single|multi
             Controls number of TCG threads. When the TCG is multi-threaded there will be one thread per vCPU therefor  taking  advantage  of  addi‐
             tional  host  cores. The default is to enable multi-threading where both the back-end and front-ends support it and no incompatible TCG
             features have been enabled (e.g.  icount/replay).

-smp [cpus=]n[,cores=cores][,threads=threads][,dies=dies][,sockets=sockets][,maxcpus=maxcpus]
Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
to 4. For the PC target, the number of cores per die, the number of threads per cores, the number of dies per packages and the total number of
sockets can be specified. Missing values will be computed. If any on the three values is given, the total number of CPUs n can be omitted.
maxcpus specifies the maximum number of hotpluggable CPUs.

-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=initiator]

-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=initiator]

-numa dist,src=source,dst=destination,val=distance

-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]

-numa hmat-lb,initiator=node,target=node,hierarchy=hierarchy,data-type=tpye[,latency=lat][,bandwidth=bw]

-numa hmat-cache,node-id=node,size=size,level=level[,associativity=str][,policy=str][,line=size]
Define a NUMA node and assign RAM and VCPUs to it. Set the NUMA distance from a source node to a destination node. Set the ACPI Heterogeneous
Memory Attributes for the given nodes.

      Legacy VCPU assignment uses 'cpus' option where firstcpu and lastcpu are CPU indexes. Each 'cpus' option represent a contiguous range  of  CPU
      indexes  (or  a  single VCPU if lastcpu is omitted). A non-contiguous set of VCPUs can be represented by providing multiple 'cpus' options. If
      'cpus' is omitted on all nodes, VCPUs are automatically split between them.

      For example, the following option assigns VCPUs 0, 1, 2 and 5 to a NUMA node:

         -numa node,cpus=0-2,cpus=5

      'cpu' option is a new alternative to 'cpus' option which uses 'socket-id|core-id|thread-id' properties to assign CPU objects to a  node  using
      topology  layout  properties  of  CPU.  The set of properties is machine specific, and depends on used machine type/'smp' options. It could be
      queried with 'hotpluggable-cpus' monitor command. 'node-id' property specifies node to which CPU object will be assigned,  it's  required  for
      node to be declared with 'node' option before it's used with 'cpu' option.

      For example:

         -M pc \
         -smp 1,sockets=2,maxcpus=2 \
         -numa node,nodeid=0 -numa node,nodeid=1 \
         -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1

      'mem' assigns a given RAM amount to a node. 'memdev' assigns RAM from a given memory backend device to a node. If 'mem' and 'memdev' are omit‐
      ted in all nodes, RAM is split equally between them.

      'mem' and 'memdev' are mutually exclusive.  Furthermore, if one node uses 'memdev', all of them have to use it.

      'initiator' is an additional option that points to an initiator NUMA node that has best performance (the lowest latency or largest  bandwidth)
      to this NUMA node. Note that this option can be set only when the machine property 'hmat' is set to 'on'.

      Following  example creates a machine with 2 NUMA nodes, node 0 has CPU. node 1 has only memory, and its initiator is node 0. Note that because
      node 0 has CPU, by default the initiator of node 0 is itself and must be itself.

         -machine hmat=on \
         -m 2G,slots=2,maxmem=4G \
         -object memory-backend-ram,size=1G,id=m0 \
         -object memory-backend-ram,size=1G,id=m1 \
         -numa node,nodeid=0,memdev=m0 \
         -numa node,nodeid=1,memdev=m1,initiator=0 \
         -smp 2,sockets=2,maxcpus=2  \
         -numa cpu,node-id=0,socket-id=0 \
         -numa cpu,node-id=0,socket-id=1

      source and destination are NUMA node IDs. distance is the NUMA distance from source to destination. The distance from a node to itself is  al‐
      ways  10. If any pair of nodes is given a distance, then all pairs must be given distances. Although, when distances are only given in one di‐
      rection for each pair of nodes, then the distances in the opposite directions are assumed to be the same. If, however, an asymmetrical pair of
      distances  is  given for even one node pair, then all node pairs must be provided distance values for both directions, even when they are sym‐
      metrical. When a node is unreachable from another node, set the pair's distance to 255.

      Note that the -numa option doesn't allocate any of the specified resources, it just assigns existing resources to NUMA nodes. This means  that
      one still has to use the -m, -smp options to allocate RAM and VCPUs respectively.

      Use 'hmat-lb' to set System Locality Latency and Bandwidth Information between initiator and target NUMA nodes in ACPI Heterogeneous Attribute
      Memory Table (HMAT). Initiator NUMA node can create memory requests, usually it has one or more processors.  Target  NUMA  node  contains  ad‐
      dressable memory.

      In  'hmat-lb'  option, node are NUMA node IDs. hierarchy is the memory hierarchy of the target NUMA node: if hierarchy is 'memory', the struc‐
      ture represents the memory performance; if hierarchy is 'first-level|second-level|third-level', this structure represents  aggregated  perfor‐
      mance  of  memory  side  caches for each domain. type of 'data-type' is type of data represented by this structure instance: if 'hierarchy' is
      'memory',  'data-type'  is  'access|read|write'  latency  or  'access|read|write'  bandwidth  of  the  target  memory;   if   'hierarchy'   is
      'first-level|second-level|third-level', 'data-type' is 'access|read|write' hit latency or 'access|read|write' hit bandwidth of the target mem‐
      ory side cache.

      lat is latency value in nanoseconds. bw is bandwidth value, the possible value and units are NUM[M|G|T], mean that the bandwidth value are NUM
      byte  per  second  (or MB/s, GB/s or TB/s depending on used suffix). Note that if latency or bandwidth value is 0, means the corresponding la‐
      tency or bandwidth information is not provided.

      In 'hmat-cache' option, node-id is the NUMA-id of the memory belongs. size is the size of memory side cache in bytes. level is the cache level
      described  in this structure, note that the cache level 0 should not be used with 'hmat-cache' option.  associativity is the cache associativ‐
      ity, the possible value is 'none/direct(direct-mapped)/complex(complex cache indexing)'. policy is the write policy. line is  the  cache  Line
      size in bytes.

      For  example, the following options describe 2 NUMA nodes. Node 0 has 2 cpus and a ram, node 1 has only a ram. The processors in node 0 access
      memory in node 0 with access-latency 5 nanoseconds, access-bandwidth is 200 MB/s; The processors in NUMA node 0 access memory in NUMA  node  1
      with  access-latency  10 nanoseconds, access-bandwidth is 100 MB/s. And for memory side cache information, NUMA node 0 and 1 both have 1 level
      memory cache, size is 10KB, policy is write-back, the cache Line size is 8 bytes:

         -machine hmat=on \
         -m 2G \
         -object memory-backend-ram,size=1G,id=m0 \
         -object memory-backend-ram,size=1G,id=m1 \
         -smp 2 \
         -numa node,nodeid=0,memdev=m0 \
         -numa node,nodeid=1,memdev=m1,initiator=0 \
         -numa cpu,node-id=0,socket-id=0 \
         -numa cpu,node-id=0,socket-id=1 \
         -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5 \
         -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M \
         -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10 \
         -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M \
         -numa hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8 \
         -numa hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8

-add-fd fd=fd,set=set[,opaque=opaque]
Add a file descriptor to an fd set. Valid options are:

      fd=fd  This option defines the file descriptor of which a duplicate is added to fd set. The  file  descriptor  cannot  be  stdin,  stdout,  or
             stderr.

      set=set
             This option defines the ID of the fd set to add the file descriptor to.

      opaque=opaque
             This option defines a free-form string that can be used to describe fd.

      You can open an image using pre-opened file descriptors from an fd set:

         qemu-system-x86_64  -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"  -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"  -drive file=/dev/fdset/2,index=0,media=disk

-set group.id.arg=value
Set parameter arg for item id of type group

-global driver.prop=value

-global driver=driver,property=property,value=value
Set default value of driver’s property prop to value, e.g.:

         qemu_system-x86_64 -global ide-hd.physical_block_size=4096 disk-image.img

      In  particular, you can use this to set driver properties for devices which are created automatically by the machine model. To create a device
      which is not created automatically and set properties on it, use -device.

      -global driver.prop=value is shorthand for -global driver=driver,property=prop,value=value. The longhand syntax works even  when  driver  con‐
      tains a dot.

-boot [order=drives][,once=drives][,menu=on|off][,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_timeout][,strict=on|off]
Specify boot order drives as a string of drive letters. Valid drive letters depend on the target architecture. The x86 PC uses: a, b (floppy 1
and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot from network adapter 1-4), hard disk boot is the default. To apply a particular
boot order only on the first startup, specify it via once. Note that the order or once parameter should not be used together with the bootin‐
dex property of devices, since the firmware implementations normally do not support both at the same time.

      Interactive boot menus/prompts can be enabled via menu=on as far as firmware/BIOS supports them. The default is non-interactive boot.

      A splash picture could be passed to bios, enabling user to show it as logo, when option splash=sp_name is given and menu=on, If  firmware/BIOS
      supports  them.  Currently  Seabios  for  X86 system support it. limitation: The splash file could be a jpeg file or a BMP file in 24 BPP for‐
      mat(true color). The resolution should be supported by the SVGA mode, so the recommended is 320x240, 640x480, 800x640.

      A timeout could be passed to bios, guest will pause for rb_timeout ms when boot failed, then reboot. If rb_timeout is '-1', guest will not re‐
      boot, qemu passes '-1' to bios by default. Currently Seabios for X86 system support it.

      Do  strict  boot  via strict=on as far as firmware/BIOS supports it. This only effects when boot priority is changed by bootindex options. The
      default is non-strict boot.

         # try to boot from network first, then from hard disk
         qemu_system-x86_64 -boot order=nc
         # boot from CD-ROM first, switch back to default order after reboot
         qemu_system-x86_64 -boot once=d
         # boot with a splash picture for 5 seconds.
         qemu_system-x86_64 -boot menu=on,splash=/root/boot.bmp,splash-time=5000

      Note: The legacy format '-boot drives' is still supported but its use is discouraged as it may be removed from future versions.

-m [size=]megs[,slots=n,maxmem=size]
Sets guest startup RAM size to megs megabytes. Default is 128 MiB. Optionally, a suffix of “M” or “G” can be used to signify a value in
megabytes or gigabytes respectively. Optional pair slots, maxmem could be used to set amount of hotpluggable memory slots and maximum amount
of memory. Note that maxmem must be aligned to the page size.

      For example, the following command-line sets the guest startup RAM size to 1GB, creates 3 slots to hotplug additional memory and sets the max‐
      imum memory the guest can reach to 4GB:

         qemu-system-x86_64 -m 1G,slots=3,maxmem=4G

      If slots and maxmem are not specified, memory hotplug won't be enabled and the guest startup RAM will never increase.

-mem-path path
Allocate guest RAM from a temporarily created file in path.

-mem-prealloc
Preallocate memory when using -mem-path.

-k language
Use keyboard layout language (for example fr for French). This option is only needed where it is not easy to get raw PC keycodes (e.g. on
Macs, with some X11 servers or with a VNC or curses display). You don’t normally need to use it on PC/Linux or PC/Windows hosts.

      The available layouts are:

         ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
         da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
         de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr

      The default is en-us.

-audio-help
Will show the -audiodev equivalent of the currently specified (deprecated) environment variables.

-audiodev [driver=]driver,id=id[,prop[=value][,…]]
Adds a new audio backend driver identified by id. There are global and driver specific properties. Some values can be set differently for in‐
put and output, they’re marked with in|out… You can set the input’s property with in.prop and the output’s property with out.prop. For exam‐
ple:

         -audiodev alsa,id=example,in.frequency=44110,out.frequency=8000
         -audiodev alsa,id=example,out.channels=1 # leaves in.channels unspecified

      NOTE: parameter validation is known to be incomplete, in many cases specifying an invalid option causes QEMU to print  an  error  message  and
      continue emulation without sound.

      Valid global options are:

      id=identifier
             Identifies the audio backend.

      timer-period=period
             Sets the timer period used by the audio subsystem in microseconds. Default is 10000 (10 ms).

      in|out.mixing-engine=on|off
             Use  QEMU's  mixing  engine  to  mix  all  streams  inside  QEMU and convert audio formats when not supported by the backend. When off,
             fixed-settings must be off too. Note that disabling this option means that the selected backend must support multiple streams  and  the
             audio  formats used by the virtual cards, otherwise you'll get no sound. It's not recommended to disable this option unless you want to
             use 5.1 or 7.1 audio, as mixing engine only supports mono and stereo audio. Default is on.

      in|out.fixed-settings=on|off
             Use fixed settings for host audio. When off, it will change based on how the guest opens the sound card. In  this  case  you  must  not
             specify frequency, channels or format. Default is on.

      in|out.frequency=frequency
             Specify the frequency to use when using fixed-settings. Default is 44100Hz.

      in|out.channels=channels
             Specify the number of channels to use when using fixed-settings.  Default is 2 (stereo).

      in|out.format=format
             Specify the sample format to use when using fixed-settings.  Valid values are: s8, s16, s32, u8, u16, u32, f32. Default is s16.

      in|out.voices=voices
             Specify the number of voices to use. Default is 1.

      in|out.buffer-length=usecs
             Sets the size of the buffer in microseconds.

-audiodev none,id=id[,prop[=value][,…]]
Creates a dummy backend that discards all outputs. This backend has no backend specific properties.

-audiodev alsa,id=id[,prop[=value][,…]]
Creates backend using the ALSA. This backend is only available on Linux.

      ALSA specific options are:

      in|out.dev=device
             Specify the ALSA device to use for input and/or output. Default is default.

      in|out.period-length=usecs
             Sets the period length in microseconds.

      in|out.try-poll=on|off
             Attempt to use poll mode with the device. Default is on.

      threshold=threshold
             Threshold (in microseconds) when playback starts. Default is 0.

-audiodev coreaudio,id=id[,prop[=value][,…]]
Creates a backend using Apple’s Core Audio. This backend is only available on Mac OS and only supports playback.

      Core Audio specific options are:

      in|out.buffer-count=count
             Sets the count of the buffers.

-audiodev dsound,id=id[,prop[=value][,…]]
Creates a backend using Microsoft’s DirectSound. This backend is only available on Windows and only supports playback.

      DirectSound specific options are:

      latency=usecs
             Add extra usecs microseconds latency to playback. Default is 10000 (10 ms).

-audiodev oss,id=id[,prop[=value][,…]]
Creates a backend using OSS. This backend is available on most Unix-like systems.

      OSS specific options are:

      in|out.dev=device
             Specify the file name of the OSS device to use. Default is /dev/dsp.

      in|out.buffer-count=count
             Sets the count of the buffers.

      in|out.try-poll=on|of
             Attempt to use poll mode with the device. Default is on.

      try-mmap=on|off
             Try using memory mapped device access. Default is off.

      exclusive=on|off
             Open the device in exclusive mode (vmix won't work in this case). Default is off.

      dsp-policy=policy
             Sets  the timing policy (between 0 and 10, where smaller number means smaller latency but higher CPU usage). Use -1 to use buffer sizes
             specified by buffer and buffer-count. This option is ignored if you do not have OSS 4. Default is 5.

-audiodev pa,id=id[,prop[=value][,…]]
Creates a backend using PulseAudio. This backend is available on most systems.

      PulseAudio specific options are:

      server=server
             Sets the PulseAudio server to connect to.

      in|out.name=sink
             Use the specified source/sink for recording/playback.

      in|out.latency=usecs
             Desired latency in microseconds. The PulseAudio server will try to honor this value but actual latencies may be lower or higher.

-audiodev sdl,id=id[,prop[=value][,…]]
Creates a backend using SDL. This backend is available on most systems, but you should use your platform’s native backend if possible. This
backend has no backend specific properties.

-audiodev spice,id=id[,prop[=value][,…]]
Creates a backend that sends audio through SPICE. This backend requires -spice and automatically selected in that case, so usually you can ig‐
nore this option. This backend has no backend specific properties.

-audiodev wav,id=id[,prop[=value][,…]]
Creates a backend that writes audio to a WAV file.

      Backend specific options are:

      path=path
             Write recorded audio into the specified file. Default is qemu.wav.

-soundhw card1[,card2,…] or -soundhw all
Enable audio and selected sound hardware. Use ‘help’ to print all available sound hardware. For example:

         qemu_system-x86_64 -soundhw sb16,adlib disk.img
         qemu_system-x86_64 -soundhw es1370 disk.img
         qemu_system-x86_64 -soundhw ac97 disk.img
         qemu_system-x86_64 -soundhw hda disk.img
         qemu_system-x86_64 -soundhw all disk.img
         qemu_system-x86_64 -soundhw help

      Note that Linux's i810_audio OSS kernel (for AC97) module might require manually specifying clocking.

         modprobe i810_audio clocking=48000

-device driver[,prop[=value][,…]]
Add device driver. prop=value sets driver properties. Valid properties depend on the driver. To get help on possible drivers and properties,
use -device help and -device driver,help.

      Some drivers are:

-device ipmi-bmc-sim,id=id[,slave_addr=val][,sdrfile=file][,furareasize=val][,furdatafile=file][,guid=uuid]
Add an IPMI BMC. This is a simulation of a hardware management interface processor that normally sits on a system. It provides a watchdog and
the ability to reset and power control the system. You need to connect this to an IPMI interface to make it useful

      The IPMI slave address to use for the BMC. The default is 0x20. This address is the BMC's address  on  the  I2C  network  of  management  con‐
      trollers. If you don't know what this means, it is safe to ignore it.

      id=id  The BMC id for interfaces to use this device.

      slave_addr=val
             Define slave address to use for the BMC. The default is 0x20.

      sdrfile=file
             file containing raw Sensor Data Records (SDR) data. The default is none.

      fruareasize=val
             size of a Field Replaceable Unit (FRU) area. The default is 1024.

      frudatafile=file
             file containing raw Field Replaceable Unit (FRU) inventory data.  The default is none.

      guid=uuid
             value  for  the GUID for the BMC, in standard UUID format. If this is set, get "Get GUID" command to the BMC will return it.  Otherwise
             "Get GUID" will return an error.

-device ipmi-bmc-extern,id=id,chardev=id[,slave_addr=val]
Add a connection to an external IPMI BMC simulator. Instead of locally emulating the BMC like the above item, instead connect to an external
entity that provides the IPMI services.

      A  connection is made to an external BMC simulator. If you do this, it is strongly recommended that you use the "reconnect=" chardev option to
      reconnect to the simulator if the connection is lost. Note that if this is not used carefully, it can be a security issue,  as  the  interface
      has  the ability to send resets, NMIs, and power off the VM. It's best if QEMU makes a connection to an external simulator running on a secure
      port on localhost, so neither the simulator nor QEMU is exposed to any outside network.

      See the "lanserv/README.vm" file in the OpenIPMI library for more details on the external interface.

-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val]
Add a KCS IPMI interafce on the ISA bus. This also adds a corresponding ACPI and SMBIOS entries, if appropriate.

      bmc=id The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.

      ioport=val
             Define the I/O address of the interface. The default is 0xca0 for KCS.

      irq=val
             Define the interrupt to use. The default is 5. To disable interrupts, set this to 0.

-device isa-ipmi-bt,bmc=id[,ioport=val][,irq=val]
Like the KCS interface, but defines a BT interface. The default port is 0xe4 and the default interrupt is 5.

-name name
Sets the name of the guest. This name will be displayed in the SDL window caption. The name will also be used for the VNC server. Also option‐
ally set the top visible process name in Linux. Naming of individual threads can also be enabled on Linux to aid debugging.

-uuid uuid
Set system UUID.

Block device options -fda file

-fdb file
Use file as floppy disk 0/1 image (see disk_005fimages).

-hda file

-hdb file

-hdc file

-hdd file
Use file as hard disk 0, 1, 2 or 3 image (see disk_005fimages).

-cdrom file
Use file as CD-ROM image (you cannot use -hdc and -cdrom at the same time). You can use the host CD-ROM by using /dev/cdrom as filename.

-blockdev option[,option[,option[,…]]]
Define a new block driver node. Some of the options apply to all block drivers, other options are only accepted for a specific block driver.
See below for a list of generic options and options for the most common block drivers.

      Options that expect a reference to another node (e.g. file) can be given in two ways. Either you specify the node name of an already  existing
      node  (file=node-name),  or  you define a new node inline, adding options for the referenced node after a dot (file.filename=path,file.aio=na‐
      tive).

      A block driver node created with -blockdev can be used for a guest device by specifying its node name for the drive property in a -device  ar‐
      gument that defines a block device.

      Valid options for any block driver node:

             driver Specifies the block driver to use for the given node.

             node-name
                    This  defines  the name of the block driver node by which it will be referenced later. The name must be unique, i.e. it must not
                    match the name of a different block driver node, or (if you use -drive as well) the ID of a drive.

                    If no node name is specified, it is automatically generated.  The generated node name is not  intended  to  be  predictable  and
                    changes between QEMU invocations. For the top level, an explicit node name must be specified.

             read-only
                    Open the node read-only. Guest write attempts will fail.

                    Note that some block drivers support only read-only access, either generally or in certain configurations. In this case, the de‐
                    fault value read-only=off does not work and the option must be specified explicitly.

             auto-read-only
                    If auto-read-only=on is set, QEMU may fall back to read-only usage even when read-only=off is requested, or even switch  between
                    modes as needed, e.g. depending on whether the image file is writable or whether a writing user is attached to the node.

             force-share
                    Override  the  image  locking  system of QEMU by forcing the node to utilize weaker shared access for permissions where it would
                    normally request exclusive access. When there is the potential for multiple instances to have the same file open  (whether  this
                    invocation  of  QEMU  is  the first or the second instance), both instances must permit shared access for the second instance to
                    succeed at opening the file.

                    Enabling force-share=on requires read-only=on.

             cache.direct
                    The host page cache can be avoided with cache.direct=on.  This will attempt to do disk IO directly to the guest's  memory.  QEMU
                    may still perform an internal copy of the data.

             cache.no-flush
                    In  case  you  don't care about data integrity over host failures, you can use cache.no-flush=on. This option tells QEMU that it
                    never needs to write any data to the disk but can instead keep things in cache. If anything goes wrong, like  your  host  losing
                    power, the disk storage getting disconnected accidentally, etc. your image will most probably be rendered unusable.

             discard=discard
                    discard  is  one of "ignore" (or "off") or "unmap" (or "on") and controls whether discard (also known as trim or unmap) requests
                    are ignored or passed to the filesystem.  Some machine types may not support discard requests.

             detect-zeroes=detect-zeroes
                    detect-zeroes is "off", "on" or "unmap" and enables the automatic conversion of plain zero writes by the OS to  driver  specific
                    optimized zero write commands. You may even choose "unmap" if discard is set to "unmap" to allow a zero write to be converted to
                    an unmap operation.

      Driver-specific options for file
             This is the protocol-level block driver for accessing regular files.

             filename
                    The path to the image file in the local filesystem

             aio    Specifies the AIO backend (threads/native, default: threads)

             locking
                    Specifies whether the image file is protected with Linux OFD / POSIX locks. The default is to use the Linux Open File Descriptor
                    API if available, otherwise no lock is applied.  (a
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值