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

Reprovision a Host with a New Image Profile, Using vSphere ESXi Image Builder CLI

Page 179 highlights

Chapter 7 Installing ESXi 2 Place the host in maintenance mode. Host Type Host is part of a DRS cluster Host is not part of a DRS cluster Action VMware DRS migrates virtual machines to appropriate hosts when you place the host in maintenance mode. You must migrate all virtual machines to different hosts and place each host in maintenance mode. 3 Reboot the host. The host shuts down. When the host reboots, it uses the image profile that the Auto Deploy server provides. The Auto Deploy server also applies the host profile stored on the vCenter Server system. Reprovision a Host with a New Image Profile You can reprovision the host with a new image profile, host profile, or vCenter Server location by changing the rule for the host and performing a test and repair compliance operation. Several options for reprovisioning hosts exist. n If the VIBs that you want to use support live update, you can use an esxcli software vib command. In that case, you must also update the rule set to use an image profile that includes the new VIBs. n During testing, you can apply an image profile to an individual host with the Apply-EsxImageProfile cmdlet and reboot the host so the change takes effect. The Apply-EsxImageProfile cmdlet updates the association between the host and the image profile but does not install VIBs on the host. n In all other cases, use this procedure. Prerequisites n Create the image profile you want to boot the host with. Use the Image Builder PowerCLI, discussed in "Using vSphere ESXi Image Builder CLI," on page 225. n Make sure that the setup that you performed during the first boot operation is in place. Procedure 1 At the PowerShell prompt, run the Connect-VIServer PowerCLI cmdlet to connect to the vCenter Server system that Auto Deploy is registered with. Connect-VIServer myVCServer The cmdlet might return a server certificate warning. In a production environment, make sure no server certificate warnings result. In a development environment, you can ignore the warning. 2 Determine the location of a public software depot that contains the image profile that you want to use, or define a custom image profile with the Image Builder PowerCLI. 3 Run Add-EsxSoftwareDepot to add the software depot that contains the image profile to the PowerCLI session. Depot Type Remote depot ZIP file Cmdlet Run Add-EsxSoftwareDepot depot_url. a Download the ZIP file to a local file path or create a mount point local to the PowerCLI machine. b Run Add-EsxSoftwareDepot C:\file_path\my_offline_depot.zip. 4 Run Get-EsxImageProfile to see a list of image profiles, and decide which profile you want to use. VMware, Inc. 179

  • 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

2
Place the host in maintenance mode.
Host Type
Action
Host is part of a DRS cluster
VMware DRS migrates virtual machines to appropriate hosts when you
place the host in maintenance mode.
Host is not part of a DRS cluster
You must migrate all virtual machines to different hosts and place each
host in maintenance mode.
3
Reboot the host.
The host shuts down. When the host reboots, it uses the image profile that the Auto Deploy server provides.
The Auto Deploy server also applies the host profile stored on the vCenter Server system.
Reprovision a Host with a New Image Profile
You can reprovision the host with a new image profile, host profile, or vCenter Server location by changing
the rule for the host and performing a test and repair compliance operation.
Several options for reprovisioning hosts exist.
n
If the VIBs that you want to use support live update, you can use an
esxcli software vib
command. In
that case, you must also update the rule set to use an image profile that includes the new VIBs.
n
During testing, you can apply an image profile to an individual host with the
Apply-EsxImageProfile
cmdlet and reboot the host so the change takes effect. The
Apply-EsxImageProfile
cmdlet updates the
association between the host and the image profile but does not install VIBs on the host.
n
In all other cases, use this procedure.
Prerequisites
n
Create the image profile you want to boot the host with. Use the Image Builder PowerCLI, discussed in
“Using vSphere ESXi Image Builder CLI,”
on page 225.
n
Make sure that the setup that you performed during the first boot operation is in place.
Procedure
1
At the PowerShell prompt, run the
Connect-VIServer
PowerCLI cmdlet to connect to the vCenter Server
system that Auto Deploy is registered with.
Connect-VIServer myVCServer
The cmdlet might return a server certificate warning. In a production environment, make sure no server
certificate warnings result. In a development environment, you can ignore the warning.
2
Determine the location of a public software depot that contains the image profile that you want to use,
or define a custom image profile with the Image Builder PowerCLI.
3
Run
Add-EsxSoftwareDepot
to add the software depot that contains the image profile to the PowerCLI
session.
Depot Type
Cmdlet
Remote depot
Run
Add-EsxSoftwareDepot
depot_url
.
ZIP file
a
Download the ZIP file to a local file path or create a mount point local
to the PowerCLI machine.
b
Run
Add-EsxSoftwareDepot C:\
file_path\my_offline_depot
.zip
.
4
Run
Get-EsxImageProfile
to see a list of image profiles, and decide which profile you want to use.
Chapter 7 Installing ESXi
VMware, Inc.
179