Skip to content

Commit

Permalink
Merge pull request #4042 from pevogam/default-image-format
Browse files Browse the repository at this point in the history
Use raw image format by default for block devices
  • Loading branch information
YongxueHong authored Jan 17, 2025
2 parents fef8380 + 45a1e2b commit 44d5e2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions virttest/qemu_devices/qcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2563,9 +2563,11 @@ def define_hbas(
format_cls = qdevices.QBlockdevFormatLuks
elif imgfmt == "nvme":
format_cls = qdevices.QBlockdevFormatRaw
elif imgfmt is None:
# use RAW type as the default
elif imgfmt is None or imgfmt == "":
# use RAW type as the default (None or empty string)
format_cls = qdevices.QBlockdevFormatRaw
else:
raise ValueError(f"Unsupported image format: {imgfmt}")

protocol_node = protocol_cls(name)
devices.append(protocol_node)
Expand Down

0 comments on commit 44d5e2b

Please sign in to comment.