Features/DriveRefactoring: Difference between revisions

From QEMU
(Created page with '== Summary == Refactor -drive option to better reflect separation of backend and frontend. == Owner == * '''Name:''' Anthony Liguori * '''Email:''' anth…')
 
(Feature has been completed)
 
(One intermediate revision by one other user not shown)
Line 11: Line 11:
To create a separate drive backend, today we need to specify:
To create a separate drive backend, today we need to specify:


{{{
  -drive file=/path/to/image,if=none,id=foo
  -drive file=/path/to/image,if=none,id=foo
  -device virtio-blk-pci,drive=foo
  -device virtio-blk-pci,drive=foo
}}}


This is awkward to use at best and is not symmetric to other options in qemu.  This feature proposes a new syntax:
This is awkward to use at best and is not symmetric to other options in qemu.  This feature proposes a new syntax:


{{{
  -blkdev file=/path/to/image,id=foo
  -blkdev file=/path/to/image,id=foo
  -device virtio-vlk-pci,blkdev=foo
  -device virtio-vlk-pci,blkdev=foo
}}}


{{{-blkdev}}} only takes valid backend options.  Like netdev and fsdev, the same name is used to connect the backend.  -drive would continue to be supported as a syntactic short-cut.
-blkdev only takes valid backend options.  Like netdev and fsdev, the same name is used to connect the backend.  -drive would continue to be supported as a syntactic short-cut.
 
== Status ==
 
The feature has been completed (but it's called '-blockdev' now and not 'blkdev')
 
[[Category:Completed feature pages]]

Latest revision as of 14:59, 9 July 2020

Summary

Refactor -drive option to better reflect separation of backend and frontend.

Owner

Detailed Summary

To create a separate drive backend, today we need to specify:

-drive file=/path/to/image,if=none,id=foo
-device virtio-blk-pci,drive=foo

This is awkward to use at best and is not symmetric to other options in qemu. This feature proposes a new syntax:

-blkdev file=/path/to/image,id=foo
-device virtio-vlk-pci,blkdev=foo

-blkdev only takes valid backend options. Like netdev and fsdev, the same name is used to connect the backend. -drive would continue to be supported as a syntactic short-cut.

Status

The feature has been completed (but it's called '-blockdev' now and not 'blkdev')