Skip to content

Commit

Permalink
Fix warm migration windows static ip (#1066)
Browse files Browse the repository at this point in the history
Issue: 
The windows is missing the static IP address mapping.

Fix:
Add the `--mac` mapping so the virt-v2v-in-place flow.

Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas authored Sep 23, 2024
1 parent 0de3046 commit 36b19e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions virt-v2v/cmd/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func runVirtV2vInPlace() error {
} else {
args = append(args, "first")
}
if envStaticIPs := os.Getenv("V2V_staticIPs"); envStaticIPs != "" {
for _, macToIp := range strings.Split(envStaticIPs, "_") {
args = append(args, "--mac", macToIp)
}
}
args = append(args, "/mnt/v2v/input.xml")
v2vCmd := exec.Command("/usr/libexec/virt-v2v-in-place", args...)
v2vCmd.Stdout = os.Stdout
Expand Down

0 comments on commit 36b19e6

Please sign in to comment.