question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider for compact memory before running VM

See original GitHub issue

Description Somtimes my VMs can’t start with the next error:

[Z0][VMM][I]: error: internal error: process exited while connecting to monitor: ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
[Z0][VMM][I]: failed to initialize KVM: Cannot allocate memory

But after echo 1 > /proc/sys/vm/compact_memory everything start working fine.

My idea is to add this action to the kvm driver, and call it before any VM is start.

Use case

Avoid problems caused with high memory fragmentation on the host.

More info here: https://stackoverflow.com/questions/46464785/cannot-allocate-memory-despite-free-reporting-available

Interface Changes

Modify deploy action for the kvm driver.

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kvapscommented, Feb 26, 2020

Yes, we’re using the patch form https://github.com/OpenNebula/one/pull/3126, and set COMPACT_MEMORY=yes already for one year, we are started having less problem connected with this error, but sometimes they are still happening.

Today I’ve tried echo 3 > /proc/sys/vm/drop_caches as well and my VM is started working fine after that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Estimating Memory Requirements for Virtual Machine Desktops
A good starting point is to allocate 1GB for 32-bit Windows 7 or later desktops and 2GB for 64-bit Windows 7 or later...
Read more >
Changing the hardware resources on a running VM - StarWind
Virtual RAM hot-plug · Right-click a virtual machine in the inventory and select Edit Settings. · On the Virtual Hardware tab, expand Memory,...
Read more >
Windows 10 tip: Fine-tune memory usage to make the most of ...
Open the Settings dialog box for your virtual machine and click the Memory tab to see and adjust this allocation. I recommend you...
Read more >
Virtual Machine Memory - an overview | ScienceDirect Topics
As a general rule, the total memory of all the running virtual machines added to the overhead for the VMware Server processes cannot...
Read more >
Memory Management, Requirements and Usage in Hyper-V
Virtual machine density relies heavily on the amount of installed physical memory, but the financial cost of memory escalates quickly with higher chip ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found