Skip to content

Commit a9e5f30

Browse files
committed
Converting to template is now the default behavior + add docs
Signed-off-by: Cécile MORANGE <contact@ataxya.net>
1 parent 4438cdc commit a9e5f30

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

builder/xenserver/common/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type Config struct {
3434
SourcePath string `mapstructure:"source_path"`
3535

3636
Firmware string `mapstructure:"firmware"`
37-
SetTemplate string `mapstructure:"set_template"`
37+
SkipSetTemplate bool `mapstructure:"skip_set_template"`
3838

3939
ctx interpolate.Context
4040
}

builder/xenserver/common/config.hcl2spec.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builder/xenserver/iso/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (self *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (p
288288
new(xscommon.StepShutdown),
289289
}
290290

291-
if self.config.SetTemplate == "True" {
291+
if !self.config.SkipSetTemplate {
292292
steps = append(steps,
293293
new(xscommon.StepSetVmToTemplate))
294294
}

docs/builders/iso/xenserver-iso.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ each category, the available options are alphabetized and described.
143143
regardless of success. "on_success" requests that the VM only be cleaned up if an
144144
artifact was produced. The latter is useful for debugging templates that fail.
145145

146+
* `skip_set_template` (bool) - If you want to get the full XVA, to be able to import directly the VM
147+
instead of using the output template, you can set that to True
148+
146149
* `network_names` (array of strings) - A list of networks identified by their name label which
147150
will be used for the VM during creation. The first network will correspond to the VM's
148151
first network interface (VIF), the second will corespond to the second VIF and so on.

0 commit comments

Comments
 (0)