Autostart of VM with Dedicated Hardware

rtilson

Member
Jan 29, 2020
12
1
6
40
Hello,

I am running Proxmox 6.1-3 and I have a VM with dedicated hardware to start as soon as the server starts. In its configuration I have checked the "Start at Boot" checkbox and assigned it a boot priority of 1 and the delay values to 1. However, after each restart of the server Proxmox does not auto start the VM. Help?

Thanks,
R.
 
I am still not very familar with how Proxmox glues the different pieces together. Where would I begin to look for errors or even just general messages reported by the different services?

Edit:
I always forget that there is a web gui with Proxmox. I'm used to logging in and using console commands. When you asked if there were any errors one hint that I just didn't think of is the fact that my network attached storage always is a bit slow at connecting. I'm using a combination of NFS mounts and ISCSI and a few times I tried starting my VM immediately after boot it would fail because of some storage not available.

So I believe the problem is that my network attached storage is not immediately available when the server first starts up. I believe the solution to my problem is just add a start delay that is long enough to allow for all the ISCSI and NFS mounts to establish connection.
 
Last edited:
Tom....Thank you. Even though I answered my own question. Thank you for giving me the one clue I needed to fix it.

So when someone Googles this and posting comes up.....

Check the network attached storage and ensure that its connection with the server has stabilized before the VM starts. Assuming that the VM being started uses those resources.
 
there's also a (systemd) pve-storage.target that you can hook into to ensure the rest of PVE starts after your storage is up/available. the GUI start and guest autostart happens afterwards.
 
fabian, thank you. How would I hook into that systemd script. In general, I am not entirely familiar with systemd, how does one "hook" into pve-storage.target

Thanks.
 
you probably want to read up on how system units interact with eachother first before writing a custom one or extending an existing one. but basically, you can extend either end to add an additional ordering constraint/make your storage unit part of the pve-storage.target.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!