KERNEL_CMD isn't being included in VM start

Hi,

So I have configured a template that is a clone of the basic CentOS7 but with an extra volatile virtual disk for swap and an extra kernel parameter added in. This is from the “onevm show 289” output:

OS=[
ARCH=“x86_64”,
BOOT="",
KERNEL_CMD=“elevator=none” ]

However when the VM is booted the “elevator=none” text is not in the kernel command when I interrupt the boot sequence and edit the default kernel parameters. Nor does it affect the actual I/O scheduler setting in the VM itself:

# cat /sys/block/vda/queue/scheduler
[mq-deadline] kyber none

I’m expecting the above to look like:

# cat /sys/block/vda/queue/scheduler
[none] mq-deadline kyber

How do I get the kernel modifier to actually work? Any suggestions?

|\/|

Hello @MartinW,

We fixed some issues related with that some time ago. Are you using an OpenNebula version greater or equal than 5.10.4?

Hi Christian,

Sorry, I should have said, yes I am using 5.12.0.3.

Hi @MartinW ,

This parameter is used when you provide a kernel from the files datastore
for direct kernel boot. In the OpenNebula docs this is hinted in the sub-attributes matrix table where “O (for kernel)” should be read as “Optional, when the KERNEL parameter is defined”. The sources say so too.

This variable is not handled by the VM contextualization as you expect, though. You could see that it is missing from the contextualization vars for the VM. You could file a feature request for handling this with the OpenNebula contextualization.

Also, you could develop a script to be called on boot by the contextualization to handle a custom variable that updates the kernel cmdline. See context-section in the VM Template doc for details where to put the script and how it is called by the contextualization.

Best Regards,
Anton Todorov

1 Like