-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06_windows_vm.html
466 lines (416 loc) · 17.8 KB
/
06_windows_vm.html
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<script src="jquery/jquery.min.js"></script>
<script src="popper/popper.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="requirejs/require.js"></script>
<script>var workshop_base_url = "/workshop";</script>
<link rel="stylesheet" href="asciidoctor/css/asciidoctor.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="fontawesome/css/all.min.css">
<link rel="stylesheet" href="css/workshop.css">
<link rel="stylesheet" href="css/workshop-asciidoc.css">
</head>
</body>
<!-- Header -->
<header class="header">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<a href="index.html" class="logo">Red Hat OpenShift Virtualization Roadshow</a>
</div>
</div>
</div>
</header>
<!-- Main -->
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 d-sm-block d-none">
<!-- Table of Contents -->
<ul class="menu">
<li class="category">
<ul class="modules">
<h5 class="category-title">Workshop Modules</h5>
<li class="page"><a href="index.html">Welcome</a></li>
<li class="page"><a href="02_migrate_vms.html">Migrating Virtual Machines</a></li>
<li class="page"><a href="03_ocpv_basics.html">OpenShift Virtualization Basics</a></li>
<li class="page"><a href="04_thanks.html">Thank you and next steps</a></li>
<li class="page"><a href="05_ocpv_customization.html">Optional: Customize Virtual Machines</a></li>
<li class="page active"><a href="06_windows_vm.html">Optional: Windows Virtual Machines</a></li>
<li class="page"><a href="07_bare_metal.html">Optional: Bare Metal OpenShift Overview</a></li>
<li class="page"><a href="08_network_management.html">Optional: Network Management</a></li>
<li class="page"><a href="09_storage_management.html">Optional: Storage Management</a></li>
<li class="page"><a href="10_backup_restore.html">Optional: Backup and Restore</a></li>
<li class="page"><a href="11_metallb.html">Optional: Exposing apps using MetalLB</a></li>
<li class="page"><a href="12_service_route.html">Optional: Exposing apps using a Route</a></li>
</ul>
</li>
</ul>
</div>
<div class="col-sm-9">
<section class="page-content">
<!-- Top Navigation -->
<div class="btn-group btn-group-xs float-right">
<button type="button" onclick="location.href='/workshop/05_ocpv_customization';" class="btn btn-xs btn-transparent" aria-label="Prev">
<span class="fas fa-arrow-left" aria-hidden="true"></span>
</button>
<button type="button" onclick="location.href='/workshop/';" class="btn btn-xs btn-transparent" aria-label="Home">
<span class="fas fa-home" aria-hidden="true"></span>
</button>
<button type="button" onclick="location.href='/workshop/07_bare_metal';" class="btn btn-xs btn-transparent" aria-label="Next">
<span class="fas fa-arrow-right" aria-hidden="true"></span>
</button>
</div>
<!-- Title -->
<h1 class="title">Optional: Windows Virtual Machines</h1>
<!-- Content -->
<div id="toc" class="toc">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="06_windows_vm.html#_create_a_windows_virtual_machine">1. Create a Windows virtual machine</a></li>
</ul>
</div>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>This lab will introduce you to the basics of creating and managing Microsoft Windows VMs in OpenShift Virtualization. This process is very similar to creating and managing Linux-based virtual machines, be sure to return to the OpenShift Virtualization Basics module and go through the exercises for reviewing resources and configuration.</p>
</div>
<div class="ulist">
<div class="title">Goals</div>
<ul>
<li>
<p>Create a new Windows virtual machine</p>
</li>
<li>
<p>Customize the OS using sysprep</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_create_a_windows_virtual_machine">1. Create a Windows virtual machine</h2>
<div class="sectionbody">
<div class="paragraph">
<p>In this segment, we will install Microsoft Windows Server 2019 using an ISO hosted on a web server. This represents one way to install an operating system to a virtual machine that takes advantage of the ability to source disks from many locations, including a web server, object storage, or other persistent volumes in the cluster.</p>
</div>
<div class="paragraph">
<p>This process can be streamlined after the initial operating system installation by creating a template from the virtual machine. The specific process for preparing the guest operating system to be used as a template will vary, be sure to follow your organization’s guidelines and requirements when preparing a template OS.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>From the left menu, navigate to <strong>Virtualization</strong> → <strong>VirtualMachines</strong>:</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/01_Left_Menu.png" alt="01 Left Menu">
</div>
</div>
</li>
<li>
<p>It will list the VMs running in the current project.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/25_List_VMs.png" alt="25 List VMs">
</div>
</div>
</li>
<li>
<p>Press on the top-right the button <strong>Create</strong> and select <strong>From template</strong></p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/26_From_Template.png" alt="26 From Template">
</div>
</div>
</li>
<li>
<p>Scroll down and select <strong>Microsoft Windows Server 2019 VM</strong> tile.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/27_Windows_2k9_Tile.png" alt="27 Windows 2k9 Tile">
</div>
</div>
</li>
<li>
<p>A dialog will appear showing the default configuration related to the template.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/28_Windows_2k9_Dialog.png" alt="28 Windows 2k9 Dialog">
</div>
</div>
</li>
<li>
<p>Press <strong>Customize VirtualMachine</strong> to specify the parameters to be used for the provisioning.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/29_Windows_2k9_Parameters.png" alt="29 Windows 2k9 Parameters">
</div>
</div>
</li>
<li>
<p>In this dialog:</p>
<div class="olist loweralpha">
<ol class="loweralpha" type="a">
<li>
<p>Specify the name <code>windows</code></p>
</li>
<li>
<p>Enable the checkbox <strong>Boot from CD</strong> and specify the url: <a href="http://192.168.123.100:81/Windows2019.iso" class="bare">http://192.168.123.100:81/Windows2019.iso</a></p>
</li>
</ol>
</div>
</li>
<li>
<p>Reduce the CD disk size to <strong>5 GiB</strong>.</p>
</li>
<li>
<p>Keep the <code>Disk source</code> size disk to the default value <strong>60 GiB</strong></p>
</li>
<li>
<p>Ensure the <code>Mount Windows drivers disk</code> is enabled. This is required to install Windows systems, which will provide the drivers for VirtIO.</p>
</li>
<li>
<p>Press <strong>Next</strong> after filling in the parameters.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/30_Windows_2k9_Parameters_Filled.png" alt="30 Windows 2k9 Parameters Filled">
</div>
</div>
</li>
<li>
<p>Switch to the <strong>Scripts</strong> tab and press <strong>Edit</strong> on the <code>Sysprep</code> section</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/30_Windows_2k9_Scripts.png" alt="30 Windows 2k9 Scripts">
</div>
</div>
</li>
<li>
<p>Fill the <code>autounattend.xml</code> form with the following code</p>
<div class="listingblock copy">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml"><?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Extend>true</Extend>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>System</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows Server 2019 SERVERSTANDARD</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Administrator</FullName>
<Organization>My Organization</Organization>
</UserData>
<EnableFirewall>false</EnableFirewall>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<AutoLogon>
<Password>
<Value>R3dh4t1!</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>999</LogonCount>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Description>Local Administrator Account</Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<TimeZone>Eastern Standard Time</TimeZone>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<AutoLogon>
<Password>
<Value>R3dh4t1!</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>999</LogonCount>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Description>Local Administrator Account</Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<TimeZone>Eastern Standard Time</TimeZone>
</component>
</settings>
</unattend></code></pre>
</div>
</div>
</li>
<li>
<p>Click <strong>Save</strong> on the dialog</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/30_Windows_2k9_Sysprep.png" alt="30 Windows 2k9 Sysprep">
</div>
</div>
</li>
<li>
<p>Press <strong>Create VirtualMachine</strong></p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/31_Windows_2k9_Create.png" alt="31 Windows 2k9 Create">
</div>
</div>
</li>
<li>
<p>The Virtual Machine will start the provisioning process by downloading the ISO image, configuring, and starting the instance.</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/32_Windows_2k9_Provisioning.png" alt="32 Windows 2k9 Provisioning">
</div>
</div>
</li>
<li>
<p>After a few minutes, the Virtual VM will be in <code>Running</code> status. Switch to the <strong>Console</strong> tab:</p>
<div class="imageblock">
<div class="content">
<img src="images/Create_VM_PVC/33_Windows_2k9_Console.png" alt="33 Windows 2k9 Console">
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
It is not necessary for this workshop to wait for the installation to complete. You can continue to the next module.
</td>
</tr>
</table>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<div class="title">Important</div>
</td>
<td class="content">
The VM is marked as "Not migratable" because a CD-ROM disk is attached.
</td>
</tr>
</table>
</div>
</li>
</ol>
</div>
</div>
</div>
<!-- Bottom Navigation -->
<div class="page-meta clearfix">
<input type="button" class="btn btn-lg btn-primary float-right" onclick="location.href='/workshop/07_bare_metal';" value="Continue" />
</div>
</section>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer">
</footer>
<!-- Javascript-->
<script src="js/workshop.js"></script>
<script src="js/workshop-asciidoc.js"></script>
</body>
</html>