Hotplug (qemu disk,nic,cpu,memory): Difference between revisions
(→CPU hotplug: GUI options are available now.) |
|||
Line 93: | Line 93: | ||
Then you can use the memory GUI as usual. | Then you can use the memory GUI as usual. | ||
== Memory | == Memory Hot-Unplug == | ||
- Memory unplug | - Memory unplug currently doesn't work in Windows (<=win10 currently) | ||
- Memory unplug can't be unstable on | - Memory unplug can't be unstable on Linux (<= kernel 4.10 currently) | ||
for Linux memory unplug, you need have | for Linux memory unplug, you need to have movable zone enabled in the kernel config (not enabled by default on Debian/Ubuntu) | ||
CONFIG_MOVABLE_NODE=YES | CONFIG_MOVABLE_NODE=YES | ||
Line 107: | Line 107: | ||
"movable_node" boot kernel parameter enabled | "movable_node" boot kernel parameter enabled | ||
Here some | Here are some future kernel patches to improve unplug : http://www.spinics.net/lists/linux-mm/msg125359.html | ||
[[Category:HOWTO]] [[Category:Installation]] | [[Category:HOWTO]] [[Category:Installation]] |
Revision as of 06:56, 17 September 2020
Proxmox support hotplugging of qemu devices
- disks (hotplug/unplug)
- nics (hotplug/unplug)
- cpu (hotplug/unplug)
- memory (hotplug/unplug)
Linux Guests notes
kernel modules needed
you need to have 2 modules loaded in your linux guest
#modprobe acpiphp #modprobe pci_hotplug
cpu && memory hotplug
you need a recent kernel > 3.10
and a udev rules, to auto enable cpus or memory hotplugged
you can add a file:
/lib/udev/rules.d/80-hotplug-cpu-mem.rules
SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1" SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", ATTR{state}="online"
for linux kernel >= 4.7,
you don't need the udev rule for memory hotplug, you only need to add this kernel parameter at boot:
memhp_default_state=online
Windows Guests notes
- Disk and nic hotplug is working out of the box for all windows versions >2003 - cpu && memory hotplug is working on > 2008 enterprise/datacenter, 2012 > standard
Disk && Nic hotplug/unplug
edit your vm configuration file
/etc/pve/qemuserver/<VMID>.conf
and add
hotplug: network,disk,....
Note: Since proxmox 3.3, hotplug option is available in GUI.
Then add/remove your disk or nics as usual.
For disk unplug, verify that your disk is not mounted in your linux guest or disabled in windows disk management.
CPU hotplug
- In the VM Options edit the "Hotplug" Value and activate "CPU Hotplug".
- In the Hardware Section of your VM specify the maximum number of Sockets/Cores.
- You can now use the "CPU Options" dialog to change the number of vCPUs while the machine is running.
maxcpus = sockets * cores.
Note : windows cpu hotplug is working since qemu 2.6 cpu hot unplug is working since qemu 2.7
Memory hotplug
Memory hotplug is available in proxmox 3.4.
You need to enable numa and hotplug to get it working
numa: 1 hotplug: memory,...
Then you can use the memory GUI as usual.
Memory Hot-Unplug
- Memory unplug currently doesn't work in Windows (<=win10 currently)
- Memory unplug can't be unstable on Linux (<= kernel 4.10 currently)
for Linux memory unplug, you need to have movable zone enabled in the kernel config (not enabled by default on Debian/Ubuntu)
CONFIG_MOVABLE_NODE=YES
and
"movable_node" boot kernel parameter enabled
Here are some future kernel patches to improve unplug : http://www.spinics.net/lists/linux-mm/msg125359.html