How to set hot plugged memory online_movable

Hi, I'd like to try the memory hot unplug, refer to: https://www.ovirt.org/documentation/vmm-guide/chap-Editing_Virtual_Machines....: "All blocks of the hot-plugged memory must be set to **online_movable** in the virtual machine’s device management rules. In virtual machines running up-to-date versions of Enterprise Linux or CoreOS, this rule is set by default." I created a VM running CentOS7.6: # more /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # more /usr/lib/udev/rules.d/40-redhat.rules ... # Memory hotadd request SUBSYSTEM!="memory", ACTION!="add", GOTO="memory_hotplug_end" PROGRAM="/bin/uname -p", RESULT=="s390*", GOTO="memory_hotplug_end" ENV{.state}="online" PROGRAM="/bin/systemd-detect-virt", RESULT=="none", ENV{.state}="online_movable" ATTR{state}=="offline", ATTR{state}="$env{.state}" LABEL="memory_hotplug_end" It looks like the online_movable will be set only when systemd-detect-virt returns none, i.e. hot plugging memory for a bare-metal machine, so how to make the hot plugged memory "online_movable" in the virtual machines? Thank you. Regards, -Zhen

zodaoko@gmail.com writes:
Hi,
I'd like to try the memory hot unplug, refer to: https://www.ovirt.org/documentation/vmm-guide/chap-Editing_Virtual_Machines....:
"All blocks of the hot-plugged memory must be set to **online_movable** in the virtual machine’s device management rules. In virtual machines running up-to-date versions of Enterprise Linux or CoreOS, this rule is set by default."
I created a VM running CentOS7.6: # more /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # more /usr/lib/udev/rules.d/40-redhat.rules ... # Memory hotadd request SUBSYSTEM!="memory", ACTION!="add", GOTO="memory_hotplug_end" PROGRAM="/bin/uname -p", RESULT=="s390*", GOTO="memory_hotplug_end"
ENV{.state}="online" PROGRAM="/bin/systemd-detect-virt", RESULT=="none", ENV{.state}="online_movable" ATTR{state}=="offline", ATTR{state}="$env{.state}"
LABEL="memory_hotplug_end"
It looks like the online_movable will be set only when systemd-detect-virt returns none, i.e. hot plugging memory for a bare-metal machine, so how to make the hot plugged memory "online_movable" in the virtual machines? Thank you.
Hi, you can copy 40-redhat.rules to /etc/udev/rules.d/ and edit it to always set memory state as online_movable. It will override the default file content after reboot (or udev rules reload). Regards, Milan
Regards, -Zhen _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/LKUZKCLLWOCK3S...
participants (2)
-
Milan Zamazal
-
zodaoko@gmail.com