diff --git a/virt-v2v/cmd/entrypoint.go b/virt-v2v/cmd/entrypoint.go index eaf3e328b..8bc88e76b 100644 --- a/virt-v2v/cmd/entrypoint.go +++ b/virt-v2v/cmd/entrypoint.go @@ -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