builder/virtualbox: sleep when stopping forcefully to allow session
unlock
This commit is contained in:
parent
dcae79e67f
commit
3c5c9a6ea3
|
@ -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...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue