builder/qemu: properly prepare boot command.

This commit is contained in:
Matthew Hooker 2018-05-01 12:40:00 -07:00
parent fefaf0fa61
commit 4f1395e0f6
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 2 additions and 1 deletions

View File

@ -217,6 +217,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
}
errs = packer.MultiErrorAppend(errs, b.config.FloppyConfig.Prepare(&b.config.ctx)...)
errs = packer.MultiErrorAppend(errs, b.config.VNCConfig.Prepare(&b.config.ctx)...)
if b.config.NetDevice == "" {
b.config.NetDevice = "virtio-net"

View File

@ -48,7 +48,7 @@ func (s *stepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag)
}
// Wait the for the vm to boot.
if int64(config.BootConfig.BootWait) > 0 {
if int64(config.BootWait) > 0 {
ui.Say(fmt.Sprintf("Waiting %s for boot...", config.BootWait.String()))
select {
case <-time.After(config.BootWait):