From 9f972375edcd625144031b05db932a92a0dd95be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robbert=20M=C3=BCller?= Date: Wed, 4 Sep 2019 18:30:36 +0200 Subject: [PATCH 1/2] Removed whitelist check for builders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/hashicorp/packer/issues/8060 Signed-off-by: Robbert Müller --- post-processor/vsphere/post-processor.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/post-processor/vsphere/post-processor.go b/post-processor/vsphere/post-processor.go index ad59a71c0..05607e87c 100644 --- a/post-processor/vsphere/post-processor.go +++ b/post-processor/vsphere/post-processor.go @@ -19,11 +19,6 @@ import ( "github.com/hashicorp/packer/template/interpolate" ) -var builtins = map[string]string{ - "mitchellh.vmware": "vmware", - "mitchellh.vmware-esx": "vmware", -} - var ovftool string = "ovftool" var ( @@ -116,10 +111,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { } func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, bool, error) { - if _, ok := builtins[artifact.BuilderId()]; !ok { - return nil, false, false, fmt.Errorf("Unknown artifact type, can't build box: %s", artifact.BuilderId()) - } - source := "" for _, path := range artifact.Files() { if strings.HasSuffix(path, ".vmx") || strings.HasSuffix(path, ".ovf") || strings.HasSuffix(path, ".ova") { From 3c69a938c5ac6e686c2ce4b1723074cbf145786a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robbert=20M=C3=BCller?= Date: Wed, 4 Sep 2019 18:31:08 +0200 Subject: [PATCH 2/2] Update documentation for vsphere post-processor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robbert Müller --- website/source/docs/post-processors/vsphere.html.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/source/docs/post-processors/vsphere.html.md b/website/source/docs/post-processors/vsphere.html.md index 8976e93cc..53d740166 100644 --- a/website/source/docs/post-processors/vsphere.html.md +++ b/website/source/docs/post-processors/vsphere.html.md @@ -1,7 +1,6 @@ --- description: | - The Packer vSphere post-processor takes an artifact from the VMware builder and - uploads it to a vSphere endpoint. + The Packer vSphere post-processor takes an artifact and uploads it to a vSphere endpoint. layout: docs page_title: 'vSphere - Post-Processors' sidebar_current: 'docs-post-processors-vsphere' @@ -11,8 +10,8 @@ sidebar_current: 'docs-post-processors-vsphere' Type: `vsphere` -The Packer vSphere post-processor takes an artifact from the VMware builder and -uploads it to a vSphere endpoint. +The Packer vSphere post-processor takes an artifact and uploads it to a vSphere endpoint. +The artifact must have a vmx/ova/ovf image. ## Configuration