Commit 984b8835 authored by Rickard von Essen's avatar Rickard von Essen

Merge pull request #1468 from rickard-von-essen/issue_1466

parallels-iso: allow absolute output directory.
parents a23eb751 365b44c5
...@@ -2,10 +2,10 @@ package iso ...@@ -2,10 +2,10 @@ package iso
import ( import (
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common" parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"path/filepath"
) )
// This step creates the actual virtual machine. // This step creates the actual virtual machine.
...@@ -21,15 +21,13 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction { ...@@ -21,15 +21,13 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
config := state.Get("config").(*config) config := state.Get("config").(*config)
driver := state.Get("driver").(parallelscommon.Driver) driver := state.Get("driver").(parallelscommon.Driver)
ui := state.Get("ui").(packer.Ui) ui := state.Get("ui").(packer.Ui)
name := config.VMName name := config.VMName
path := filepath.Join(".", config.OutputDir)
commands := make([][]string, 8) commands := make([][]string, 8)
commands[0] = []string{ commands[0] = []string{
"create", name, "create", name,
"--distribution", config.GuestOSType, "--distribution", config.GuestOSType,
"--dst", path, "--dst", config.OutputDir,
"--vmtype", "vm", "--vmtype", "vm",
} }
commands[1] = []string{"set", name, "--cpus", "1"} commands[1] = []string{"set", name, "--cpus", "1"}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment