VMware VS4-ENT-PL-A Setup Guide - Page 243

Creating Image Profiles by Cloning Workflow, Example: Depot Content Examination Using Variables - 5 5 release date

Page 243 highlights

Chapter 7 Installing ESXi 4 Use -Newest to find the newest package. n Get-EsxSoftwarePackage -Vendor "V*" -Newest Returns the newest package for the vendors starting with V and displays the information as a table. n Get-EsxSoftwarePackage -Vendor "V*" -Newest | format-list Pipes the output of the request for software packages to the PowerShell format-list cmdlet and displays detailed information about each software package. 5 Display the list of VIBs in the image profile. (Get-EsxImageProfile -Name "Robin's Profile").VibList VibList is a property of the ImageProfile object. See "Structure of ImageProfile, SoftwarePackage, and ImageProfileDiff Objects," on page 230. 6 Retrieve software packages released before or after a certain date by using the CreatedBefore or CreatedAfter parameter. Get-EsxSoftwarePackage -CreatedAfter 7/1/2010 Example: Depot Content Examination Using Variables This example workflow examines depot contents by passing in parameters as objects, accessed by position in a variable, instead of passing in parameters by name. You can run the following commands in sequence from the PowerCLI prompt. Replace names with names that are appropriate in your installation. Get-EsxSoftwarePackage -Vendor "V*" Get-EsxSoftwarePackage -Vendor "V*" -Name "r*" Get-EsxSoftwarePackage -Version "2.0*" $ip1 = Get-EsxImageProfile -name ESX-5.0.0-123456-full $ip1.VibList Get-EsxSoftwarePackage -CreatedAfter 7/1/2010 Creating Image Profiles by Cloning Workflow You can use Image Builder cmdlets to check which depots are available, to add a depot, to display image profile information, and to create a new image profile by cloning one of the available image profiles. Before you use the cmdlets in this workflow, make sure your environment meets the following requirements. n VMware PowerCLI and prerequisite is software installed. See "Install Image Builder PowerCLI and Prerequisite Software," on page 233. n If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See "Using Image Builder Cmdlets," on page 234. Published profiles are usually read only and cannot be modified. Even if a published profile is not read only, cloning instead of modifying the profile is a best practice, because modifying the original profile erases the original. You cannot revert to the original, unmodified profile except by reconnecting to a depot. A profile cloning workflow might include checking the current state of the system, adding a software depot, and cloning the profile. 1 In a PowerShell window, check whether any software depots are defined for the current session. $DefaultSoftwareDepots PowerShell returns the currently defined depots, or nothing if you just started PowerShell. 2 If necessary, add the depot that includes the profile you want to clone to the current session. VMware, Inc. 243

  • 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

4
Use
-Newest
to find the newest package.
n
Get-EsxSoftwarePackage -Vendor "V*" -Newest
Returns the newest package for the vendors starting with V and displays the information as a table.
n
Get-EsxSoftwarePackage -Vendor "V*" -Newest | format-list
Pipes the output of the request for software packages to the PowerShell
format-list
cmdlet and
displays detailed information about each software package.
5
Display the list of VIBs in the image profile.
(Get-EsxImageProfile -Name "Robin's Profile").VibList
VibList
is a property of the
ImageProfile
object. See
“Structure of ImageProfile, SoftwarePackage, and
ImageProfileDiff Objects,”
on page 230.
6
Retrieve software packages released before or after a certain date by using the
CreatedBefore
or
CreatedAfter
parameter.
Get-EsxSoftwarePackage -CreatedAfter 7/1/2010
Example: Depot Content Examination Using Variables
This example workflow examines depot contents by passing in parameters as objects, accessed by position
in a variable, instead of passing in parameters by name. You can run the following commands in sequence
from the PowerCLI prompt. Replace names with names that are appropriate in your installation.
Get-EsxSoftwarePackage -Vendor "V*"
Get-EsxSoftwarePackage -Vendor "V*" -Name "r*"
Get-EsxSoftwarePackage -Version "2.0*"
$ip1 = Get-EsxImageProfile -name ESX-5.0.0-123456-full
$ip1.VibList
Get-EsxSoftwarePackage -CreatedAfter 7/1/2010
Creating Image Profiles by Cloning Workflow
You can use Image Builder cmdlets to check which depots are available, to add a depot, to display image
profile information, and to create a new image profile by cloning one of the available image profiles.
Before you use the cmdlets in this workflow, make sure your environment meets the following
requirements.
n
VMware PowerCLI and prerequisite is software installed. See
“Install Image Builder PowerCLI and
Prerequisite Software,”
on page 233.
n
If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See
“Using Image Builder Cmdlets,”
on page 234.
Published profiles are usually read only and cannot be modified. Even if a published profile is not read
only, cloning instead of modifying the profile is a best practice, because modifying the original profile erases
the original. You cannot revert to the original, unmodified profile except by reconnecting to a depot.
A profile cloning workflow might include checking the current state of the system, adding a software depot,
and cloning the profile.
1
In a PowerShell window, check whether any software depots are defined for the current session.
$DefaultSoftwareDepots
PowerShell returns the currently defined depots, or nothing if you just started PowerShell.
2
If necessary, add the depot that includes the profile you want to clone to the current session.
Chapter 7 Installing ESXi
VMware, Inc.
243