Midclt how to add kvm config options to modprobe?

MIDCLT documentation needs to be released ASAP.
How the fuck does one add kvm report_ignored_msrs=0 option to modprobe kernel extra options?

echo “options kvm ignore_msrs=1 report_ignored_msrs=0” > /etc/modprobe.d/kvm.conf
is what i’m trying to achieve, currently attempting as a post-init script.

Seriously, this should be a very easy midclt command that NOONE SEEMS TO KNOW.

Suggest you

  1. describe the problem thoroughly; including hardware/software
  2. ask for assistance politely

Then someone is more likely to help.

2 Likes

I’ve been dealing and asking about this issue since 6 months ago. Noone knows how.

The problem is simply that the usage of MIDCLT is not documented ANYWHERE. That is the issue.

The more specific issue: TrueNAS by default doesn’t set a report_ignored_msrs=0 option, in fact sets it to Y, leading to insane log spam. No post init script is able to reverse this, and if you set it via a kvm.conf file it’ll simply break on reboot.

Take a breath and describe the problem accurately.

There’s nothing in your description about what software you have, how many VMs , how much log spam, impact of the log spam.

Why is no-one else reporting the problem? Is there something special about your setup.

If you want smart people to spend their time, give them all the info.

Everyone else is reporting the problem. On proxmox or any other hypervisor that doesn’t reset all of it’s configs on reboot, it is a simple kvm modprobe option.
update-initram-fs doesn’t even work on TrueNAS due to it being read only. It’s INCREDIBLY locked down and frustratingly bad.

The issue is a simple log spam so many people after basic research give up and move on.

I have described the problem as accurately as possible. WHERE ARE THE MIDCLT DOCS? Why does it not exist?

I have already figured out a potential fix with a post init script deactivating the modules and then reactivating them after applying my parameters, and it seems to work so far.

Software: TrueNAS. Dragonfish latest RC. Any windows version that has MSR.

The kernel’s command-line parameters — The Linux Kernel documentation doesn’t show any option to stop ignored msrs reporting, so it may well be that such a kernel boot option doesn’t exist, but that has nothing to do with midclt.

It’s not clear if you tried it already, but have a look at setting the following paramenter in an init instead:
/sys/module/kvm/parameters/report_ignored_msrs
It defaults to Y.

Another, wholly unsupported option, is to disable the rootfs protection and make edits to the .conf.

It’s been a while so you propably found a solution in the meantime.
And I can feel your frustration as to find examples and docs about the midclt tool is not exactly trivial. I found out that:

  • What you are looking for is the “TrueNAS Websocket client” repo where the function and usage of the midclt tool is mentioned: GitHub - truenas/api_client
  • Where the API doc is linked here: TrueNAS Websocket Documentation. API reference can also be accessed from the TrueNAS WebUI in the top right corner: SCALE API Reference | TrueNAS Documentation Hub
  • Following the websocket documentation, I searched for “kernel” and found "kernel_advanced_options in both the system.advanced.config and system.advanced.update methods.
  • Putting 1+1 together I was able to set the values through the built-in shell:
# List advanced config and pipe to jq for readability:
midclt call system.advanced.config | jq
# List cmdline options
cat /proc/cmdline             
# Set extra kernel options:
midclt call system.advanced.update '{"kernel_extra_options":"kvm.ignore_msrs=1"}'
# Check advanced config change:
midclt call system.advanced.config | jq -r '.kernel_extra_options'
reboot now

Kernel params reference: The kernel’s command-line parameters — The Linux Kernel documentation Crucial part: “Module parameters can be specified in two ways: via the kernel command line with a module name prefix, or via modprobe.”

Hope this helps!

2 Likes