/etc/modprobe.d/kvm.conf options


xilo

Recommended Posts

Hi,

 

I am trying to add the following options to the kvm.conf file in /etc/modprobe.d so that I can enable nested virutalization. 

 

Quote

options kvm_intel nested=1 enable_apicv=n

options kvm ignore_msrs=1

 

It appears the kvm.conf file is overwritten at start-up, and I am having trouble finding where to set these options to be persistent.  Can anyone help me?

 

I am looking to do this so that I am able to deploy three ESXi hosts within KVM on Unraid to create an NSX-T lab.

Edited by xilo
Link to comment
3 minutes ago, Squid said:

unRaid runs from RAM, and there is no persistent folders anywhere (except for /boot)  You would need to make those changes via appropriate commands within /config/go on the flash drive.

Thank you for the quick reply!  Could you elaborate a bit on how to make these changes in /config/go?  I'm a bit new to unraid.  I modified the syslinux.cfg file and that seems to be working, but is there a cleaner way to do what i'm looking for?

Link to comment

The go file is a simple bash script that is executed every time you boot the server.  You can add whatever you need to it.  The "preferred" way to however run scripts at startup would be via the user scripts plugin, but I took a wild guess that what you needed would have to be run earlier in the bootup sequence than when user scripts would execute it.

Link to comment
4 minutes ago, Squid said:

The go file is a simple bash script that is executed every time you boot the server.  You can add whatever you need to it.  The "preferred" way to however run scripts at startup would be via the user scripts plugin, but I took a wild guess that what you needed would have to be run earlier in the bootup sequence than when user scripts would execute it.

You're right.  I think using syslinux.cfg is probably the easiest way to get what I want.   Thanks for the help and knowledge.

 

For future reference / to aid those ever in this situation, this is my modified statement:

 

Quote

kernel /bzimage
append initrd=/bzroot ixgbe.allow_unsupported_sfp=1 kvm-intel.nested=1 kvm-intel.enable_apicv=0

 

Edited by xilo
Link to comment
  • 2 years later...

Hi,

 

i tried to adopt the suggestions for AMD and apply it at boot time but not working for me:

kernel /bzimage
append initrd=/bzroot kvm-amd.nested=0 kvm-amd.enable_avic=1 kvm-amd.enable_npt=1

 

In unraid avic is always 0 or disabled when checking the features using: "grep -RHE '*' /sys/module/kvm_amd/parameters/"

I would like to enable it and try it.

Any suggestions would be welcome.

Thanks.

Link to comment
13 hours ago, xPliZit_xs said:

kvm-amd.nested=0 kvm-amd.enable_avic=1 kvm-amd.enable_npt=1

Are you sure the names are correct?

From what I found they should be:

kvm-amd.avic=
kvm-amd.npt=
kvm-amd.nested=

 

Check your syslog when booting with your arguments and if they are wrong you should see some logged messages about invalid parameters or something similar; if parameters are wrong they are simply ignored by the kernel.

Edited by ghost82
  • Thanks 1
Link to comment
On 7/22/2022 at 2:49 AM, ghost82 said:

Are you sure the names are correct?

From what I found they should be:

kvm-amd.avic=
kvm-amd.npt=
kvm-amd.nested=

 

Check your syslog when booting with your arguments and if they are wrong you should see some logged messages about invalid parameters or something similar; if parameters are wrong they are simply ignored by the kernel.

 

That was it!!

Thanks so much.

Now running VM's with avic enabled.

Link to comment
  • 10 months later...
On 7/23/2022 at 8:53 AM, xPliZit_xs said:

 

That was it!!

Thanks so much.

Now running VM's with avic enabled.

 

Just for later and reference for others.

Here is the line in UNRAID Syslinux configuration:

 

kernel /bzimage
append initrd=/bzroot kvm-amd.nested=1 kvm-amd.avic=1 kvm-amd.npt=1

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.