QEMU: how to specify `index` and `media` with modern `-blockdev` / `-device` notation

  Kiến thức lập trình

With the “legacy” -drive notation I can specify for instance:

-drive file=foo.img,if=virtio,index=0,media=disk

With the “modern” -blckdev and -device notation, I have to write instead:

-blockdev raw,node-name=foo,file.driver=file,file.filename=foo.img -device virtio-blk,drive=foo

But how can I specify index=0 and media=disk?

LEAVE A COMMENT