Skip to content

Commit

Permalink
fix: panic during power off
Browse files Browse the repository at this point in the history
  • Loading branch information
faiq committed Jun 6, 2024
1 parent c6fff57 commit d70b1e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builder/nutanix/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,14 +930,16 @@ func (d *NutanixDriver) PowerOff(vmUUID string) error {
<-time.After(1 * time.Second)
continue
}
return fmt.Errorf("error while GetTask, %s", err.Error())
if err != nil {
return fmt.Errorf("error while GetTask, %s", err.Error())
}
}

log.Printf("PowerOff task: %s", taskUUID)
return nil
}
func (d *NutanixDriver) SaveVMDisk(diskUUID string, index int, imageCategories []Category) (*nutanixImage, error) {

func (d *NutanixDriver) SaveVMDisk(diskUUID string, index int, imageCategories []Category) (*nutanixImage, error) {
configCreds := client.Credentials{
URL: fmt.Sprintf("%s:%d", d.ClusterConfig.Endpoint, d.ClusterConfig.Port),
Endpoint: d.ClusterConfig.Endpoint,
Expand Down

0 comments on commit d70b1e7

Please sign in to comment.