diff --git a/builder/parallels/common/driver.go b/builder/parallels/common/driver.go index ac23a7880..4fde15a6c 100644 --- a/builder/parallels/common/driver.go +++ b/builder/parallels/common/driver.go @@ -131,6 +131,7 @@ func NewDriver() (Driver, error) { latestDriver := 11 version, _ := drivers[strconv.Itoa(latestDriver)].Version() majVer, _ := strconv.Atoi(strings.SplitN(version, ".", 2)[0]) + log.Printf("Parallels version: %s", version) if majVer > latestDriver { log.Printf("Your version of Parallels Desktop for Mac is %s, Packer will use driver for version %d.", version, latestDriver) return drivers[strconv.Itoa(latestDriver)], nil diff --git a/builder/parallels/common/driver_9.go b/builder/parallels/common/driver_9.go index b8b697ba1..5634fb123 100644 --- a/builder/parallels/common/driver_9.go +++ b/builder/parallels/common/driver_9.go @@ -222,7 +222,7 @@ func (d *Parallels9Driver) IsRunning(name string) (bool, error) { // Stop forcibly stops the VM. func (d *Parallels9Driver) Stop(name string) error { - if err := d.Prlctl("stop", name); err != nil { + if err := d.Prlctl("stop", name, "--kill"); err != nil { return err } @@ -275,7 +275,6 @@ func (d *Parallels9Driver) Version() (string, error) { } version := matches[1] - log.Printf("Parallels Desktop version: %s", version) return version, nil } diff --git a/builder/parallels/common/step_run.go b/builder/parallels/common/step_run.go index 3835baef6..d59051a06 100644 --- a/builder/parallels/common/step_run.go +++ b/builder/parallels/common/step_run.go @@ -50,7 +50,7 @@ func (s *StepRun) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) if running, _ := driver.IsRunning(s.vmName); running { - if err := driver.Prlctl("stop", s.vmName); err != nil { + if err := driver.Stop(s.vmName); err != nil { ui.Error(fmt.Sprintf("Error stopping VM: %s", err)) } }