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 can't be hot unplugged to less vCPUs than it was created with.

Before you can hot plug vCPUs, you must meet the following prerequisites:

  • The virtual machine's OS 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:

  1. Select Compute and then select Virtual Machines.

  2. Select a virtual machine that's running and select Edit.

  3. Select the System tab.

  4. Change the value of Virtual Sockets as required.

  5. Select 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.

When you shut down and restart a virtual machine, these devices are cleared from Vm Devices without reducing the virtual machine's memory, allowing you to hot plug more memory devices.

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:

  1. Select Compute and then select Virtual Machines.

  2. Select a virtual machine that's running and select Edit.

  3. Select the System tab.

  4. 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 configured memory size.
  5. Select OK.

    The Pending Virtual Machine changes window opens.

  6. Select OK for the changes to take place immediately or check Apply later and then OK to wait for the next virtual machine restart.

  7. Select 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.

You can also hot unplug virtual memory, but consider:
  • Only memory added with hot plugging can be hot unplugged.

  • The virtual machine's OS must support memory hot unplugging.

  • The virtual machine must not have a memory balloon device enabled.

To hot unplug virtual memory:

  1. Select Compute and then select Virtual Machines.

  2. Select on the name of a virtual machine that's running.

    The virtual machine's details page opens.

  3. Select Vm Devices.

  4. In the Hot Unplug column, select Hot Unplug beside any memory device you want to remove.

    The Memory Hot Unplug windows opens with a warning.

  5. Select OK.

    Under General on the virtual machine details page, the Physical Memory Guaranteed value for the virtual machine is decremented automatically.