From d46187da4bb074e96c6795690c4fd24fb62d3b18 Mon Sep 17 00:00:00 2001 From: Joseph Chilcote Date: Mon, 20 Oct 2014 20:58:12 -0700 Subject: [PATCH] updated step_clone_vmx.go to work with vmx files using sata --- builder/vmware/vmx/step_clone_vmx.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/builder/vmware/vmx/step_clone_vmx.go b/builder/vmware/vmx/step_clone_vmx.go index c1edcff15..1a96c463d 100644 --- a/builder/vmware/vmx/step_clone_vmx.go +++ b/builder/vmware/vmx/step_clone_vmx.go @@ -37,8 +37,14 @@ func (s *StepCloneVMX) Run(state multistep.StateBag) multistep.StepAction { return multistep.ActionHalt } - diskName, ok := vmxData["scsi0:0.filename"] - if !ok { + var diskName string + _, scsi := vmxData["scsi0:0.filename"] + _, sata := vmxData["sata0:0.filename"] + if scsi { + diskName = vmxData["scsi0:0.filename"] + } else if sata { + diskName = vmxData["sata0:0.filename"] + } else { err := fmt.Errorf("Root disk filename could not be found!") state.Put("error", err) return multistep.ActionHalt