Skip to content

Commit

Permalink
fix: power on the machine on reboot request in qemu power api
Browse files Browse the repository at this point in the history
IPMI powers on a machine when a PowerCycle command is sent, making a prior power on call unnecessary. We probably want to do the same thing in our API-based power implementation.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
  • Loading branch information
utkuozdemir committed Dec 11, 2024
1 parent 10da553 commit fe04571
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/provision/providers/qemu/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ func (c *Controller) Reboot() error {
c.mu.Lock()

if c.state == PoweredOff {
c.state = PoweredOn

c.mu.Unlock()

c.commandsCh <- VMCommandStart

return nil
}

Expand Down

0 comments on commit fe04571

Please sign in to comment.