Proxmox first VM boot delay workaround

My home lab has an NFS server for storage and a proxmox hypervisor connecting to it. If the power ever goes out for more than my UPS can handle, startup is a bit of a mess. My ProxMox server boots up much faster than my NFS server, so the result is no VMs start automatically (due to storage being unavailable) and I have to manually go in and start everything.

I found this bug report from 2015 which frustratingly doesn’t appear to have any traction to it. Ideally I could just tell the first VM to wait 5 minutes before turning on, and then trigger all the other VMs to turn on once the first one is up, but the devs don’t seem to want to address that issue. So, I got creative.

My solution was to alter the grub menu timeout before booting ProxMox. Simple but effective.

Edit /etc/default/grub and modify GRUB_TIMEOUT

#modify GRUB_TIMEOUT to your liking
GRUB_TIMEOUT=300

Then simply run update-grub

update-grub

Now my proxmox server waits 5 minutes before even booting the OS, by which time the NAS should be up and running. No more manual turning on of VMs after a power outage.

2 thoughts on “Proxmox first VM boot delay workaround”

  1. This helped me solve a problem that I was entirely overthinking. Although unconventional I am virtualizing FreeNAS as well as my other linux lab VM’s. (since i’m lab/testing FreeNAS as well to see if i’m going to roll it into production) I’ve got a share set up, and mounted in fstab, credentials, etc, all works out fine. But when I power on the host machine and everything boots from scratch my share doesn’t automount at boot. After about a day of overthinking this I realized that my Xubuntu VM was booting up faster than my FreeNAS vm so the share wasn’t available when fstab was trying to mount it. Setting boot order and delay arguments in Proxmox didn’t seem to work but then it magically hit me after reading your post. I didn’t need to modify grub on my host, but I could add the delay argument in grub on my Xubuntu VM. Sure enough. added it in there. ran the update-grub, shutdown all the VM’s on the host and then the host itself, powered it back on, logged into Proxmox (sure enough the VM’s powered on at the same time despite adding a delay in the options) but that didn’t matter because grub on the Xubuntu VM worked like a charm and delayed the boot by a few short minutes. Long enough for the FreeNAS vm to boot and be ready. And FINALLY after almost a day of googling, trying different fstab line arguments, etc. This solution fixed my issue! Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.