qemu: update readonly flag for block devices

since qemu 6.0, readonly flag for block devices must be enable or
disable with `on` or `off` respectively.

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes
2021-12-14 11:55:19 -06:00
parent d432e21d6f
commit b17f07395c
2 changed files with 2 additions and 2 deletions

View File

@@ -1219,7 +1219,7 @@ func (blkdev BlockDevice) QemuParams(config *Config) []string {
blkParams = append(blkParams, fmt.Sprintf("if=%s", blkdev.Interface))
if blkdev.ReadOnly {
blkParams = append(blkParams, "readonly")
blkParams = append(blkParams, "readonly=on")
}
qemuParams = append(qemuParams, "-device")