Skip to content

fix: quote paths in buildV2VCommand to handle spaces in VM names#225

Open
miguelntt wants to merge 1 commit intoos-migrate:mainfrom
miguelntt:fix/v2v-path-spaces
Open

fix: quote paths in buildV2VCommand to handle spaces in VM names#225
miguelntt wants to merge 1 commit intoos-migrate:mainfrom
miguelntt:fix/v2v-path-spaces

Conversation

@miguelntt
Copy link
Copy Markdown

Problem

When a VM name or script path contains spaces, the virt-v2v-in-place command built by buildV2VCommand fails because the shell interprets the spaces as argument separators. For example, a VM named My Virtual Machine produces a disk path that when passed unquoted to the shell breaks the command.

Fix

Wrap path, rsPath and bsPath in single quotes inside buildV2VCommand. extraOpts is intentionally left unquoted as it may contain multiple flags.

Files changed

  • plugins/module_utils/nbdkit/nbdkit.go — 3 lines changed in buildV2VCommand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant