Skip to main content

Manage CPU and Memory

You can use the KubeVirt CPU Hotplug and KubeVirt Memory Hotplug feature in Palette, which allows the Virtual Machine (VM) to add and remove virtual CPUs and increase or decrease memory while the VM is active. By default, live migration is automatically enabled to apply the changes without rebooting the VM.

Limitations

  • CPU and memory hotplug is not currently supported by the ARM64 architecture.
  • The current CPU and memory hotplug implementation requires the live migration of the VM workload.

Prerequisites

  • A VM deployed and active in Palette.

Manage CPU and Memory

Select the tab that corresponds to the method you want to use to enable CPU or memory hotplug in your VM.

  1. Log in to Palette.

  2. From the left Main Menu, select Clusters, and then select the cluster with the VM you want to update.

  3. Select the Virtual Machines tab, then select the necessary VM and open its Details tab.

    Palette with the Details tab displayed.

  4. Change the desired CPU sockets, CPU cores, or memory size. Toggle the Run Live Migration switch to enable the changes through live migration. If you don't toggle the switch, the changes are applied next time the VM is restarted.

    View of the Memory and CPU Change Box

    info

    Memory changes expose an additional Save & Restart button. This button allows you to save the changes and immediately restart the VM to apply the changes. Otherwise, the changes are applied through live migration.

  5. Select Save.

Validate

  1. Log in to Palette.

  2. From the left Main Menu, select Clusters, and then select the cluster with the VM you want to update.

  3. Select the Virtual Machines tab, then select the necessary VM and open its Console tab.

  4. Log in to the VM using the appropriate credentials specified in the YAML template. The provided templates contain the default credentials for the VM in the cloudInitNoCloud.userData section.

  5. Verify that the VM has the expected number of CPUs or memory size. Use the following commands to verify the number of CPUs, memory size, and number of CPU cores. Keep in mind that the commands may vary based on the OS.

    To verify the number of CPUs and cores, issue the following command.

     lscpu

    To verify the memory size, issue the following command.

    free --human