one-time boot node without pve

michabbs

Active Member
May 5, 2020
134
19
38
Sometimes (for example after hardware update) I want to boot up PVE node without actually starting all containers/vm's. (Then I'd do some tests, necessary config updates etc., and finally reboot.) What is the "correct way" to do it?

Usually I manually add "init=/bin/bash" in grub boot menu, but it's not the best solution, because this kills almost all other services too, not just proxmox. (And for example - I want to have ssh.) Ideally I would like to add "something" to grub line on boot and enter fully booted up Debian, just without PVE running.
 
IOW. the Proxmox VE services running might be even fine for you, but you want that the onboot auto-start is disabled for this one boot? That I also desired recently and plan to implement soonish, as it can be a useful feature and IIRC there are some community scripts doing this (in a convoluted way though) – I opened https://bugzilla.proxmox.com/show_bug.cgi?id=4851 to track that.

Or do you also want to ensure that no-one can manually start anything either?

FWIW, you can work around of this missing feature quite easily by just disabling the respective systemd service units until you're done with your maintenance.

I.e., for:
  • Just disabling the guest auto start-on-boot use: systemctl disable pve-guests.service
  • Disabling the guest auto start-on-boot and the whole API, ensuring that external users cannot change anything via that: systemctl disable pve-guests.service pveproxy.service
Once done enable them again via systemctl enable pve-guests.service pveproxy.service.

Note, that neither enable and disable changes the current service runstate, if you want to enable and start in one go use systemctl enable --now SERVICES, or respecitvely for disable and stop in one go:
systemctl disable --now SERVICES (with SERVICES replaced by the list of services you want to change).
 
IOW. the Proxmox VE services running might be even fine for you, but you want that the onboot auto-start is disabled for this one boot?
Yes! :)
FWIW, you can work around of this missing feature quite easily by just disabling the respective systemd service units until you're done with your maintenance.
Well... Yes, but no. ;-)
In order to disable systemd service - the system must be first up. So this is good way in case of "normal" advance-scheduled maintenance. On the other hand - in case of disaster (for example motherboard failure) - I would expect to be able to move disks to a new server, replace corrupted hardware, or do whatever necessary, and boot up a new system to perform tests and extra configuration. No guests should be autobooted then.

I believe the best solution would be to add extra grub/kernel parameter. For example you power on the new hardware, on grub prompt hit "e" and manually add "no-pve-guests". The pve-guests init script could simply check kernel cmdline. Something like this:

Code:
if ( cat /proc/cmdline|grep no-pve-guests >/dev/null )
then echo START GUESTS
else echo DO NOTHING
fi
 
  • Like
Reactions: Neobin and michabbs

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!