Skip to content

Entries tagged "cloud".

Cloudstack becomes an Apache top-level project

And so Cloudstack has graduated from the Apache Incubator!

Fireworks, trumpets!

Official announcement here.

Apache Cloudstack homepage.

Cloudstack 4.1.0

A couple of days ago the Apache foundation has released Cloudstack version 4.1.0 which brings a lot of new interesting stuff:
An API discovery service that allows an end point to list its supported APIs and their details.
Added an Events Framework to CloudStack to provide an “event bus” with publish, subscribe, and unsubscribe semantics. Includes a RabbitMQ plugin that can interact with AMQP servers. Introduces the notion of a state change event.
Implement L3 router functionality in the Nicira NVP plugin, and including support for KVM (previously Xen-only).
API request throttling to prevent attacks via frequent API requests.
AWS-style regions.
Egress firewall rules for guest networks.
Resizing root and data volumes.
Reset SSH key to access VMs.
Support for EC2 Query API.
Autoscaling support in conjunction with load balancing devices such as NetScaler.

Looking forward to testing it.
Download from here: http://cloudstack.apt-get.eu/rhel/4.1/
The original announcement here:
https://blogs.apache.org/cloudstack/entry/apache_cloudstack_4_1_0

PS: one can use this for a simple deployment: https://github.com/penguin2716/autoinstall_cloudstack/blob/master/README.org.

Cloudstack 4.2.0 is out!

The Apache foundation announces version 4.2 of Cloudstack cloud platform!
There are loads of new interesting features, check them out:

http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes

Protect KVM processes from OOM killer

While running clouds on Linux KVM hypervisors it may happen that some of your virtual machines processes get killed by the OOM killer in order to free up memory.

Depending on your situation, the OOM killer may be instructed not to kill certain processes; but if you go this way make sure you know what you are doing and how resources are used.

So, to proceed with protecting KVM processes from out of memory scenarios, we need to run a few commands:
1 - determine the PID of the processes, we can use pgrep for this
2 - protect them from OOM killer by changing the PIDs oom_adj value to -17 (OOM_DISABLE); if you use a 3.x+ kernel then you need to change oom_score_adj to -1000 instead as oom_adj is deprecated

This can be wrapped up in a one-liner such as this:
for PID in $(pgrep qemu-kvm); do echo -17 > /proc/$PID/oom_adj; done

That would work in CentOS 6, but if you are on a newer kernel than that (say 3.x like the one in CentOS 7) then use this:
for PID in $(pgrep qemu-kvm); do echo -1000 > /proc/$PID/oom_score_adj; done

You might want to double check your KVM processes run as qemu-kvm, that's the program's name in CentOS, it may differ in other distributions.

If you do not want to do this manually every time a VM is created you can simply create a cron job to do it for you every X minutes; if you spin up instances very often then you may set it as frequent as 1 minute:
echo '*/1 * * * * root for PID in $(pgrep qemu-kvm); do echo -1000 > /proc/$PID/oom_score_adj; done' > /etc/cron.d/oomprotect

If you run into memory usage issues, do have a look at KSM as it can help optimise memory utilisation (but at the cost of extra CPU usage).