Merge pull request #3221 from nathanleclaire/dont_munge_bootlocal_on_restart

Prevent /var/lib/boot2docker/bootlocal.sh munging on restart
This commit is contained in:
Nathan LeClaire 2016-03-23 14:47:15 -07:00
commit 899206ced7
1 changed files with 6 additions and 2 deletions

View File

@ -612,8 +612,12 @@ func (d *Driver) Stop() error {
// Restart restarts a machine which is known to be running.
func (d *Driver) Restart() error {
if err := d.vbm("controlvm", d.MachineName, "reset"); err != nil {
return err
if err := d.Stop(); err != nil {
return fmt.Errorf("Problem stopping the VM: %s", err)
}
if err := d.Start(); err != nil {
return fmt.Errorf("Problem starting the VM: %s", err)
}
d.IPAddress = ""