ブロックデバイスをQemuに渡す

ブロックデバイスをQemuに渡す

このようにブロックデバイスをQemu 3.0.1に渡すと機能しますが、サポート中断警告が生成されます。

-blockdev file,node-name=f1,filename=/dev/loop0 \
-blockdev raw,node-name=q1,file=f1 \
-device virtio-blk,drive=q1

警告する:

qemu-system-x86_64: -blockdev file,node-name=f1,filename=/dev/loop0: 
  warning: Opening a block device as a file using the 'file' driver
    is deprecated

十分です。しかし、「ファイル」ドライバを使用せずにブロックデバイスをqemuにどのように渡しますか?

ベストアンサー1

あなたはする必要がありますhost_device代わりに使用、文書化されていないので本当に難しいです。

あなたの場合、使用されなくなったオプションは次のとおりです。

-blockdev node-name=q1,driver=raw,file.driver=host_device,file.filename=/dev/loop0 \
-device virtio-blk,drive=q1

おすすめ記事