像这样将块设备传递给 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?