- VMware vSphere 5.1 Cookbook
- Abhilash GB
- 268字
- 2021-08-13 16:56:35
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.
- Use the cmdlet
Connect-VIServer
to add the vCenter Server to the PowerCLI session.Connect-VIServer -Server vcenter51 -User Administrator -Password pass123
- Use the
Get-VMHost
cmdlet to fetch a list of ESX Servers inMaintenance
mode.Get-VMHost –State Maintenance
- Save the output of the
Get-VMHost
command to a user-defined variable.$esxhost = Get-VMHost -State Maintenance
- Use the
Apply-EsxImageProfile
cmdlet to apply the Image Profile to the ESX Servers.Apply-ESXImageProfile -ImageProfile "Profile001" -Entities $esxhost
- Check whether the ESX Server is compliant with the created profile.
Test-DeployRuleSetCompliance -VMHost $esxhost
- 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
- 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.
推薦閱讀
- Kubernetes修煉手冊(cè)
- Learning OpenDaylight
- Linux系統(tǒng)架構(gòu)與運(yùn)維實(shí)戰(zhàn)
- Linux Mint Essentials
- 嵌入式Linux系統(tǒng)開(kāi)發(fā):基于Yocto Project
- 混沌工程:復(fù)雜系統(tǒng)韌性實(shí)現(xiàn)之道
- Windows Phone應(yīng)用程序開(kāi)發(fā)
- 計(jì)算機(jī)系統(tǒng):基于x86+Linux平臺(tái)
- Kali Linux高級(jí)滲透測(cè)試
- Mastering Windows 8 C++ App Development
- Hadoop Real-World Solutions Cookbook
- OpenHarmony開(kāi)發(fā)與實(shí)踐:基于紅莓RK2206開(kāi)發(fā)板
- OpenStack Essentials(Second Edition)
- Azure Resource Manager Templates Quick Start Guide
- Learning IBM Watson Analytics