How to run CentOS images that work?

asked 2015-03-23 14:17:36 -0600

FreshFruitsRule gravatar image

I'm having major issues trying to get CentOS (6 or 7) up and running in my OpenStack instance. They just don't want to work.

I've had absolutely zero issues getting Ubuntu to work--the official cloud images work flawlessly. But trying to get CentOS running has proven almost impossible.

Every single CentOS 7 image I can get--every single one I've found on the internet, and every single one I've built myself following every tutorial that exists--has the following two problems:

1) SSH login never works. Ever. Every single time I try to use the key, it either tells me it's the wrong key or it asks me for password anyway even though no password is defined. (Yes I'm using the right key).

2) Disk resize never happens. No matter what size I pick for the instance's hard drive, it's always whatever the image was originally set with (usually 8GB). It never, ever, ever resizes.

With CentOS 6 images, I did manage to find one that has functional disk resizing, but still no functional SSH login. I have never seen any CentOS OpenStack instance ever work with keypair login over SSH, ever. Whenever I try to bypass this by making an image that directly has a key-fetch script from metadata, it always times out and fails with an HTTP 500. This error cannot be my environment's problem because this always works with any other distro other than CentOS.

Is it not possible to run CentOS images in OpenStack? Because from everything I've read it should be.

Has anyone gotten CentOS working, and if so, how?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-03-24 11:21:35 -0600

Have you reviewed the Openstack image requirements here at This may give you a better idea of what's required, especially take note to cloudinit as this is how the SSH key is injected, the disk resizing can be addressed in the default cloud-init script.

edit flag offensive delete link more

answered 2015-03-30 07:35:20 -0600

don gravatar image

the default user in /etc/cloud/cloud.cfg for the centos is different than ubuntu. You have to login as that user with ssh. We changed all OS to use 'cloud' as the user (so that Ubuntu, RedHat, FreeBSD were harmonised).

As for the resize. shows the info. In particular, you want to look @ the linux-rootfs-resize for centos6. Once that is done, it will dynamically resize on boot. make sure you create the image on the smallest size you will ever want and then each time its booted it will grow.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-03-23 14:17:36 -0600

Seen: 1,959 times

Last updated: Mar 30 '15