2

I'm trying to achieve hotplugging of memory in KVM guests by following this tutorial: Memory hotplug with Qemu/KVM and libvirt.

I managed to complete it but nothing happens. The tutorial tells me that I need kernel version 3.9 or higher, and I am running 4.8. It also states that I need modules acpiphp and pci_hotplug. Googling results told me that I just needed to run (on the guest):

for m in acpiphp pci_hotplug; do sudo modprobe ${m}; done

However, this results in the following erroneous output:

modprobe: FATAL: Module acpiphp not found in directory /lib/modules/4.8.0-39-generic
modprobe: FATAL: Module pci_hotplug not found in directory /lib/modules/4.8.0-39-generic

This question seems similar to Ask Ubuntu: PCI hotplug doesn't seem to work where solution also states that I need acpiphp and pci_hotplug, so I'm pretty confident I need these modules.

Question

How do I install acpiphp and pci_hotplug on an Ubuntu 16.04 for my KVM guest?

Programster
  • 6,039

1 Answers1

3

Probably, that feature is already compiled in the kernel and you don't need to load any module. Check that these options are enabled in your kernel:

# grep "CONFIG_HOTPLUG_PCI_ACPI=" /boot/config-`uname -r`
CONFIG_HOTPLUG_PCI=y

# grep "CONFIG_HOTPLUG_PCI=" /boot/config-`uname -r`
CONFIG_HOTPLUG_PCI_ACPI=y

# grep "CONFIG_MEMORY_HOTPLUG=" /boot/config-`uname -r`
CONFIG_MEMORY_HOTPLUG=y

Then, for kernel >=4.8, you need to set this parameter on boot:

memhp_default_state=online

(as stated in the Proxmox Hotplug instructions)

Edit: if memhp_default_state= is not set on boot, kernel will default to CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE kernel config.

vrc3.33
  • 31