Startup delay for first VM with remote storage

trigg3r

Well-Known Member
Aug 3, 2019
55
7
48
24
My PVE server start faster than NAS used as remote storage, so VMs cannot start automaticaly.

Is there a way to solve this?


P.S.:

I read some threads about this issue, one of this, dated 2016, with a smart (IMVHO) solution, but it seems to me that this feature is not available:

I could imagine adding a "pre start delay" setting to the start up order schema declaration. While normally we argue that the manager should only exec the startall command if all services are up and running, this cannot always be guaranteed, as in "running service" != "ready service". That would keep backwards compatibility, its non-invasive and solve that once and for all. Have you any thoughts to that?
 
You can achieve a simple delay this by overwriting the pve-guests.service service, adding a pre start command which simply sleeps, this can be achieved by executing systemctl edit pve-guests.service which will open an editor in the terminal, here add:
Code:
[Service]
ExecStartPre=/bin/sleep 30

then save+exit, it should work on the next boot.
 
  • Like
Reactions: dmouraomartins
You can achieve a simple delay this by overwriting the pve-guests.service service, adding a pre start command which simply sleeps, this can be achieved by executing systemctl edit pve-guests.service which will open an editor in the terminal, here add:
Code:
[Service]
ExecStartPre=/bin/sleep 30

then save+exit, it should work on the next boot.
it works