Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vmm: Deprecate image type auto detection - #8219

Merged
likebreath merged 1 commit into
cloud-hypervisor:mainfrom
likebreath:0514/deprecate_image_type_autodetection
May 14, 2026
Merged

likebreath merged 1 commit into
cloud-hypervisor:mainfrom
likebreath:0514/deprecate_image_type_autodetection

Conversation

@likebreath

Copy link
Copy Markdown
Member

No description provided.

@likebreath
likebreath requested a review from a team as a code owner May 14, 2026 16:59
@likebreath
likebreath requested a review from rbradford May 14, 2026 16:59
@likebreath

likebreath commented May 14, 2026

Copy link
Copy Markdown
Member Author

I want to flag that live upgrade from pre-v51.0 would likely be broken at the time when the auto-detection feature is removed in a future release, as pre-v51.0 does not have image_type field and relies on default serialization that is ImageType:Unkown. A potential workaround is upgrading pre-v51.0 to v51.x and then to the latest version.

Comment thread vmm/src/device_manager.rs
Comment on lines +2698 to +2702
warn!(
"DEPRECATION: auto-detection of disk image type is deprecated and will be \
removed in a future release. Please specify image type explicitly."
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should only warn when we autodetected to non-RAW?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, if our plan is to make image_type a required field in a future release, why is RAW a special case that shouldn't get a deprecation warning?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO having a warning on all seems consistent, since image_type will become mandatory regardless of format.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, with no automatic and absence of image_type, it can fallback to RAW, could be a possibility, too. But in that case, would seem still ok to be verbose to attract attention to the fact. Thanks

@likebreath
likebreath added this pull request to the merge queue May 14, 2026
@rbradford

Copy link
Copy Markdown
Member

I was working on the assumption that most people use raw image files so therefore we shouldn't require image_type=raw. And that it would only be needed for non-raw files (of course folks can provide it for raw too).

@rbradford

Copy link
Copy Markdown
Member

I don't think there is an need to change the wording in this PR - but we should continue the conversation. If the consensus is to always require image_type - even for raw files then i'm cool with that too!

@likebreath

Copy link
Copy Markdown
Member Author

If the consensus is to always require image_type

Yeah. That would be cleaner (perhaps safer) to me, always require explicit image type, including RAW.

Merged via the queue into cloud-hypervisor:main with commit b4b9982 May 14, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants