Merge pull request #8922 from hashicorp/f-vsphere_iso-export-ovf-options

vsphere/iso: Add support for ovf export options
This commit is contained in:
Megan Marsh 2020-03-19 12:44:33 -07:00 committed by GitHub
commit 94863168bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -64,7 +64,7 @@ type ExportConfig struct {
// * nodevicesubtypes - resource subtypes for CD/DVD drives, floppy drives, and serial and parallel ports are not exported // * 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: // For example, adding the following export config option would output the mac addresses for all Ethernet devices in the ovf file:
//
// ```json // ```json
// ... // ...
// "export": { // "export": {

View File

@ -139,6 +139,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
Images: b.config.Export.Images, Images: b.config.Export.Images,
Manifest: b.config.Export.Manifest, Manifest: b.config.Export.Manifest,
OutputDir: b.config.Export.OutputDir.OutputDir, OutputDir: b.config.Export.OutputDir.OutputDir,
Options: b.config.Export.Options,
}) })
} }

View File

@ -8,7 +8,15 @@
- `manifest` (string) - generate manifest using sha1, sha256, sha512. Defaults to 'sha256'. Use 'none' for no manifest. - `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": { "export": {
"options": ["mac"] "options": ["mac"]