diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go index e33bf342..12c53496 100644 --- a/post-processor/vsphere-template/step_mark_as_template.go +++ b/post-processor/vsphere-template/step_mark_as_template.go @@ -27,6 +27,10 @@ type stepMarkAsTemplate struct { func NewStepMarkAsTemplate(artifact packersdk.Artifact, p *PostProcessor) *stepMarkAsTemplate { remoteFolder := "Discovered virtual machine" + //if post-processor config folder is not null, use the folder as remoteFolder + if p.config.Folder != "" { + remoteFolder = p.config.Folder + } vmname := artifact.Id() if artifact.BuilderId() == vsphere.BuilderId {