[Openstack] Create a custom CentOS 7.x image

Nasir Mahmood nasir.mahmood at gmail.com
Thu Oct 22 07:00:27 UTC 2015


Best idea is to convert the vmdk or the virtualbox image directly to qcow2
format like below and then do all those customizations later on.

qemu-img convert CentOS-TEMPLATE-disk1.vmdk -O qcow2
CentOS-TEMPLATE-disk1.qcow2

You might have to change the syntax .
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.

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20151022/1f1eff04/attachment.html>


More information about the Openstack mailing list