Ask Your Question
0

How to compile programs on cirros?

asked 2016-11-06 19:19:09 -0600

I would like to create my own programs on cirros instances (background: I want to dirty memory pages so that live-migration takes a long time or even forever). Cirros doesn't have a C compiler, and my naive attempts to compile and statically link a simple program outside of Cirros and run it on an instance failed.

Is there a way to install a compiler on Cirros? If not, what compiler options would you choose to cross-compile for Cirros?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-11-07 07:43:55 -0600

Hi Bernd,

From http://docs.openstack.org/image-guide/obtain-images.html (http://docs.openstack.org/image-guide...) “CirrOS is a minimal Linux distribution that was designed for use as a test image on clouds such as OpenStack Compute.”

ssh’ing into an instance of cirros in my environment,

ls -lt /bin | grep -c busybox

shows 83 links to busybox.

https://en.wikipedia.org/wiki/BusyBox “BusyBox is software that provides several stripped-down Unix tools in a single executable file. … It was specifically created for embedded operating systems with very limited resources.”

cirros is very quick to load and very lightweight. My observation is that your complication work will be better served using a traditional operating system from http://docs.openstack.org/image-guide/obtain-images.html (http://docs.openstack.org/image-guide...)

I hope this was helpful, regards, Chris

edit flag offensive delete link more

Comments

Thanks Chris. Yes, I know that Cirros is not made for running real-life workloads and is based on software targeted to embedded and otherwise low-performance systems. My problem is that I currently only have the Cirros option.

Bernd Bausch gravatar imageBernd Bausch ( 2016-11-07 17:39:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-11-06 19:19:09 -0600

Seen: 307 times

Last updated: Nov 06 '16