Commit 3c5c9a6e authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/virtualbox: sleep when stopping forcefully to allow session

unlock
parent dcae79e6
......@@ -33,6 +33,7 @@ IMPROVEMENTS:
[GH-687]
* builder/virtualbox: Nice errors if Packer can't write to
the output directory.
* builder/virtualbox: ISO is ejected prior to export.
* provisioner/puppet-masterless: Can now specify a `manifest_dir` to
upload manifests to the remote machine for imports. [GH-655]
......
......@@ -106,6 +106,9 @@ func (d *VBox42Driver) Stop(name string) error {
return err
}
// We sleep here for a little bit to let the session "unlock"
time.Sleep(2 * time.Second)
return nil
}
......
......@@ -60,7 +60,7 @@ func (s *stepAttachISO) Cleanup(state multistep.StateBag) {
"--medium", "none",
}
if err := driver.VBoxManage(command...); err != nil {
ui.Error(fmt.Sprintf("Error unregistering ISO: %s", err))
}
// Remove the ISO. Note that this will probably fail since
// stepRemoveDevices does this as well. No big deal.
driver.VBoxManage(command...)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment