|
|
|
|
@ -53,6 +53,7 @@ type Config struct {
|
|
|
|
|
KeepRegistered bool `mapstructure:"keep_registered"`
|
|
|
|
|
SkipExport bool `mapstructure:"skip_export"`
|
|
|
|
|
VMName string `mapstructure:"vm_name"`
|
|
|
|
|
KeyInterval int `mapstructure:"key_interval"`
|
|
|
|
|
|
|
|
|
|
ctx interpolate.Context
|
|
|
|
|
}
|
|
|
|
|
@ -121,6 +122,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|
|
|
|
b.config.ISOInterface = "ide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if b.config.KeyInterval == 0 {
|
|
|
|
|
b.config.KeyInterval = -1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if b.config.VMName == "" {
|
|
|
|
|
b.config.VMName = fmt.Sprintf(
|
|
|
|
|
"packer-%s-%d", b.config.PackerBuildName, interpolate.InitTime.Unix())
|
|
|
|
|
@ -245,10 +250,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|
|
|
|
Headless: b.config.Headless,
|
|
|
|
|
},
|
|
|
|
|
&vboxcommon.StepTypeBootCommand{
|
|
|
|
|
BootWait: b.config.BootWait,
|
|
|
|
|
BootCommand: b.config.FlatBootCommand(),
|
|
|
|
|
VMName: b.config.VMName,
|
|
|
|
|
Ctx: b.config.ctx,
|
|
|
|
|
BootWait: b.config.BootWait,
|
|
|
|
|
BootCommand: b.config.FlatBootCommand(),
|
|
|
|
|
VMName: b.config.VMName,
|
|
|
|
|
Ctx: b.config.ctx,
|
|
|
|
|
GroupInterval: b.config.BootConfig.BootGroupInterval,
|
|
|
|
|
},
|
|
|
|
|
&communicator.StepConnect{
|
|
|
|
|
Config: &b.config.SSHConfig.Comm,
|
|
|
|
|
|