Force vm start from command line

Oletros

Cadet
Joined
Dec 12, 2022
Messages
3
I have a mini PC with and Intel Celeron N5105 with 16GB RAM

I have virtualized OPNSense in a VM with 8 GB of RAM.

It seems that the N5105 is not fully supported in Linux kernels prior to 5.19 so the VM freezes after some time, sometimes 12 days, sometimes 1 week.

As it seems that kernel 5.19 won't arrive in some time I have written a script to check the status of the vm running in a cron task, and is not running iot poweroff it and then start it.

But I receive this error:
CallError: [ENOMEM] Cannot guarantee memory for guest

The only option is to start it from the webui

Is there a way to force the start from the command line?
 

flymin

Dabbler
Joined
Oct 8, 2022
Messages
10
Have you figured out how to bypass the error?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
No, it has to be done manually
No, it doesn't...

There's a documented API call for it, which defaults the value of overcommit to false... the document covers that like this:
options.overcommit defaults to false, meaning VMs are not allowed to start if there is not enough available memory to hold all configured VMs. If true, VM starts even if there is not enough memory for all configured VMs.

The API method would be (assuming you found your VM ID to be 18... using midclt call vm.query | jq '[.[] | .id, .name, .status.state]'):

midclt call vm.start 18 '{"overcommit": true}'
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Top