Skip to content

Commit bb29001

Browse files
committed
Set transfer network on the conversion pod
Before version 2.4, the virt-v2v conversion pod operated on a local disk after the disk was retrieved by CDI. CDI considered the transfer network when transfering the data from vSphere. As from version 2.4, when running a cold-migration to the local cluster, virt-v2v is also responsible to connect to vSphere and retrieve the disk(s) from there, therefore it now needs to consider the transfer network that is selected as well. This patch adds the transfer network, if set, on the conversion pod in both cases. Signed-off-by: Arik Hadas <ahadas@redhat.com>
1 parent 1edba22 commit bb29001

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controller/plan/kubevirt.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,10 +1230,17 @@ func (r *KubeVirt) guestConversionPod(vm *plan.VMStatus, vmVolumes []cnv.Volume,
12301230
if err != nil {
12311231
return
12321232
}
1233+
// pod annotations
1234+
annotations := map[string]string{}
1235+
if r.Plan.Spec.TransferNetwork != nil {
1236+
annotations[AnnDefaultNetwork] = path.Join(
1237+
r.Plan.Spec.TransferNetwork.Namespace, r.Plan.Spec.TransferNetwork.Name)
1238+
}
12331239
// pod
12341240
pod = &core.Pod{
12351241
ObjectMeta: meta.ObjectMeta{
12361242
Namespace: r.Plan.Spec.TargetNamespace,
1243+
Annotations: annotations,
12371244
Labels: r.conversionLabels(vm.Ref, false),
12381245
GenerateName: r.getGeneratedName(vm),
12391246
},

0 commit comments

Comments
 (0)