<div dir="ltr">Robert:<div><br></div><div>I don't see any advantage to using LVM inside of VM images. I bring it up because CentOS partitions using LVM by default, so it's important to make explicit to the user that they need to do a single partition without LVM to use this script.</div>
<div><br></div><div>Lorin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 22, 2013 at 4:35 AM, Robert Plestenjak <span dir="ltr"><<a href="mailto:robert.plestenjak@xlab.si" target="_blank">robert.plestenjak@xlab.si</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looked script again and no, it does not work with LVM. Is there any real need for this? LVM is not really needed for cloud virtual environments (my opinion only).<br>

<div class="im HOEnZb"><br>
- Robert<br>
<br>
----- Original Message -----<br>
From: "Robert Plestenjak" <<a href="mailto:robert.plestenjak@xlab.si">robert.plestenjak@xlab.si</a>><br>
To: <a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a><br>
</div><div class="HOEnZb"><div class="h5">Sent: Monday, July 22, 2013 9:19:53 AM<br>
Subject: Re: [Openstack-operators] CentOS image<br>
<br>
1. It should work with LVM.<br>
<br>
2. Yes, /boot does mess things up. Script is working under assumption that boot is under /.<br>
<br>
- Robert<br>
<br>
----- Original Message -----<br>
From: "Lorin Hochstein" <<a href="mailto:lorin@nimbisservices.com">lorin@nimbisservices.com</a>><br>
To: "Robert Plestenjak" <<a href="mailto:robert.plestenjak@xlab.si">robert.plestenjak@xlab.si</a>><br>
Cc: <a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a><br>
Sent: Sunday, June 30, 2013 8:46:26 PM<br>
Subject: Re: [Openstack-operators] CentOS image<br>
<br>
<br>
Robert:<br>
<br>
<br>
This script doesn't support LVM partitions, does it?<br>
<br>
<br>
Also, I've discovered that it breaks if there's a /boot partition. Apparently, if a boot partition is present then grub prepends a "/boot" to the paths for the kernel and ramdisk, and this script also prepends /boot.<br>

<br>
<br>
Lorin<br>
<br>
<br>
<br>
On Tue, Jun 11, 2013 at 8:38 AM, Robert Plestenjak < <a href="mailto:robert.plestenjak@xlab.si">robert.plestenjak@xlab.si</a> > wrote:<br>
<br>
<br>
Almost forgot, don't forget to install 'wget' and 'openssh-clients'<br>
<br>
<br>
- Robert<br>
<br>
----- Original Message -----<br>
<br>
From: "Robert Plestenjak" < <a href="mailto:robert.plestenjak@xlab.si">robert.plestenjak@xlab.si</a> ><br>
To: <a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a><br>
Sent: Tuesday, June 11, 2013 11:35:01 AM<br>
Subject: Re: [Openstack-operators] CentOS image<br>
<br>
<br>
<br>
Yes, that would be great.<br>
<br>
You can also create image manually in KVM, until proper tools are ready.<br>
<br>
1. create disk image with QCOW2 format<br>
<br>
qemu-img create -f qcow2 -o preallocation=metadata /extra/libvirt/images/centos-6-cloud.qcow2 2G<br>
<br>
2. install centos, I recomend only one partition and no swap (in grizzly, you can set swap size in flavor)<br>
<br>
virt-install --name=centos-6-cloud --disk path=/extra/libvirt/images/centos-6-cloud.qcow2,format=qcow2 -r 1024 --vcpus=1 --hvm -c /extra/iso/CentOS-6.3-x86_64-minimal.iso<br>
<br>
3. login into your new image and modify '/etc/sysconfig/network-scripts/ifcfg-eth0' to look like this<br>
<br>
DEVICE="eth0"<br>
BOOTPROTO="dhcp"<br>
NM_CONTROLLED="no"<br>
ONBOOT="yes"<br>
TYPE="Ethernet"<br>
<br>
4. add EPEL repository and update OS<br>
<br>
wget <a href="http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm" target="_blank">http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm</a><br>
rpm -ivh epel-release-6-8.noarch.rpm<br>
<br>
5. install cloud-utils and cloud-init<br>
<br>
yum update<br>
yum install cloud-utils, cloud-init<br>
<br>
6. Download 'centos-image-mod.sh' and 'init-part' together in same directory, run 'centos-image-mod.sh'. This will modify initrd and grub.conf.<br>
<br>
6.1. Edit '/boot/grub/grub.conf', check if everything is OK. Also, may not be a bad idea to set timeout to 0.<br>
<br>
7. Delete '/etc/udev/rules.d/70-persistent-net.rules', this will be auto created during boot. Don't forget this, since you won't have functional network when you bring this image up on Openstack.<br>
<br>
8. Power down your virtual Centos<br>
<br>
9. Compress QCOW2 image with<br>
<br>
qemu-img convert -c /extra/libvirt/images/centos-6-cloud.qcow2 -O qcow2 /tmp/centos.qcow2<br>
<br>
<br>
Image /tmp/centos.qcow2 is now ready for upload to Openstack<br>
<br>
- Robert<br>
<br>
<br>
On 16 May 2013 21:08, Robert Plestenjak < <a href="mailto:robert.plestenjak@xlab.si">robert.plestenjak@xlab.si</a> > wrote:<br>
> This script will modify initrd for image resize during boot, redirect boot log messages to ttyS0 and set NOOP sceduler. Tested on CentOS 6.3 and 6.4.<br>
><br>
> <a href="https://github.com/flegmatik/centos-image-resize" target="_blank">https://github.com/flegmatik/centos-image-resize</a><br>
<br>
This would be lovely to integrate into diskimage-builder [as part of a<br>
CentOS supporting element].<br>
<br>
-Rob<br>
<br>
--<br>
Robert Collins < <a href="mailto:rbtcollins@hp.com">rbtcollins@hp.com</a> ><br>
Distinguished Technologist<br>
HP Cloud Services<br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br>
<br>
<br>
<br>
--<br>
<br>
Lorin Hochstein<br>
<br>
Lead Architect - Cloud Services<br>
Nimbis Services, Inc.<br>
<a href="http://www.nimbisservices.com" target="_blank">www.nimbisservices.com</a><br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Lorin Hochstein<br><div>Lead Architect - Cloud Services</div><div>Nimbis Services, Inc.</div><div><a href="http://www.nimbisservices.com" target="_blank">www.nimbisservices.com</a></div>
</div>
</div>