func (driver *Driver) Start() error { err := driver.setUserSubscription() if err != nil { return err } vmState, err := driver.GetState() if err != nil { return err } if vmState == state.Running || vmState == state.Starting { log.Infof("Host is already running or starting") return nil } log.Debugf("starting %s", driver.Name) err = vmClient.StartRole(driver.Name, driver.Name, driver.Name) if err != nil { return err } err = driver.waitForSSH() if err != nil { return err } err = driver.waitForDocker() if err != nil { return err } return nil }
func (d *Driver) Start() error { if err := d.setUserSubscription(); err != nil { return err } if vmState, err := d.GetState(); err != nil { return err } else if vmState == state.Running || vmState == state.Starting { log.Infof("Host is already running or starting") return nil } if err := vmClient.StartRole(d.MachineName, d.MachineName, d.MachineName); err != nil { return err } var err error d.IPAddress, err = d.GetIP() return err }
func (d *Driver) Start() error { if err := d.setUserSubscription(); err != nil { return err } if vmState, err := d.GetState(); err != nil { return err } else if vmState == state.Running || vmState == state.Starting { log.Infof("Host is already running or starting") return nil } log.Debugf("starting %s", d.MachineName) if err := vmClient.StartRole(d.MachineName, d.MachineName, d.MachineName); err != nil { return err } if err := d.waitForSSH(); err != nil { return err } return d.waitForDocker() }