Inhibit VM/CT autostart from GRUB kernel cmdline

harvie

Well-Known Member
Apr 5, 2017
138
23
58
35
When i do some kind of service work on my server, sometimes i want to boot the system to do some changes, but i know that i will need reboot again few more time, so i don't want to start the CTs and VMs yet. Is there some flag that i can specify in grub to boot without autostarting VMs or CTs?

It might even be usefull if you by default include this "rescue mode" as separate menu entry in GRUB.

There are lots of reasons for this

1.) Customers aren't happy when their CTs get rebooted too often
2.) Some CTs running java and similar resource heavy stuff take ages to boot and eat lot of resources during startup, so it makes whole service procedure much slower when i need to reboot several time.
3.) When you work with storage, you obviously don't want CTs to be running
4.) Rebooting immediately before VM start is not good, because you might disrupt boot time fsck or something...
5.) I need to boot the system on slower hardware with less RAM than production server to fix something and i know system will be unusable if all CTs start at once
6.) There was security breach
 
Hi,

I see no reason why you have to reboot multiple times?

But anyway you can disable the pve-guests.service.
 
I see no reason why you have to reboot multiple times?

Let's say the server crashed for unknown reason, i've got into the datacenter to investigate what happend. I want to boot the server without starting CTs/VMs on system in unknown state. Maybe there's something wrong with hardware and it will be very slow or even lead to data loss if i start all the VMs/CTs. I've been running CTs and VMs on Linux for years (XEN, KVM, vServer, OpenVZ and now Proxmox LXC) and i've found this feature to be very usefull.

In the past there was workaround... On xen we've used to boot kernel directly without hypervisor, on vServer and OpenVZ we've just booted into plain debian kernel without vServer/OpenVZ support. So that VMs/CTs didn't started. But there is no recent kernel without KVM/LXC support, so i think it would make sense to have cmdline flag for this... It would be even better than using different kernel.

But anyway you can disable the pve-guests.service.

I am not sure if i can do this from GRUB, before i start booting the server. By time i get to login, the VMs/CTs are already starting. I want to prevent that.

It would be very easy to implement some check like this to proxmox to disable autostart if grep nopve /proc/cmdline
 

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!