Hot Plugging Devices on Virtual Machines
You can enable or disable devices while a virtual machine is running.
Hot Plugging vCPUs
Hot plugging vCPUs means enabling or disabling devices while a virtual machine is running.
Note:
Hot unplugging a vCPU is only supported if the vCPU was previously hot plugged. A virtual machine’s vCPUs cannot be hot unplugged to less vCPUs than it was originally created with.
Before you can hot plug vCPUs, you must meet the following prerequisites:
-
The virtual machine's operating system must be explicitly set and must support CPU hot plug. For details, see oVirt Documentation.
- The virtual machine must have at least four vCPUs
-
Windows virtual machines must have the guest agents installed. See Windows Virtual Machines Lose Functionality Due To Deprecated Guest Agent in the Known Issues section of the Oracle Linux Virtualization Manager: Release Notes for more information.
Create vm with 4 cpus Hotplug 2 more (cpu count 6) Hot unplug cpus that you added (cpu count 4) Note that only previously hot plugged CPUs can be hot unplugged
To hot plug a vCPU:
-
Click Compute and then select Virtual Machines.
-
Select a virtual machine that is running and click Edit.
-
Click the System tab.
-
Change the value of Virtual Sockets as required.
-
Click OK.
Hot Plugging Virtual Memory
Hot plugging memory means enabling or disabling devices while a virtual machine is running. Each time you hot plug memory, it appears as a new memory device under Vm Devices on the virtual machine's details page, up to a maximum of 16.
Note:
This feature is only available for the self-hosted engine Engine virtual machine, which is currently a technology preview feature.
To hot plug virtual memory:
-
Click Compute and then select Virtual Machines.
-
Select a virtual machine that is running and click Edit.
-
Click the System tab.
-
Enter a new number for Memory Size. You can add memory in multiples of 256 MB. By default, the maximum memory allowed for the virtual machine is set to 4x the memory size specified.
Note:
Hot plugging virtual memory is only possible if the Max Memory Size is greater than the currently configured memory size. -
Click OK.
The Pending Virtual Machine changes window opens.
-
Click OK for the changes to take place immediately or check Apply later and then OK to wait for the next virtual machine restart.
-
Click OK.
You can see the virtual machine's updated memory in the Defined Memory field of the virtual machine's details page and you can see the added memory under Vm Devices.
-
Only memory added with hot plugging can be hot unplugged.
-
The virtual machine's operating system must support memory hot unplugging.
-
The virtual machine must not have a memory balloon device enabled.
To hot unplug virtual memory:
-
Click Compute and then select Virtual Machines.
-
Click on the name of a virtual machine that is running.
The virtual machine's details page opens.
-
Click Vm Devices.
-
In the Hot Unplug column, click Hot Unplug beside any memory device you want to remove.
The Memory Hot Unplug windows opens with a warning.
-
Click OK.
Under General on the virtual machine details page, the Physical Memory Guaranteed value for the virtual machine is decremented automatically.