mirror of https://github.com/docker/docs.git
Merge pull request #751 from slashk/750-virtualbox-saved-paused-support
fixes Issue #750 by allowing virtualbox driver
This commit is contained in:
commit
790d0cbf49
|
@ -344,11 +344,19 @@ func (d *Driver) Start() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if s == state.Stopped {
|
||||
switch s {
|
||||
case state.Stopped, state.Saved:
|
||||
if err := vbm("startvm", d.MachineName, "--type", "headless"); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Infof("Waiting for VM to start...")
|
||||
case state.Paused:
|
||||
if err := vbm("controlvm", d.MachineName, "resume", "--type", "headless"); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Infof("Resuming VM ...")
|
||||
default:
|
||||
log.Infof("VM not in restartable state")
|
||||
}
|
||||
|
||||
return ssh.WaitForTCP(fmt.Sprintf("localhost:%d", d.SSHPort))
|
||||
|
|
Loading…
Reference in New Issue