【问题标题】:qom-type is missing when running qemu/kvm运行 qemu/kvm 时缺少 qom-type
【发布时间】:2021-08-24 02:33:09
【问题描述】:

我正在尝试设置 QEMU/KVM 并遇到以下问题:

$ qemu-img create  ubuntu.img 64G //Create image with raw format, not qcow2
$ qemu-system-x86_64 -hda ubuntu.img -cdrom ~/Downloads/ubuntu-20.04.2.0-desktop-amd64.iso -cpu host -enable-kvm
WARNING: Image format was not specified for 'ubuntu.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
VNC server running on 127.0.0.1:5900

所以我尝试将其指定为格式

$ qemu-system-x86_64 -hda ubuntu.img -cdrom ~/Downloads/ubuntu-20.04.2.0-desktop-amd64.iso -cpu host -enable-kvm -object format=raw
qemu-system-x86_64: -object format=raw: Parameter 'qom-type' is missing

QEMU manual page 搜索qom-type 没有得到任何结果。

如何为这种情况指定正确的qom-type

【问题讨论】:

    标签: linux virtual-machine qemu kvm


    【解决方案1】:

    "-object format=raw" 表示“创建一个我没有指定类型的 QOM 对象,然后给它选项 format=raw”。错误消息有点无用,但它试图告诉您这没有意义。

    您需要做的是将“-hda ubuntu.img”替换为“长格式”选项集,这些选项为您提供了一个位置来告诉 QEMU 对该磁盘映像文件使用 format=raw。您可以在the answer to this existing question 中了解如何执行此操作。

    【讨论】:

      猜你喜欢
      • 2019-12-17
      • 2020-09-28
      • 1970-01-01
      • 2013-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-01
      • 1970-01-01
      相关资源
      最近更新 更多