Skip to content

Commit

Permalink
Merge pull request #198 from terraform-providers/b-gw-discovery-power…
Browse files Browse the repository at this point in the history
…ed-off-vm-crash

r/virtual_machine: Don't attempt to discover gateway on power off
  • Loading branch information
vancluever authored Oct 11, 2017
2 parents d4b8ba0 + 710fcfe commit f84f2e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vsphere/resource_vsphere_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ func resourceVSphereVirtualMachineRead(d *schema.ResourceData, meta interface{})
}
}
log.Printf("[DEBUG] networks: %#v", networkInterfaces)
if mvm.Guest.IpStack != nil {
if mvm.Guest.IpStack != nil && len(mvm.Guest.Net) > 0 {
for _, v := range mvm.Guest.IpStack {
if v.IpRouteConfig != nil && v.IpRouteConfig.IpRoute != nil {
for _, route := range v.IpRouteConfig.IpRoute {
Expand Down

0 comments on commit f84f2e6

Please sign in to comment.