Dont check for poweron command error to force retry at state check (#3195)
This commit is contained in:
parent
6ce847e720
commit
4ac6e2a08c
|
@ -65,10 +65,8 @@ func (d *ESX5Driver) ReloadVM() error {
|
||||||
|
|
||||||
func (d *ESX5Driver) Start(vmxPathLocal string, headless bool) error {
|
func (d *ESX5Driver) Start(vmxPathLocal string, headless bool) error {
|
||||||
for i := 0; i < 20; i++ {
|
for i := 0; i < 20; i++ {
|
||||||
err := d.sh("vim-cmd", "vmsvc/power.on", d.vmId)
|
//intentionally not checking for error since poweron may fail specially after initial VM registration
|
||||||
if err != nil {
|
d.sh("vim-cmd", "vmsvc/power.on", d.vmId)
|
||||||
return err
|
|
||||||
}
|
|
||||||
time.Sleep((time.Duration(i) * time.Second) + 1)
|
time.Sleep((time.Duration(i) * time.Second) + 1)
|
||||||
running, err := d.IsRunning(vmxPathLocal)
|
running, err := d.IsRunning(vmxPathLocal)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue