Automattic / hostmgr

A tool for managing macOS VM hosts
Mozilla Public License 2.0
9 stars 3 forks source link

Revert "Kill VM processes before unregister" #68

Closed crazytonyli closed 1 year ago

crazytonyli commented 1 year ago

This reverts commit 0f646d5c9d7f6c4237a48d83e72d727530ac92c0.

The change was added in https://github.com/Automattic/hostmgr/pull/66 and released in 0.17.4 https://github.com/Automattic/hostmgr/pull/67. Unfortunately it didn't work. There were two issues I noticed in 0.17.4.

Please note, before deploying 0.17.4 to CI agents, CI agents runs hostmgr 0.15.13. So there is a big chunk of code in hostmgr is new to CI.

The first issue is, sometimes VM can't be booted. My guess is that might be caused by the changes between 0.15.13 and 0.17.3.

The second issue is, the "killing vm process" change sometimes produces a "Parallels Desktop is shutting down" error (see this build). My guess is we may need to wait a bit after the pkill command, for Parallels Desktop to completely kill the process.

But anyway, given this change didn't work, we should get rid of it. Maybe we can create a 0.15.14 which is 0.15.13 plus this pkill command change. But I'll try test it first before making that change.