Skip to content

Commit

Permalink
Fix packer vsphere-iso builder.
Browse files Browse the repository at this point in the history
When one's vsphere data center(s) are contained within a data center
folder, vsphere-iso is broken.   There is no way to specificy a "folder"
in the packer template to allow builds to complete.  See
jetbrains-infra/packer-builder-vsphere#285 for
more details.

This change and removal of the folder template key, allows successful
builds.

DCO 1.1 Signed-off-by: David Ohlemacher <[email protected]>
  • Loading branch information
sqqqrly committed May 12, 2020
1 parent 4ebcbad commit 470614e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/vsphere/driver/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (d *Driver) NewFolder(ref *types.ManagedObjectReference) *Folder {
}

func (d *Driver) FindFolder(name string) (*Folder, error) {
f, err := d.finder.Folder(d.ctx, fmt.Sprintf("/%v/vm/%v", d.datacenter.Name(), name))
f, err := d.finder.Folder(d.ctx, fmt.Sprintf("/DataCenters/%v/vm/%v", d.datacenter.Name(), name))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 470614e

Please sign in to comment.