diff --git a/.gitignore b/.gitignore index 22ee9f5b3..e0169f27b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ .glide/ vendor/ packer-builder-vsphere +packer-builder-vsphere.exe bin/ +test*.json diff --git a/README.md b/README.md index f7f5c2014..523384c53 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Post-processing: "password": "{{user `vsphere_password`}}", "template": "ubuntu", - "folder_name": "folder", + "folder_name": "folder1/folder2", "vm_name": "vm-1", "host": "esxi-1.domain.com", "resource_pool": "pool1/pool2", diff --git a/step_clone_vm.go b/step_clone_vm.go index be2e2bb53..8aa425de0 100644 --- a/step_clone_vm.go +++ b/step_clone_vm.go @@ -36,7 +36,7 @@ func (s *StepCloneVM) Run(state multistep.StateBag) multistep.StepAction { ui.Say("start cloning...") // Get folder - folder, err := finder.FolderOrDefault(ctx, s.config.FolderName) + folder, err := finder.FolderOrDefault(ctx, fmt.Sprintf("/%v/vm/%v", dc.Name(), s.config.FolderName)) if err != nil { state.Put("error", err) return multistep.ActionHalt