/
userguide-create_image.xml
401 lines (401 loc) · 14.2 KB
/
userguide-create_image.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<?xml version="1.0"?>
<?xml-stylesheet href="urn:x-suse:xslt:profiling:docbook51-profile.xsl"
type="text/xml"
title="Profiling step"?>
<!DOCTYPE chapter [
<!ENTITY % entities SYSTEM "entities.ent"> %entities;
]>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="user-image-upload">
<title>Creating and Uploading a Glance Image</title>
<para>
This guide will assist you in obtaining, creating, or modifying cloud images
for your Image (Glance) repository and uploading them for use.
</para>
<section xml:id="idg-all-userguide-create-image-xml-7">
<title>How to Curate Your Own Images</title>
<para>
OpenStack has created a guide to show you how to obtain, create, and modify
images that will be compatible with your &kw-hos; cloud:
</para>
<para>
<link xlink:href="http://docs.openstack.org/image-guide/content/">OpenStack
Virtual Machine Image Guide</link>
</para>
</section>
<section xml:id="upload-cirros-img">
<title>Example: Uploading a Cirros Linux Image for Use</title>
<para>
These steps assume you have a user account setup within Keystone that has
access to upload images to the Glance repository. Contact your Administrator
if you do not have these permissions or if you are unsure.
</para>
<procedure>
<step>
<para>
Download the Cirros image from the internet:
</para>
<screen>wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img</screen>
</step>
<step>
<para>
Upload that file to Glance using the GlanceClient CLI:
</para>
<screen>glance \
--os-username <username> \
--os-password <password> \
--os-tenant-name <project name> \
--os-auth-url <identity endpoint> \
--os-endpoint-type internalURL \
image-create
--name cirros-0.3.3-x86_64 \
--container-format bare \
--disk-format qcow2 \
--visibility public \
--file <path to Cirros image file></screen>
</step>
</procedure>
</section>
<!-- This entire section deals with installing Windows Server using Ubuntu and
Debian based applications. It needs to support SUSE.
<section xml:id="idg-all-userguide-create-image-xml-9">
<title>Building a Microsoft Windows Server Guest Image</title>
<para>
This section describes how to create a Microsoft Windows Server 2012, 2012
R2, 2008, or 2008 R2 image for deployment within &kw-hos;. The Microsoft
Windows Server images can be created on a 64-bit workstation running Ubuntu
13.10 or higher on physical hardware that supports KVM.
</para>
<note>
<para>
To determine the maximum supported Windows Server VM configuration for a
given CPU architecture, please review the &vendor; entries in the
category <quote>Server Virtualization</quote> of
<link xlink:href="https://www.windowsservercatalog.com/results.aspx?bCatID=1521&cpID=0&avc=0&OR=1">Windows
Server Catalog</link>.
</para>
</note>
<para>
<emphasis role="bold">How to build a supported Microsoft Windows Server
guest image for &productname;</emphasis>
</para>
<para>
The following steps describe the procedure to create and deploy Microsoft
Windows Server that is Microsoft SVVP (Server Virtualization Validation
Program) compliant on &productname; as a Nova compute VM
</para>
<para>
In the following steps we will use Windows Server 2012 as the example.
Windows Server evaluation images are available on the
<link
xlink:href="http://www.microsoft.com/en-us/evalcenter/try">Microsoft
website</link> (registration required). To create a Microsoft Windows Server
2012 guest image, follow these steps:
</para>
<orderedlist>
<listitem>
<para>
Download the Windows Server installation ISO.
</para>
</listitem>
<listitem>
<para>
Create the qcow2 image file. You can use the <literal>qemu-img</literal>
command with the create switch to create the initial image file, for
example:
</para>
<screen>qemu-img create -f qcow2 ws2012.qcow2 15G</screen>
<para>
In this example, a 15GB qcow2 disk image file is created and is named
<literal>ws2012.qcow2</literal>. In most cases 15GB is adequate for an
operating system only install. If you expect the Windows Server 2012 disk
image to increase in size, you can specify a larger value.
</para>
</listitem>
<listitem>
<para>
Start the Windows Server 2012 installation with the virt-install command.
The <literal>virt-install</literal> command can be used to install a new
guest operating system on a disk image file.
<literal>virt-install</literal> is part of the <literal>virtinst</literal>
package. To install the <literal>virtinst</literal> package, type the
following command, and then press Enter:
</para>
<screen>sudo apt-get install virtinst</screen>
<para>
In the following example, the <literal>virt-install</literal> command is
used to install Windows Server 2012 on the disk image that you created
earlier in Step 2:
</para>
<screen>virt-install -\-connect qemu:///system -\-name ws2012 -\-ram 2048 -\-vcpus 2 -\-network network=default,model=rtl8139 -\-disk path=ws2012.qcow2,format=qcow2,device=disk,bus=ide -\-cdrom <path_to_windows_2012_iso> -\-vnc -\-os-type windows -\-os-variant win2k8</screen>
<para>
Where:
</para>
<informaltable colsep="1" rowsep="1">
<tgroup cols="2">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
<thead>
<row>
<entry>Parameter</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>-\-name</entry>
<entry>The name of the Windows Server 2012 virtual machine.</entry>
</row>
<row>
<entry>-\-ram</entry>
<entry>The amount of RAM.</entry>
</row>
<row>
<entry>-\-vcpus</entry>
<entry>The number of virtual cpus.</entry>
</row>
<row>
<entry>-\-network</entry>
<entry>The type of network interface.</entry>
</row>
<row>
<entry>-\-disk</entry>
<entry>Path to the disk image (ide bus in the example above).</entry>
</row>
<row>
<entry>-\-cdrom</entry>
<entry>Path to operating system .iso file.</entry>
</row>
<row>
<entry>-\-vnc</entry>
<entry>Used for console connections.</entry>
</row>
<row>
<entry>-\-os-type</entry>
<entry>Operating system type.</entry>
</row>
<row>
<entry>-\-os-variant</entry>
<entry>(Optional) Used to specify an operating system variant.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
You can use <literal>virt-manager</literal> or
<literal>virt-viewer</literal> to connect to the VMs console and start the
windows installation. Make sure that you shut down the windows guest image
after the installation is complete.
</para>
</listitem>
<listitem>
<para>
Upload the qcow2 image to glance. You can use the glance
<literal>image-create</literal> command to upload the Windows Server 2012
image to Glance, for example:
</para>
<screen>glance image-create -\-name WS2012 -\-disk-format qcow2 -\-container-format bare -\-is-public true -\-file ws2012.qcow2</screen>
</listitem>
<listitem>
<para>
Set metadata properties to the Glance image. You can add useful metadata
information to the image, such as operating system information or hardware
details by using the glance image-update command, for example:
</para>
<screen>glance image-update WS2012 -\-property os_type=windows -\-property hw_disk_bus=ide -\-property hw_vif_model=rtl8139</screen>
</listitem>
</orderedlist>
<para>
<emphasis role="bold">How to build a non-supported Microsoft Windows Server
guest image for &productname;</emphasis>
</para>
<para>
In the following steps we will use Windows Server 2012 as the example.
Windows Server evaluation images are available on the
<link xlink:href="http://www.microsoft.com/en-us/evalcenter/try">Microsoft
website</link> (registration required). To create a Microsoft Windows Server
2012 guest image, follow these steps:
</para>
<orderedlist>
<listitem>
<para>
Download the Windows Server installation ISO.
</para>
</listitem>
<listitem>
<para>
Download signed VirtIO drivers ISO from the Fedora
website
<link xlink:href="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/"/>.
</para>
</listitem>
<listitem>
<para>
Start the installation of Windows Server 2012. Use Virt-manager to start
Installation of Windows Server 2012 and provide the following information:
</para>
<orderedlist>
<listitem>
<para>
In the <emphasis role="bold">Name</emphasis> field, enter a descriptive
name.
</para>
</listitem>
<listitem>
<para>
Select <emphasis role="bold">Local install media</emphasis>, and then
click <emphasis role="bold">Forward</emphasis>.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Browse</emphasis> and select the location
where the ISO image is located, and then click
<emphasis role="bold">Forward</emphasis>.
</para>
</listitem>
<listitem>
<para>
Assign <emphasis role="bold">4096</emphasis> MB of memory and
<emphasis role="bold">4</emphasis> CPUs, and then click
<emphasis role="bold">Forward</emphasis>.
</para>
</listitem>
<listitem>
<para>
Create a disk of <emphasis role="bold">30</emphasis> GB. Uncheck the
<emphasis role="bold">Allocate entire disk
now</emphasis> option, and then click
<emphasis role="bold">Forward</emphasis>.
</para>
</listitem>
<listitem>
<para>
Click to enable the <emphasis role="bold">Customize configuration before
install</emphasis> option.
</para>
</listitem>
<listitem>
<para>
Under <emphasis role="bold">Advanced options</emphasis>, in the
<emphasis role="bold">Disk</emphasis> section, set disk
bus to <emphasis role="bold">Virtio</emphasis>.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Add Hardware</emphasis>, and then add an IDE
CDROM that points to the download location for the VirtIO drivers ISO.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Finish</emphasis> to start the installation.
</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>
Enable the VirtIO drivers. The disk is not automatically detected by the
Windows installer. When requested to choose an installation target, click
<emphasis role="bold">Load driver</emphasis>. Browse the file
system, and then select E:\WIN8\AMD64 folder. The Windows installer
displays a list of drivers to install. Select the drivers, and then
continue with the installation. Once the installation is completed and the
VM restarts, you can define a password for the administrator when
prompted.
</para>
</listitem>
<listitem>
<para>
Login to the VM as administrator and start a command window.
</para>
</listitem>
<listitem>
<para>
Complete the VirtIO drivers installation by running the following command:
</para>
<screen>pnputil.exe -i -a E:\WIN8\AMD64\*.INF</screen>
</listitem>
<listitem>
<para>
Set the PowerShell execution policy. To allow Cloudbase-Init to run
scripts during an instance boot, set the PowerShell execution policy to be
unrestricted, by running the following commands:
</para>
<screen>powershell</screen>
<screen>Set-ExecutionPolicy Unrestricted</screen>
</listitem>
<listitem>
<para>
Download Cloudbase-Init x64 version for 64 bit operating system:
<link xlink:href="https://github.com/stackforge/cloudbase-init"/>
</para>
</listitem>
<listitem>
<para>
Install Cloudbase-Init. During the installation of Cloudbase-Init, in the
Configuration options window, change the following settings:
</para>
<screen>Username : Admin
Network Adapter to configure : Red Hat VirtIO Ethernet Adapter
Serial port for logging : COM1</screen>
</listitem>
<listitem>
<para>
Complete the Cloudbase-Init setup. Once the installation is complete, in
the <emphasis role="bold">Complete the Cloudbase-Init setup
Wizard</emphasis> window, select the <emphasis role="bold">Run
Sysprep</emphasis> and
<emphasis role="bold">Shutdown</emphasis> check boxes. Click
<emphasis role="bold">Finish</emphasis> and wait for the Windows Server
image to shut down.
</para>
</listitem>
</orderedlist>
</section>
-->
<section xml:id="idg-all-userguide-create-image-xml-11">
<title>Using Horizon to Upload an Image</title>
<para>
It is possible to use the Horizon UI to create images for use in your cloud.
These steps will show you how.
</para>
<para>
To successfully create large images, select the image format first, then add
image name, image source and visibility.
</para>
<para>
Performing the steps out of this order will cause OS image creation to fail.
</para>
<important>
<para>
By default, the HTTP upload option will not work when uploading images. To
utilize this option you will need your cloud administrator to enable this
option. See <xref linkend="troubleshooting-glance"/> for more
details.
</para>
</important>
<orderedlist>
<listitem>
<para>
Log in to the Horizon UI.
</para>
</listitem>
<listitem>
<para>
In the menu, select
<menuchoice><guimenu>Project</guimenu><guimenu>Compute</guimenu><guimenu>Images</guimenu></menuchoice>
and click the <guimenu>Create Image</guimenu> button:
</para>
</listitem>
<listitem>
<para>
Fill in the details for your new image and then click the
<emphasis role="bold">Create Image</emphasis> button:
</para>
</listitem>
</orderedlist>
</section>
</chapter>