Skip to content

Evaluating host available memory when starting virtual machines #12276

@havengit

Description

@havengit

problem

I'm not sure if this is a bug.
The situation is as follows:
When starting a virtual machine or performing a live migration, ACS evaluates whether the target host has sufficient memory. As shown in the screenshot, the total memory is 93GB, with 86GB currently used and 71GB allocated. Attempting to start an 8GB virtual machine succeeds. Using free -g confirms the system has indeed used 86GB.
Analysis of the logs indicates that ACS determines whether the host has sufficient memory resources to start a VM based on allocated memory, not actual used memory.

The system and other programs consume a certain amount of memory. Typically, the amount of memory used is higher than the amount allocated, which can lead to insufficient memory and trigger an OOM (Out of Memory) issue.

I know that setting host.reserved.mem.mb in the agent configuration file reserves memory. This is a static configuration. I'm unsure if there is a better approach.

Translated with DeepL.com (free version)

VM Start log.txt

Image Image

versions

Cloud stack : 4.18.0.0
Hypervisor: KVM 6.2/ Libvirt 8.0
OS: Ubuntu 22.04 LTS

The steps to reproduce the bug

The steps have been described above.

What to do about it?

I'm not sure if this is a bug or if it's just by design. Is there a better way to avoid this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions