已弃用的功能
不是原创只提供翻译!机器翻译可能不正常!
已弃用的功能
通常,功能旨在无限期地支持一次 引入QEMU。如果需要删除某个要素, 它将在本节中列出。该功能将保持功能 已弃用的版本和另一个版本。在这两者之后 发布后,该功能可能会被删除。已弃用的功能也可能 在 QEMU 启动时或在通过 监视命令,但是,这不是强制性要求。
在 2.10.0 版本之前,没有关于如何的官方政策 长功能在删除之前将被弃用,也不会 任何已弃用的功能的文档列表。因此 在 2.10.0 之前弃用的任何功能都将被视为 它们在 2.10.0 版本中首次被弃用。
以下是当前标记为 荒废的。
构建选项
gprof
内部版本(自 8.0 起)
配置设置依赖于编译器 检测以收集其数据,这些数据可能会扭曲生成的 轮廓。由于其他非仪器工具可用,因此可提供 使用非检测二进制文件更全面地了解系统 弃用生成选项,不再在 CI 中保护它。分析测试用例的构建选项仍然存在 覆盖。--enable-gprof
--enable-gcov
系统仿真器命令行参数
QEMU_AUDIO_
环境变量和(自 4.0 起)-audio-help
参数现在是指定音频的首选方法 后端设置而不是环境变量。为了简化迁移到 新格式,该选项可用于转换 环境变量到选项的当前值。-audiodev
-audiodev-help
-audiodev
创建没有属性的声卡设备和 vnc(从 4.2 开始)audiodev=
不使用已弃用的旧版音频配置时,每个声卡 应指定一个属性。此外,使用 VNC,如果您计划指定一个属性,则应指定一个属性 通过 VNC 协议传输音频。audiodev=
audiodev=
短格式布尔选项(自 6.0 起)
布尔选项,例如 / 可以写入 简称为 和 。现已弃用 并会引起警告。share=on
share=off
share
noshare
delay
套接字字符设备选项(自 6.0 起)
短格式布尔选项的替换是 而不是 。nodelay
nodelay=on
delay=off
-smp
(“参数=0” SMP 配置)(自 6.2 起)
指定的 CPU 拓扑参数必须大于零。
在 SMP 配置中,用户应提供 CPU 拓扑 具有合理值(大于零)的参数或省略它 QEMU将计算缺失值。
但是,从历史上看,它隐式地允许用户提供 值为零的参数,这是没有意义的,也可能 在 -SMP 分析中导致意外结果。所以支持这种 配置(例如 -smp 8,sockets=0)自 6.2 起被弃用,并且将 在不久的将来被移除,用户要保证所有的拓扑结构 使用 -SMP 描述的成员大于零。
插件参数传递(自 6.1 起)arg=<string>
通过 TCG 插件参数传递是多余的,这使得 命令行的可读性较差,尤其是当参数本身由 名称和值,例如 . 因此,用法是多余的。处理单字参数 作为短格式布尔值,并作为 . 但是,短格式布尔值已被弃用,首选完全显式形式。arg=
-plugin plugin_name,arg="arg_name=arg_value"
arg
arg_name=on
arg_name=on
-no-hpet
(since 8.0)
The HPET setting has been turned into a machine property. Use instead.-machine hpet=off
-no-acpi
(since 8.0)
The setting has been turned into a machine property. Use instead.-no-acpi
-machine acpi=off
-accel hax
(since 8.0)
The HAXM project has been retired (see https://github.com/intel/haxm#status). Use “whpx” (on Windows) or “hvf” (on macOS) instead.
-async-teardown
(since 8.1)
Use instead.-run-with async-teardown=on
-chroot
(since 8.1)
Use instead.-run-with chroot=dir
-singlestep
(since 8.1)
The option has been turned into an accelerator property, and given a name that better reflects what it actually does. Use instead.-singlestep
-accel tcg,one-insn-per-tb=on
User-mode emulator command line arguments
-singlestep
(since 8.1)
The option has been given a name that better reflects what it actually does. For both linux-user and bsd-user, use the new option instead.-singlestep
-one-insn-per-tb
QEMU Machine Protocol (QMP) commands
blockdev-open-tray
, argument (since 2.8)blockdev-close-tray
device
Use argument instead.id
eject
argument (since 2.8)device
Use argument instead.id
blockdev-change-medium
argument (since 2.8)device
Use argument instead.id
block_set_io_throttle
argument (since 2.8)device
Use argument instead.id
blockdev-add
empty string argument (since 2.10)backing
Use argument value instead.null
block-commit
arguments and (since 3.1)base
top
Use arguments and instead.base-node
top-node
nbd-server-add
and (since 5.2)nbd-server-remove
Use the more generic commands and instead. As part of this deprecation, where used a single , the new uses a list of .block-export-add
block-export-del
nbd-server-add
bitmap
block-export-add
bitmaps
query-qmp-schema
return value member (since 6.2)values
Member in return value elements with meta-type is deprecated. Use instead.values
enum
members
drive-backup
(since 6.2)
Use in combination with instead. This change primarily separates the creation/opening process of the backup target with explicit, separate steps. uses mostly the same arguments as , except the and options are removed in favor of using explicit and calls. See Live Block Device Operations for details.blockdev-backup
blockdev-add
blockdev-backup
drive-backup
format
mode
blockdev-create
blockdev-add
Incorrectly typed arguments (since 6.2)device_add
Due to shortcomings in the internal implementation of , QEMU incorrectly accepts certain invalid arguments: Any object or list arguments are silently ignored. Other argument types are not checked, but an implicit conversion happens, so that e.g. string values can be assigned to integer device properties or vice versa.device_add
This is a bug in QEMU that will be fixed in the future so that previously accepted incorrect commands will return an error. Users should make sure that all arguments passed to are consistent with the documented property types.device_add
StatusInfo
member (since 8.1)singlestep
The member of the returned from the command is deprecated. This member has a confusing name and it never did what the documentation claimed or what its name suggests. We do not believe that anybody is actually using the information provided in this member.singlestep
StatusInfo
query-status
The information it reports is whether the TCG JIT is in “one instruction per translated block” mode (which can be set on the command line or via the HMP, but not via QMP). The information remains available via the HMP ‘info jit’ command.
QEMU Machine Protocol (QMP) events
MEM_UNPLUG_ERROR
(since 6.2)
Use the more generic event instead.DEVICE_UNPLUG_GUEST_ERROR
vcpu
trace events (since 8.1)
The ability to instrument QEMU helper functions with vCPU-aware trace points was removed in 7.0. However QMP still exposed the vcpu parameter. This argument has now been deprecated and the remaining remaining trace points that used it are selected just by name.
Human Monitor Protocol (HMP) commands
singlestep
(since 8.1)
The command has been replaced by the command, which has the same behaviour but a less misleading name.singlestep
one-insn-per-tb
Host Architectures
BE MIPS (since 7.2)
As Debian 10 (“Buster”) moved into LTS the big endian 32 bit version of MIPS moved out of support making it hard to maintain our cross-compilation CI tests of the architecture. As we no longer have CI coverage support may bitrot away before the deprecation process completes. The little endian variants of MIPS (both 32 and 64 bit) are still a supported host architecture.
System emulation on 32-bit x86 hosts (since 8.0)
Support for 32-bit x86 host deployments is increasingly uncommon in mainstream OS distributions given the widespread availability of 64-bit x86 hardware. The QEMU project no longer considers 32-bit x86 support for system emulation to be an effective use of its limited resources, and thus intends to discontinue it. Since all recent x86 hardware from the past >10 years is capable of the 64-bit x86 extensions, a corresponding 64-bit OS should be used instead.
System emulator machines
Arm machine property (since 7.1)virt
dtb-kaslr-seed
The property on the board has been deprecated; use the new name instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the node.dtb-kaslr-seed
virt
dtb-randomness
kaslr-seed
pc-i440fx-1.4
up to (since 7.0)pc-i440fx-1.7
These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type instead.
Backend options
Using non-persistent backing file with pmem=on (since 6.1)
This option is used when is consumed by emulated NVDIMM device. However enabling option, when backing file is (a) not DAX capable or (b) not on a filesystem that support direct mapping of persistent memory, is not safe and may lead to data loss or corruption in case of host crash. Options are:memory-backend-file
memory-backend-file.pmem
modify VM configuration to set to continue using fake NVDIMM (without persistence guaranties) with backing file on non DAX storage
pmem=off
move backing file to NVDIMM storage and keep (to have NVDIMM with persistence guaranties).
pmem=on
Device options
Emulated device options
-device virtio-blk,scsi=on|off
(since 5.0)
The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 and later do not support it because the virtio-scsi device was introduced for full SCSI support. Use virtio-scsi instead when SCSI passthrough is required.
Note this also applies to , which is an alias.-device virtio-blk-pci,scsi=on|off
-device nvme-ns,eui64-default=on|off
(since 7.1)
In QEMU versions 6.1, 6.2 and 7.0, the generates an EUI-64 identifier that is not globally unique. If an EUI-64 identifier is required, the user must set it explicitly using the device parameter .nvme-ns
nvme-ns
eui64
-device nvme,use-intel-id=on|off
(since 7.1)
The device originally used a PCI Vendor/Device Identifier combination from Intel that was not properly allocated. Since version 5.2, the controller has used a properly allocated identifier. Deprecate the machine compatibility parameter.nvme
use-intel-id
-device cxl-type3,memdev=xxxx
(since 8.0)
The device initially only used a single memory backend. With the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev.cxl-type3
-fsdev proxy
and (since 8.1)-virtfs proxy
The 9p filesystem backend driver has been deprecated and will be removed (along with its proxy helper daemon) in a future version of QEMU. Please use or for using the 9p filesystem backend, or alternatively consider deploying virtiofsd instead.proxy
-fsdev local
-virtfs local
local
The 9p backend was originally developed as an alternative to the 9p backend. The idea was to enhance security by dispatching actual low level filesystem operations from 9p server (QEMU process) over to a separate process (the virtfs-proxy-helper binary). However this alternative never gained momentum. The proxy backend is much slower than the local backend, hasn’t seen any development in years, and showed to be less secure, especially due to the fact that its helper daemon must be run as root, whereas with the local backend QEMU is typically run as unprivileged user and allows to tighten behaviour by mapping permissions et al by using its ‘mapped’ security model option.proxy
local
Nowadays it would make sense to reimplement the backend by using QEMU’s feature, which would eliminate the high latency costs under which the 9p backend currently suffers. However as of to date nobody has indicated plans for such kind of reimplementation unfortunately.proxy
vhost
proxy
Block device options
"backing": ""
(since 2.12)
In order to prevent QEMU from automatically opening an image’s backing chain, use instead."backing": null
rbd
keyvalue pair encoded filenames: (since 3.1)""
Options for should be specified according to its runtime options, like other block drivers. Legacy parsing of keyvalue pair encoded filenames is useful to open images with the old format for backing files; These image files should be updated to use the current format.rbd
Example of legacy encoding:
json:{"file.driver":"rbd", "file.filename":"rbd:rbd/name"}
以上,转换为当前支持的格式:
json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"}
iscsi,password=xxx
(自 8.0 起)
使用该选项在命令行上以纯文本形式指定 iSCSI 密码是不安全的。该选项应为 改为,用于引用提供 通过文件或加密的密码。password
password-secret
--object secret...
向后兼容性
CPU 型号的可运行性保证(从 4.1 开始)
以前版本的 QEMU 从未更改过现有的 CPU 型号 引入其他主机软件或硬件的方式 对 VM 的要求。这允许管理软件 安全地更改现有 VM 的计算机类型,而无需 引入新要求(“运行性能保证”)。这 阻止更新 CPU 型号以包含 CPU 漏洞缓解,使客人容易受到攻击 默认配置。
CPU 型号可运行性保证将不再适用于 现有 CPU 型号。需要可运行性的管理软件 保证必须使用 QMP 返回的字段解析 CPU 型号别名 命令。alias-of
query-cpu-definitions
保留这些保证的同时,返回值将具有现有的 CPU 型号别名 指向不会破坏可运行性保证的版本 (具体而言,这些 CPU 型号的版本 1)。未来QEMU 版本,别名将指向较新的 CPU 型号版本 根据机器类型,因此管理软件必须 在启动虚拟机之前解析 CPU 型号别名。query-cpu-definitions
QEMU 客座代理
--blacklist
命令行选项(自 7.2 起)
--blacklist
已被替换为(这是一个更好的 此选项的措辞)。短形式仍然保留 相同,因此是应该运行的脚本的首选方式 QEMU 的旧版本和未来版本。--block-rpcs
-b
blacklist
配置文件选项(自 7.2 起)
配置文件选项已重命名为 (与相应命令行的重命名同步 选项)。blacklist
block-rpcs
迁移
skipped
“迁移统计”字段(自 8.1 起)
skipped
迁移统计信息中的字段已被弃用。它没有 使用了10多年。