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

Auto Deploy PowerCLI Cmdlet Overview, Set Up Host Profiles for Static IP

Page 165 highlights

Chapter 7 Installing ESXi 4 Use the New-DeployRule PowerCLI cmdlet to write a rule that assigns the image profile to one host, to multiple hosts specified by a pattern, or to all hosts. New-DeployRule -Name "testrule" -Item image-profile -AllHosts See "Assign an Image Profile to Hosts," on page 173. NOTE Auto Deploy is optimized for provisioning hosts that have a fixed MAC address to IP address mapping in DHCP (sometimes called DHCP reservations). If you want to use static IP addresses, you must set up the host profile to prompt for host customization. See "Set Up Host Profiles for Static IP Addresses in the vSphere Web Client," on page 194. 5 Turn on the host to have Auto Deploy provision the host with the specified image profile. 6 Set up the host you provisioned as a reference host for your host profile. You can specify the reference host syslog settings, firewall settings, storage, networking, and so on. See "Setting Up an Auto Deploy Reference Host," on page 187. 7 Create and export a host profile for the reference host. See the Host Profiles documentation. 8 To provision multiple hosts, you can use the Copy-DeployRule cmdlet. You can revise the rule to assign not only an image profile but also a host profile and a cluster location . Copy-DeployRule -DeployRule "testrule" -ReplaceItem my_host_profile_from_reference_host,my_targetcluster -ReplacePattern "ipv4=192.XXX.1.10-192.XXX.1.20" my_host_profile_from_reference_host is the name of the reference host profile. my_targetcluster is the name of the target cluster. 9 Turn on the hosts you want to provision. If the hosts that are specified by the pattern are not currently managed by a vCenter Server system, Auto Deploy provisions them with the already stored image profile and the specified host profile and adds them to the target cluster. 10 Check that the hosts you provisioned meet the following requirements. n Each host is connected to the vCenter Server system. n The hosts are not in maintenance mode. n The hosts have no compliance failures. n Each host with a host profile that requires user input has up-to-date host customization information. Remedy host customization and compliance problems and reboot hosts until all hosts meet the requirements. Read "Understanding vSphere Auto Deploy," on page 157 for an introduction to the boot process, a discussion of differences between first and subsequent boots, and an overview of using host customization. Auto Deploy PowerCLI Cmdlet Overview You specify the rules that assign image profiles and host profiles to hosts using a set of PowerCLI cmdlets that are included in VMware PowerCLI. If you are new to PowerCLI, read the PowerCLI documentation and review "Using Auto Deploy Cmdlets," on page 170. You can get help for any command at the PowerShell prompt. n Basic help: Get-Help cmdlet_name VMware, Inc. 165

  • 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 the
New-DeployRule
PowerCLI cmdlet to write a rule that assigns the image profile to one host, to
multiple hosts specified by a pattern, or to all hosts.
New-DeployRule -Name "testrule" -Item
image-profile
-AllHosts
See
“Assign an Image Profile to Hosts,”
on page 173.
N
OTE
Auto Deploy is optimized for provisioning hosts that have a fixed MAC address to IP address
mapping in DHCP (sometimes called DHCP reservations). If you want to use static IP addresses, you
must set up the host profile to prompt for host customization. See
“Set Up Host Profiles for Static IP
Addresses in the vSphere Web Client,”
on page 194.
5
Turn on the host to have Auto Deploy provision the host with the specified image profile.
6
Set up the host you provisioned as a reference host for your host profile.
You can specify the reference host syslog settings, firewall settings, storage, networking, and so on. See
“Setting Up an Auto Deploy Reference Host,”
on page 187.
7
Create and export a host profile for the reference host.
See the
Host Profiles
documentation.
8
To provision multiple hosts, you can use the
Copy-DeployRule
cmdlet.
You can revise the rule to assign not only an image profile but also a host profile and a cluster location .
Copy-DeployRule -DeployRule "testrule" -ReplaceItem
my_host_profile_from_reference_host
,
my_targetcluster
-ReplacePattern
"ipv4=192.XXX.1.10-192.XXX.1.20"
my_host_profile_from_reference_host
is the name of the reference host profile.
my_targetcluster
is the name
of the target cluster.
9
Turn on the hosts you want to provision.
If the hosts that are specified by the pattern are not currently managed by a vCenter Server system,
Auto Deploy provisions them with the already stored image profile and the specified host profile and
adds them to the target cluster.
10
Check that the hosts you provisioned meet the following requirements.
n
Each host is connected to the vCenter Server system.
n
The hosts are not in maintenance mode.
n
The hosts have no compliance failures.
n
Each host with a host profile that requires user input has up-to-date host customization
information.
Remedy host customization and compliance problems and reboot hosts until all hosts meet the
requirements.
Read
“Understanding vSphere Auto Deploy,”
on page 157 for an introduction to the boot process, a
discussion of differences between first and subsequent boots, and an overview of using host customization.
Auto Deploy PowerCLI Cmdlet Overview
You specify the rules that assign image profiles and host profiles to hosts using a set of PowerCLI cmdlets
that are included in VMware PowerCLI.
If you are new to PowerCLI, read the PowerCLI documentation and review
“Using Auto Deploy Cmdlets,”
on page 170. You can get help for any command at the PowerShell prompt.
n
Basic help:
Get-Help
cmdlet_name
Chapter 7 Installing ESXi
VMware, Inc.
165