Skip to content

Commit bdda90b

Browse files
committed
run: explicitly specify format=raw for disk images
Not specifying a disk image file format leads to QEMU issuing a warning and write-protecting block 0. This is seldom desirable: ``` WARNING: Image format was not specified for '/path/to/file' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. ``` To squelch the warning, specify `format=raw` explicitly. This will be made configurable in the next commit. Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
1 parent a433454 commit bdda90b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

virtme/commands/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,7 @@ def do_it() -> int:
15851585
"if=none",
15861586
f"id={driveid}",
15871587
f"file={disk.path}",
1588+
"format=raw",
15881589
]
15891590
device_opts = [
15901591
arch.virtio_dev_type("blk"),
@@ -1616,6 +1617,7 @@ def do_it() -> int:
16161617
"if=none",
16171618
f"id={driveid}",
16181619
f"file={disk.path}",
1620+
"format=raw",
16191621
]
16201622
device_opts = [
16211623
"scsi-hd",

0 commit comments

Comments
 (0)