jwright
jwright

Reputation: 23

Does Google Compute Engine restart or shut down your VM?

I have had problems keeping a background process alive for more than a couple days using nohup. Could Google Compute Engine interfere with the process that nohup put into the background?

Upvotes: 1

Views: 84

Answers (1)

Dan
Dan

Reputation: 7737

Short answer: it’s possible, but if it’s happening reliably, you probably configured your VM in an unexpected way.

There are a few reasons reboot can happen, in rough order of likeliness:

  1. A user on your account rebooted the VM.
  2. Some kind of third party management tool that you used to deploy your VM rebooted it.
  3. You’re using a preemptible VM. These are rebooted at least every day and may be blocked from restarting if Google Cloud is low on cores in that zone.
  4. You configured your VM not to do live migrations. This probably doesn’t cause lots of reboots, but if your VM needs to be migrated (to upgrade the release of the hypervisor, when the host it’s running on is having maintenance done, etc.) then it will be shut down. Live migration isn’t noticeable to the VM, so it’s better if you just enable it.
  5. The host your VM was running on crashed, so the VM “hard-rebooted” before being restarted on a new host. Hardware and software crashes are very rare and it’s extremely unlikely that you would see this multiple times on the same VM within days of each other.

To check whether your VM is actually being rebooted (versus some other reason nohup didn’t keep your process alive), check out some of these strategies.

Upvotes: 1

Related Questions