mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Merge pull request #2673 from thebsdbox/vSphere_panic_fix
vSphere Panic Fix
This commit is contained in:
commit
42593a2b7f
@ -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