~koolhead17/openstackbook/cssbook

« back to all changes in this revision

Viewing changes to Image.xml

  • Committer: Murthyraju Manthena
  • Date: 2011-10-11 13:49:47 UTC
  • Revision ID: murthyraju.manthena@csscorp.com-20111011134947-f9j4robcayk9q31x
Updated Installation Chapter for Diablo. Dropped Dashboard

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
chkconfig sshd on
72
72
</programlisting> 
73
73
 
 
74
<section xml:id="Tweaking_etc_fstab-d1e1463">
 
75
<title>Tweaking /etc/fstab</title>
 
76
<para>You will need to tweak /etc/fstab to make it suitable for a cloud instance. Nova-compute may resize the disk at the time of launch of instances based on the instance type chosen. This can make the UUID of the disk invalid. Hence we have to use File system label as the identifier for the partition instead of the UUID.</para>
 
77
<para>Loop mount the serverfinal.img, by running</para>
 
78
 
 
79
<programlisting> 
 
80
sudo mount -o loop serverfinal.img /mnt
 
81
</programlisting> 
 
82
 
 
83
<programlisting> 
 
84
UUID=e7f5af8d-5d96-45cc-a0fc-d0d1bde8f31c   / ext4 errors=remount-ro   0   1
 
85
</programlisting> 
 
86
<para>to</para>
 
87
<programlisting> 
 
88
LABEL=uec-rootfs    /    ext4        defaults    0   0
 
89
</programlisting> 
 
90
</section>
74
91
<para>Also remove the network persistence rules from /etc/udev/rules.d as their presence will result in the network interface in the instance coming up as an interface other than eth0.</para>
75
92
 
76
93
<programlisting> 
151
168
sudo losetup -d /dev/loop0
152
169
</programlisting> 
153
170
</section>
154
 
<section xml:id="Tweaking_etc_fstab-d1e1463">
155
 
<title>Tweaking /etc/fstab</title>
156
 
<para>You will need to tweak /etc/fstab to make it suitable for a cloud instance. Nova-compute may resize the disk at the time of launch of instances based on the instance type chosen. This can make the UUID of the disk invalid. Hence we have to use File system label as the identifier for the partition instead of the UUID.</para>
157
 
<para>Loop mount the serverfinal.img, by running</para>
158
 
 
159
 
<programlisting> 
160
 
sudo mount -o loop serverfinal.img /mnt
161
 
</programlisting> 
162
 
 
163
 
<programlisting> 
164
 
UUID=e7f5af8d-5d96-45cc-a0fc-d0d1bde8f31c   / ext4 errors=remount-ro   0   1
165
 
</programlisting> 
166
 
<para>to</para>
167
 
<programlisting> 
168
 
LABEL=uec-rootfs    /    ext4        defaults    0   0
169
 
</programlisting> 
170
 
</section>
171
171
<section xml:id="Fetching_Metadata_in_Fedora-d1e1488">
172
172
<title>Fetching Metadata in Fedora</title>
173
173
 
186
186
cat /root/.ssh/authorized_keys
187
187
echo "************************"
188
188
</programlisting> 
 
189
 
189
190
</section>
190
 
<section xml:id="Kernel_and_Initrd_for_OpenStack-d1e1503">
191
 
<title>Kernel and Initrd for OpenStack</title>
192
 
<para>Copy the kernel and the initrd image from /mnt/boot to user home directory. These will be used later for creating and uploading a complete virtual image to OpenStack.</para>
193
 
 
194
 
<programlisting> 
195
 
sudo cp /mnt/boot/vmlinuz-2.6.38-7-server /home/localadmin
196
 
</programlisting> 
197
 
 
198
 
<programlisting> 
199
 
sudo cp /mnt/boot/initrd.img-2.6.38-7-server /home/localadmin
200
 
</programlisting> 
201
 
 
202
191
<para>Unmount the Loop partition</para>
203
192
 
204
193
<programlisting> 
217
206
<para>Run the following command</para>
218
207
 
219
208
<programlisting> 
220
 
uec-publish-image -t image --kernel-file vmlinuz-2.6.38-7-server --ramdisk-file initrd.img-2.6.38-7-server amd64 serverfinal.img bucket1
 
209
uec-publish-image amd64 serverfinal.img bucket1
221
210
</programlisting> 
222
211
 
223
212
<para>For Fedora, the process will be similar. Make sure that you use the right kernel and initrd files extracted above.</para>
244
233
localadmin@client1:~$ euca-describe-images
245
234
</programlisting> 
246
235
<programlisting> 
247
 
IMAGE   ari-7bfac859   bucket1/initrd.img-2.6.38-7-server.manifest.xml  css  available  private  x86_64   ramdisk
248
 
</programlisting> 
249
 
 
250
 
<programlisting> 
251
236
IMAGE   ami-5e17eb9d   bucket1/serverfinal.img.manifest.xml   css   available   private   x86_64  machine   aki-3d0aeb08   ari-7bfac859
252
237
</programlisting> 
253
 
 
254
 
<programlisting> 
255
 
IMAGE   aki-3d0aeb08   bucket1/vmlinuz-2.6.38-7-server.manifest.xml   css   available   private   x86_64   kernel
256
 
</programlisting> 
257
 
 
258
238
<programlisting> 
259
239
localadmin@client1:~$
260
240
</programlisting> 
261
241
</section>
262
 
</section>
263
242
<section xml:id="Creating_a_Windows_Image-d1e1594">
264
243
<title>Creating a Windows Image</title>
265
244
<para>The first step would be to create a raw image on Client1, this will represent the main HDD of the virtual machine, so make sure to give it as much space as you will need.</para>