Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions plugins/module_utils/nbdkit/nbdkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,19 @@ func versionIsLower(cVersion, rVersion string) bool {
*/

// buildV2VCommand constructs the virt-v2v-in-place command string.
// Paths are wrapped in single quotes to handle directory names with spaces.
func buildV2VCommand(path, rsPath, bsPath, extraOpts string) string {
opts := ""
if rsPath != "" {
opts = opts + " --run " + rsPath
opts = opts + " --run '" + rsPath + "'"
}
if bsPath != "" {
opts = opts + " --firstboot " + bsPath
opts = opts + " --firstboot '" + bsPath + "'"
}
if extraOpts != "" {
opts += " " + extraOpts
}
return "virt-v2v-in-place" + opts + " -i disk " + path
return "virt-v2v-in-place" + opts + " -i disk '" + path + "'"
}

func V2VConversion(path, rsPath, bsPath, extraOpts string, debug bool) error {
Expand Down
Loading