Possible to Change Advanced VM Settings?

yottabit

Contributor
Joined
Apr 15, 2012
Messages
192
The UI doesn't provide all of the KVM options available, some of which I would like to use:
  • CPU pinning
  • Machine type (i440FX v. Q35)
I have a guest running Ubuntu 20.04 and its load average is 0.19, but the host qemu-system-x86 process is running at 120%+.

I have read that switching the machine type can sometimes reduce the kvm overhead by up to 20%.

And CPU pinning can be beneficial for the application running in the VM that is not well multi-threaded.

Is there a stateful XML file somewhere that contains these configuration details? Or am I out of luck until they are expressed in the UI?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
SCALE stores these in the configuration database, not an XML or JSON file somewhere. To modify the database, you'll need to make SCALE API calls.

See https://www.truenas.com/docs/api/scale_websocket_api.html#vm. Typically, this is done either from the shell using midclt call <API command>, or using curl.
 

yottabit

Contributor
Joined
Apr 15, 2012
Messages
192
Aha cool, it may still be possible then! I'll start investigating. Thanks!
 

__adrian

Cadet
Joined
Sep 2, 2022
Messages
5
any update on whether you found anything? just browsing through that api docs page, seems to only describe endpoints that the gui already exposes.
 

yottabit

Contributor
Joined
Apr 15, 2012
Messages
192
any update on whether you found anything? just browsing through that api docs page, seems to only describe endpoints that the gui already exposes.
No, I never had a chance. I ended up just upgrading the CPUs. The speed bump was enough to satisfy for now.
 
Top