Can VMs freeze when inactive?

I have several qubes that are meant to only run 1 program and only sometimes. For example I have my password manager qube that just runs my password manager which I only need on very few occasions. However I like to have these qubes running because it makes fetching the password much less cumbersome instead of having to wait several seconds.

I’m wondering if there is any optimization that allows some qubes to sleep or go inactive when you do not have an active window in them, this way my password manager qube would require much less CPU time and less battery life.
The things I figure you’d want to remove are all of the background processes in Linux, such as the clock and similar.
If this is too technically difficult to have done, is anyone able to elucidate what is technically difficult about this?

You can use the minimal templates, they come with all the non-essential software removed.

I don’t know if you can suspend a VM, but a VM that doesn’t run any software doesn’t take many CPU resources, you probably wouldn’t notice any difference if you suspended it.

Aren’t there a significant number of background processes in basic Linux distros even if they are minimalistic?

ps aux

That command will show you the running process and the resources they consume.

I don’t know exactly what an idle system consumes, but the average is probably around 1% if you have a modern multicore system.

The issues typically isn’t CPU when you virtualize systems it’s memory and even if you suspended the VM you would be able to free the memory it uses.

Fair enough. I’ll write this off as a pointless optimization then and will continue to use a large amount of idle VMs since RAM is not a limitation of mine.

If anyone stumbles across this topic and thinks they have reason to think CPU might be a problem for idle VMs please let me know.

It’s more of a security issue, if compromised running VMs start to attack other VMs while you’re away.

Anyway it’s rather safe to pause Linux VMs via qvm-pause or GUI according to my experience.

I also wrote [1] for automatic VM pausing & shutdown a while back.