Skip to content

Commit

Permalink
always take fingerprint from ESXi provider
Browse files Browse the repository at this point in the history
When migrating from an ESXi provider, always take the fingerprint from
the status of the provider, even when there is a transfer network
configured for the host since the SDK of ESXi doesn't return the
fingerprint of the host as vCenter does.

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Jun 5, 2024
1 parent 58d19e3 commit 57dfb48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controller/plan/adapter/vsphere/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ func (r *Builder) getSourceDetails(vm *model.VM, sourceSecret *core.Secret) (lib
Path: "",
RawQuery: sslVerify,
}
fingerprint = host.Thumbprint
if r.Source.Provider.Spec.Settings[api.SDK] == api.ESXI {
// the SDK of ESXi doesn't return a fingerprint/thumbprint for the host
// so we take it from the provider instead
fingerprint = r.Source.Provider.Status.Fingerprint
} else {
fingerprint = host.Thumbprint
}
} else if r.Source.Provider.Spec.Settings[api.SDK] == api.ESXI {
libvirtURL = liburl.URL{
Scheme: "esx",
Expand Down

0 comments on commit 57dfb48

Please sign in to comment.