v2v: emit -oo vdsm-...=... plugin options instead of deprecated --vds…#455
Open
aikei421 wants to merge 1 commit intooVirt:masterfrom
Open
v2v: emit -oo vdsm-...=... plugin options instead of deprecated --vds…#455aikei421 wants to merge 1 commit intooVirt:masterfrom
aikei421 wants to merge 1 commit intooVirt:masterfrom
Conversation
dupondje
requested changes
Feb 2, 2026
Member
dupondje
left a comment
There was a problem hiding this comment.
Looks good. Just a remark on the tests.
And next to that, please also sign your commits with 'Signed-off-by' tag (git commit -s), and add some info in the commit message.
Thanks!
| action='store_true', | ||
| help='Enable tracing of libguestfs API calls.') | ||
| parser.add_argument('vmname', nargs='?') | ||
| parser.add_argument('-oo', action='append', dest='oo', default=[], |
Member
There was a problem hiding this comment.
While this works, I would perhaps adjust the existing parsers?
Cause now they are there without any reason.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This patch updates vdsm/v2v.py and related tests so that VDSM passes virt-v2v plugin
options in the modern
-oo key=valueform instead of the deprecated--vdsm-key valuepairs.Motivation
Newer virt-v2v versions expect plugin options in
-oo key=valueform and reject--vdsm-*style arguments (causing invocation failures such as"unrecognized option '--vdsm-vm-uuid'"). This change restores compatibility
between VDSM-generated commands and current virt-v2v releases.
https://www.mankier.com/1/virt-v2v-output-ovirt
What I changed
vdsm/v2v.py
--vdsm-<name> <value>with
-oo/key=valuepairs.-oo vdsm-image-uuid=<id> -oo vdsm-vol-uuid=<id>tests/fake-virt-v2v
-oo key=valuearguments andmap them to the same internal variables the rest of the fake program uses.
This keeps tests compatible with both old
--vdsm-*and new-ooforms.
tests (v2v_test.py)
-oo vdsm-...=...pairs. Test suite passes locallyafter the change.
Reproduction / Before/After
Before:
/usr/bin/virt-v2v: unrecognized option '--vdsm-vm-uuid'After:
virt-v2v -oo vdsm-vm-uuid=<id> -oo vdsm-ovf-output=<path> -oo vdsm-image-uuid=<id> ...Testing
python3 -m py_compile vdsm/v2v.py(syntax check)pytest tests/v2v_test.py::v2vTests::testV2VOutput(unit test added/updated)import completed and VM booted successfully.
Compatibility
-ooplugin options that virt-v2v expects. Tests and the fake test helper nowaccept both forms to preserve compatibility for older test cases.
Notes for reviewers
--vdsm-*occurrences in the repo (I updated theobvious spots used for virt-v2v invocations; if there are other code paths that
build
virt-v2vcommands, they should be checked).-ookey=value; ensure this helper change is acceptable for CI.
-ooexactly as virt-v2v expects (pairs of-ooandkey=value).Order of
-oopairs matters in tests that assert exact command sequences;tests were updated accordingly.