From a7c5daf80da50df7d674e01925fb403bb33b04fc Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 19 Mar 2020 14:46:30 -0400 Subject: [PATCH] vsphere/iso: Add support for ovf export options * Fix generated documentation for the additional export options field --- builder/vsphere/common/step_export.go | 2 +- builder/vsphere/iso/builder.go | 1 + .../vsphere/common/_ExportConfig-not-required.html.md | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/builder/vsphere/common/step_export.go b/builder/vsphere/common/step_export.go index 8fe59c7f4..3d7c865fe 100644 --- a/builder/vsphere/common/step_export.go +++ b/builder/vsphere/common/step_export.go @@ -64,7 +64,7 @@ type ExportConfig struct { // * nodevicesubtypes - resource subtypes for CD/DVD drives, floppy drives, and serial and parallel ports are not exported // // For example, adding the following export config option would output the mac addresses for all Ethernet devices in the ovf file: - + // // ```json // ... // "export": { diff --git a/builder/vsphere/iso/builder.go b/builder/vsphere/iso/builder.go index c2b5eb298..1a45d2066 100644 --- a/builder/vsphere/iso/builder.go +++ b/builder/vsphere/iso/builder.go @@ -139,6 +139,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack Images: b.config.Export.Images, Manifest: b.config.Export.Manifest, OutputDir: b.config.Export.OutputDir.OutputDir, + Options: b.config.Export.Options, }) } diff --git a/website/source/partials/builder/vsphere/common/_ExportConfig-not-required.html.md b/website/source/partials/builder/vsphere/common/_ExportConfig-not-required.html.md index 0f811bff4..ad09fc4d8 100644 --- a/website/source/partials/builder/vsphere/common/_ExportConfig-not-required.html.md +++ b/website/source/partials/builder/vsphere/common/_ExportConfig-not-required.html.md @@ -8,7 +8,15 @@ - `manifest` (string) - generate manifest using sha1, sha256, sha512. Defaults to 'sha256'. Use 'none' for no manifest. -- `options` ([]string) - ```json +- `options` ([]string) - Advanced ovf export options. Options can include: + * mac - MAC address is exported for all ethernet devices + * uuid - UUID is exported for all virtual machines + * extraconfig - all extra configuration options are exported for a virtual machine + * nodevicesubtypes - resource subtypes for CD/DVD drives, floppy drives, and serial and parallel ports are not exported + + For example, adding the following export config option would output the mac addresses for all Ethernet devices in the ovf file: + + ```json ... "export": { "options": ["mac"]