Skip to main content

Enable and disable memory oversubscription within the VMs

You can enable or disable memory oversubscription with the VMs.

To enable and disable memory oversubscription within the VMs, perform these steps.

  • Linux: No action is needed for Linux VMs. Memory oversubscription is supported automatically once it is enabled on the compute block.

  • Windows: Perform the following procedure.

    Note

    Templates provided by the Lenovo Cloud Marketplace already include the necessary drivers. You must install them manually only if you are preparing your own custom template.

    Note

    The Windows Memory Ballooning service is NOT installed by default in templates provided by Lenovo Cloud Marketplace. You must install it manually for both ThinkAgile CP and your custom templates.

  1. Ensure that the correct drivers are installed within the guest operating system (OS) as follows:
    1. Open PowerShell with administrator privileges.
    2. Run: driverquery
    3. Ensure that VirtIO drivers are installed. If the drivers are not present, install them manually (see step 3).


  2. Ensure that the memory ballooning service is installed and running as follows:
    1. Open PowerShell with administrator privileges.
    2. Run: Get-Service
    3. Ensure that the memory ballooning service is listed and is in a running state. If the service is not present, install it manually (see step 4). If the service is not running, start it.


  3. Install VirtIO drivers.
    Within the Windows guest OS, ensure that the ThinkAgile CP ISO is attached as follows:
    1. Open Device Manager.
    2. Navigate to System Devices. (The option here might have a different name depending on your Windows OS version. For example, it is known as System Devices for Windows Server 2016.)
    3. Right-click the VirtIO Balloon Driver.
    4. Select Update Driver Software.


    5. Select Browse my computer for driver software.


    6. Provide the path to the CD drive and click Next.
    7. After the drivers are installed, you should receive a confirmation like the following.


  4. Install the Windows Memory Ballooning Service.
    1. Within the Windows guest OS, ensure that the ThinkAgile CP ISO is attached.
    2. Navigate to the folder <CDROM>:\virtio-win-0.1.141\Balloon\<WINDOWS>
    3. Copy the folder with the balloon service to a safe location on the C:\ drive. For example, you can use C:\Balloon\.
      Warning
      It is critical to copy the service into a reliable location before registering it. Otherwise, the service might become unavailable after the VM restart.
      Note
      Depending on the Windows version, the ISO might include both 32-bit (x86) and 64-bit (amd64) versions of the service. You should choose based on your VM processor architecture.
    4. Open the PowerShell window as the administrator, and navigate to the folder into which you copied the Balloon service.
    5. Execute .\blnsvr.exe -i to register the service within the OS. (See the image in the following step to see how the registration looks.)
    6. Follow the Windows instructions above to ensure that the memory ballooning service is now running.