From cfb9b4d65db4bde6af6899ed9f54ba8919f1017b Mon Sep 17 00:00:00 2001 From: mheidenr Date: Thu, 30 Jan 2014 08:46:54 +0100 Subject: [PATCH] enable qemu builder to handle reboots in the shell provisioner --- builder/qemu/builder.go | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 1bf8bb70b..69c2d9924 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -392,23 +392,13 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe new(stepForwardSSH), new(stepConfigureVNC), &stepRun{ - BootDrive: "d", + BootDrive: "once=d", Message: "Starting VM, booting from CD-ROM", }, - } - - if !b.config.RunOnce { - steps = append(steps, - &stepBootWait{}, - &stepTypeBootCommand{}, - &stepWaitForShutdown{ - Message: "Waiting for initial VM boot to shut down", - }, - &stepRun{ - BootDrive: "c", - Message: "Starting VM, booting from hard disk", - }, - ) + &stepBootWait{}, + &stepTypeBootCommand{}, + + } steps = append(steps,