Skip to content

Commit

Permalink
machinedriver: Implement Kill()
Browse files Browse the repository at this point in the history
  • Loading branch information
cfergeau committed Nov 20, 2024
1 parent 5344b3a commit 7722e28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/machinedriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,13 @@ func (d *Driver) GetState() (state.State, error) {

// Kill stops a host forcefully
func (d *Driver) Kill() error {
return fmt.Errorf("Kill() unimplemented")
fmt.Printf("Forcefully stopping machine %q\n", d.vmConfig.Name)
if err := d.stop(false); err != nil {
return err
}
//newMachineEvent(events.Stop, events.Event{Name: vmName})
fmt.Printf("Machine %q forcefully stopped\n", d.vmConfig.Name)
return nil
}

// Remove a host
Expand Down

0 comments on commit 7722e28

Please sign in to comment.