Commit 9cbdc80
vSphere Provider - Fix destroy when vm is powered off or has networks (hashicorp#7206)
This patch adds a wait when powering on a vm so setupVirtualMachine does
not return until the vm is actually powered on. This allows other
functions to work off the assumption that the current state of the vm
is not in flux. During resourceVSphereVirtualMachineRead(), the wait for
IP would cause a hang for any VM with no network interfaces or for vms
that had been powered off for any reason. This also means that the user
could not delete a vm with no network interfaces or that is powered off.
Checking power state before trying to check for network interfaces.
Resolves hashicorp#71681 parent 2f3f1da commit 9cbdc80
1 file changed
Lines changed: 23 additions & 15 deletions
Lines changed: 23 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | 641 | | |
648 | 642 | | |
649 | 643 | | |
| |||
916 | 910 | | |
917 | 911 | | |
918 | 912 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
| 913 | + | |
923 | 914 | | |
924 | 915 | | |
925 | 916 | | |
926 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1067 | 1071 | | |
1068 | 1072 | | |
1069 | 1073 | | |
| |||
1989 | 1993 | | |
1990 | 1994 | | |
1991 | 1995 | | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1992 | 2000 | | |
1993 | 2001 | | |
1994 | 2002 | | |
0 commit comments