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

parallels-iso: allow absolute output directory.
This commit is contained in:
Rickard von Essen 2014-09-08 11:03:22 +02:00
commit 984b8835ca
1 changed files with 2 additions and 4 deletions

View File

@ -2,10 +2,10 @@ package iso
import (
"fmt"
"github.com/mitchellh/multistep"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
"path/filepath"
)
// This step creates the actual virtual machine.
@ -21,15 +21,13 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
config := state.Get("config").(*config)
driver := state.Get("driver").(parallelscommon.Driver)
ui := state.Get("ui").(packer.Ui)
name := config.VMName
path := filepath.Join(".", config.OutputDir)
commands := make([][]string, 8)
commands[0] = []string{
"create", name,
"--distribution", config.GuestOSType,
"--dst", path,
"--dst", config.OutputDir,
"--vmtype", "vm",
}
commands[1] = []string{"set", name, "--cpus", "1"}