官术网_书友最值得收藏!

Applying an Image Profile to the host

The whole purpose of creating an Image Profile is to assign it to a host and apply it. This is particularly useful when performing upgrades or driver updates on Auto Deployed ESX Servers.

How to do it…

The following procedure will guide you through the steps required to assign and apply an Image Profile to an ESX Server.

  1. Use the cmdlet Connect-VIServer to add the vCenter Server to the PowerCLI session.
    Connect-VIServer -Server vcenter51 -User Administrator -Password pass123
    
  2. Use the Get-VMHost cmdlet to fetch a list of ESX Servers in Maintenance mode.
    Get-VMHost –State Maintenance
    
  3. Save the output of the Get-VMHost command to a user-defined variable.
    $esxhost = Get-VMHost -State Maintenance
    
  4. Use the Apply-EsxImageProfile cmdlet to apply the Image Profile to the ESX Servers.
    Apply-ESXImageProfile -ImageProfile "Profile001" -Entities $esxhost
    
  5. Check whether the ESX Server is compliant with the created profile.
    Test-DeployRuleSetCompliance -VMHost $esxhost
    
  6. Assign the compliance test output to a user-defined variable and then use that to do the repair (remediate) operation.
    $compliance_result = Test-DeployRuleSetCompliance -VMHost $esxhost
    
  7. Use the cmdlet Repair-DeployRuleSetCompliance to remediate the ESXi server.
    Repair-DeployRuleSetCompliance $compliance_result[0]
    

How it works…

Applying an Image Profile to an ESXi host is a method to update software changes, such as a driver update. The hosts need to be in 'maintenance mode' for this to be done. Although the host is checked for compliance and remediated, the software change (for example, the inclusion of a newer device driver version) is not immediately seen by the ESXi host. The ESXi host will start using the updated image only during its next reboot.

主站蜘蛛池模板: 迁西县| 德兴市| 尼勒克县| 商洛市| 边坝县| 屯昌县| 德保县| 花垣县| 缙云县| 玉屏| 洱源县| 鄂州市| 绍兴市| 留坝县| 凌源市| 永宁县| 临朐县| 临洮县| 凭祥市| 泾川县| 西乌珠穆沁旗| 偏关县| 宾阳县| 西安市| 云和县| 金乡县| 淳化县| 托克托县| 安化县| 汝州市| 五莲县| 嵊州市| 左权县| 文水县| 遵化市| 收藏| 沙河市| 盖州市| 大城县| 航空| 陆良县|