diff --git a/builder/xenserver/common/common_config.go b/builder/xenserver/common/common_config.go index 2c1ff38..6cac88c 100644 --- a/builder/xenserver/common/common_config.go +++ b/builder/xenserver/common/common_config.go @@ -213,9 +213,9 @@ func (c *CommonConfig) Prepare(t *packer.ConfigTemplate, pc *common.PackerConfig } switch c.Format { - case "xva", "vdi_raw": + case "xva", "vdi_raw", "none": default: - errs = append(errs, errors.New("format must be one of 'xva', 'vdi_raw'")) + errs = append(errs, errors.New("format must be one of 'xva', 'vdi_raw', 'none'")) } switch c.KeepVM { diff --git a/builder/xenserver/common/step_export.go b/builder/xenserver/common/step_export.go index 678514b..dfa7ac4 100644 --- a/builder/xenserver/common/step_export.go +++ b/builder/xenserver/common/step_export.go @@ -56,6 +56,10 @@ func (StepExport) Run(state multistep.StateBag) multistep.StepAction { ui.Say("Step: export artifact") switch config.Format { + case "none": + ui.Say("Skipping export") + return multistep.ActionContinue + case "xva": // export the VM diff --git a/docs/builders/xenserver-iso.html.markdown b/docs/builders/xenserver-iso.html.markdown index e23e55a..974aa57 100644 --- a/docs/builders/xenserver-iso.html.markdown +++ b/docs/builders/xenserver-iso.html.markdown @@ -113,9 +113,10 @@ each category, the available options are alphabetized and described. characters (\*, ?, and []) are allowed. Directory names are also allowed, which will add all the files found in the directory to the floppy. -* `format` (string) - Either "xva" or "vdi_raw", this specifies the output - format of the exported virtual machine. This defaults to "xva". Set to - "vdi_raw" to export just the raw disk image. +* `format` (string) - Either "xva", "vdi_raw" or "none", this specifies the + output format of the exported virtual machine. This defaults to "xva". Set to + "vdi_raw" to export just the raw disk image. Set to "none" to export nothing; + this is only useful with "keep_vm" set to "always" or "on_success". * `http_directory` (string) - Path to a directory to serve using an HTTP server. The files in this directory will be available over HTTP that will