[Openstack] Create a custom CentOS 7.x image

Jagga Soorma jagga13 at gmail.com
Thu Oct 22 03:03:50 UTC 2015


Hi Guys,

I am new to openstack and have been using images provided by others in
my test cloud.  However, I am trying to so some customization and need
to build my own image.  I built CentOS 7.1 on my virtualbox instance
and went through the following steps:

--
/etc/default/grub - fixed this file to get console working
grub2-mkconfig -o /boot/grub2/grub.cfg
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
yum install acpid -y
systemctl enable acpid
systemctl disable firewalld
yum install cloud-init -y
yum install cloud-utils-growpart -y
cleanup /etc/sysconfig/network-scripts/ifcfg-*
--

Just want to get a basic image working before I do any customization.
After following these steps (I choose qcow as the virtualbox image
format) I upload the image into my cluster using:

glance image-create --name "testimg3" --disk-format qcow2
--container-format bare --file centos71.qcow --progress

However, when deploying from this image I see that on console the boot
drive is not being found.  Now, on my virtualbox the local drive shows
up as /dev/sda* but in kvm it is /dev/vda*.  I haven't read anywhere
in the docs that there is something that I need to do for this but
seems like what is missing.  Is there something that needs to be done
on my virtualbox instance before shutting it down to make sure the
correct disk is found and the os can boot.  In the fstab I see that
the disk is being referenced with uuid in my virtualbox instance.

Any help would be greatly appreciated!

Thanks.




More information about the Openstack mailing list