Merge pull request #6226 from hashicorp/fix6225

builder/qemu: properly prepare boot command.
This commit is contained in:
Matthew Hooker 2018-05-01 12:41:11 -07:00 committed by GitHub
commit 6260151034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):