Skip to content

Commit

Permalink
Call vm.start only when power_state is Running
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelnano committed Dec 28, 2023
1 parent 39033f7 commit e3b78ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (c *Client) CreateVm(vmReq Vm, createTime time.Duration) (*Vm, error) {
}

bootAfterCreate := params["bootAfterCreate"].(bool)
if !bootAfterCreate {
if !bootAfterCreate && vmReq.PowerState == client.RunningPowerState {

Check failure on line 350 in client/vm.go

View workflow job for this annotation

GitHub Actions / Build (1.20, ubuntu-latest)

undefined: client
err = c.StartVm(vmId)
if err != nil {
return nil, err
Expand Down

0 comments on commit e3b78ae

Please sign in to comment.