2

I have a Proxmox node running multiple services.

Each service consists of multiple VM's, for example, reverse proxy, database and application server. Some VM's within a service depend on other VM's of this service: the application server depends on the database server.

The different services do not depend on each other and are unrelated.

Sometimes I need to restart all VM's for a single service. I can do this manually and then I need to know the correct order to shutdown and restart the VM's.

It would be nice if I could explicitly configure dependencies between VM's that belong to a single service. And restart all VM's in a service, in the correct order, automatically, without touching VM's for other services running on the same node.

Can I do this with Proxmox?

I know I can allocate VM's to a resource pool but I think this is more for permissions. I know I can set a start order but I think this for is for restarting the entire node.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45
rveerd
  • 123
  • 5

1 Answers1

2

Proxmox doesn't support any dependency tracking between VMs. And honestly, it shouldn't. All it allows is a simple ordering and staggering, so all VMs won't try to start simultaneously, to protect a shared storage from overloading by huge burst of I/O which happens during VM startup.

Anyway, what you actually want to track is that service B running in the VM2 is started after service A running in the VM1, no matter what. Not VMs should be dependent, but services inside them. You need a proper cluster resource manager to do that. This way, even if some VM breaks or slow to initialize for any reason, you are still safe, because services will start/stop in a correct order. You can set up e.g. Pacemaker cluster inside those VMs and implement service dependencies and constraints whichever you want.

Update:

Quoting the Proxmox VE High Availability manual page:

In general, a HA managed resource should not depend on other resources.

HA managed resource in terms of Proxmox VE is the VM or container, so well, they seem to explicitly declare that inter-VM dependencies are not supported and won't be supported in foreseeable future.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45