Skip to content

Design proposal for supported image formats (v3) #6550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

gthvn1
Copy link
Contributor

@gthvn1 gthvn1 commented Jun 23, 2025

Add details on specifying image format for VDI and VM migration. In particular This revision explains how to choose the destination image format during VDI creation and migration, including VM migration scenarios.
Also fixes minor typos in the document.

@gthvn1
Copy link
Contributor Author

gthvn1 commented Jun 23, 2025

Note: I didn't find how to reopen #6360 so I submitted this one.

image-format:<VDI2_UUID>=qcow2 \
uuid=<VM_UUID>
```
The destination image format would be a string such as *vhd*, *qcow2*, or another
Copy link
Contributor

Choose a reason for hiding this comment

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

Architecturally, the destination format could be a list of formats in order of preference where we currently keep this to one element. But maybe this is overloading this feature and we could do this later as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that we could do it later but I agree that it is a good idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we are talking about lists, sets, and so on: we need to be careful if those exist as a data structure on the API level or are represented as strings somewhere else. For a string representation details matter: is this a space separated or comma separated? The formats by themselves are probably words that must not contain punctuation or spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understand correctly only the "supported image format" provided by the SM plugin will be stored in the xapi database. And it will be a list of image format like the one find for capabilities
So in DRIVER_INFO you will have a new field supported_image_format with the list of supported image format (that will be a set of strings).

DRIVER_INFO = {
    'name': 'Local EXT3 VHD',
    'description': 'SR plugin which represents disks as VHD files stored on a local EXT3 filesystem, created inside an LVM volume',
    ...
    'supported_image_formats': ['vhd', 'raw']
    }

So yes formats will be words without punctuation or spaces. And I didn't mention it (I should) but it will be case insensitive. "qcow2" is equivalent to "Qcow2".

@gthvn1 gthvn1 force-pushed the feature/supported-image-formats-v3 branch from f36034e to a0bba90 Compare June 24, 2025 11:40
Add details on specifying image format for VDI and VM migration.
In particular This revision explains how to choose the destination image
format during VDI creation and migration, including VM migration
scenarios.
Also fixes minor typos in the document.

Signed-off-by: Guillaume <guillaume.thouvenin@vates.tech>
Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

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

I think some specifics are still missing, in particular, what are the exact errors that need to be raised and how exactly the VM migration API needs to change.

These can be done in the v4 of the proposal, this is much better than before

@psafont psafont added this pull request to the merge queue Jun 25, 2025
Merged via the queue into xapi-project:master with commit 1f346bd Jun 25, 2025
16 checks passed
@gthvn1
Copy link
Contributor Author

gthvn1 commented Jun 25, 2025

Agree for the exact error and currently for testing I'm returning "vdi_incompatible_type" but for final upstream version I think a specific error will be better. Will be in v4 :)

@psafont psafont deleted the feature/supported-image-formats-v3 branch June 25, 2025 10:16
@psafont psafont restored the feature/supported-image-formats-v3 branch June 25, 2025 10:16
@gthvn1 gthvn1 deleted the feature/supported-image-formats-v3 branch June 25, 2025 11:39
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.

3 participants