mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
vSphere Panic Fix
This fixes issue #2635 related to no network being passed during an image upload as no network is required. However a hostname is still required due to vCenter handing the upload to a vSphere server and it’s DataStore. Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
This commit is contained in:
parent
fba575a9fb
commit
3f544d25ed
@ -199,9 +199,9 @@ func vCenterConnect(ctx context.Context, newVM vmConfig) (*govmomi.Client, *obje
|
||||
log.Fatalln("Error locating default datacenter folder")
|
||||
}
|
||||
|
||||
// Check if network connectivity is requested
|
||||
// This code is shared between Push/Run, a network isn't needed for Pushing an image
|
||||
var net object.NetworkReference
|
||||
if *newVM.networkName != "" {
|
||||
if newVM.networkName != nil && *newVM.networkName != "" {
|
||||
net, err = f.NetworkOrDefault(ctx, *newVM.networkName)
|
||||
if err != nil {
|
||||
log.Fatalf("Network [%s], could not be found", *newVM.networkName)
|
||||
|
Loading…
Reference in New Issue
Block a user