Merge pull request #6629 from sharifelgamal/stopped

Stopped and running machines should count as existing
pull/6634/head
Medya Ghazizadeh 2020-02-13 23:12:33 -07:00 committed by GitHub
commit be33c7e9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -199,6 +199,9 @@ func adjustGuestClock(h hostRunner, t time.Time) error {
// machineExists checks if virtual machine does not exist
// if the virtual machine exists, return true
func machineExists(d string, s state.State, err error) (bool, error) {
if s == state.Running || s == state.Stopped {
return true, nil
}
switch d {
case driver.HyperKit:
if s == state.None || (err != nil && err.Error() == "connection is shut down") {