mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Don't ignore VM power on errors. This prevents Terraform from hanging indefinitely for the VM to power on. (#11604)
This commit is contained in:
parent
ab36571766
commit
4cbd006268
@ -2110,7 +2110,14 @@ func (vm *virtualMachine) setupVirtualMachine(c *govmomi.Client) error {
|
||||
}
|
||||
|
||||
if vm.hasBootableVmdk || vm.template != "" {
|
||||
newVM.PowerOn(context.TODO())
|
||||
t, err := newVM.PowerOn(context.TODO())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = t.WaitForResult(context.TODO(), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = newVM.WaitForPowerState(context.TODO(), types.VirtualMachinePowerStatePoweredOn)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user