From 48c64b05cba099c15b236e99c57bae6b97f1f051 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Wed, 1 Oct 2014 16:04:22 +0400 Subject: [PATCH] builder/parallels: Init VM without hdd and attach it later Avoid the disk resize because it is unsupported for some guests (OS X) http://kb.parallels.com/en/113653 --- builder/parallels/iso/step_create_disk.go | 2 +- builder/parallels/iso/step_create_vm.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/parallels/iso/step_create_disk.go b/builder/parallels/iso/step_create_disk.go index abb6ec2aa..8e5fb63d9 100644 --- a/builder/parallels/iso/step_create_disk.go +++ b/builder/parallels/iso/step_create_disk.go @@ -20,7 +20,7 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction { command := []string{ "set", vmName, - "--device-set", "hdd0", + "--device-add", "hdd", "--size", strconv.FormatUint(uint64(config.DiskSize), 10), "--iface", config.HardDriveInterface, } diff --git a/builder/parallels/iso/step_create_vm.go b/builder/parallels/iso/step_create_vm.go index 5f9f4b76f..b48b73dbb 100644 --- a/builder/parallels/iso/step_create_vm.go +++ b/builder/parallels/iso/step_create_vm.go @@ -29,6 +29,7 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction { "--distribution", config.GuestOSType, "--dst", config.OutputDir, "--vmtype", "vm", + "--no-hdd", } commands[1] = []string{"set", name, "--cpus", "1"} commands[2] = []string{"set", name, "--memsize", "512"}