For a deployment using NSX we are using the Agent VM settings on our ESXi host. I tried to find how to set these values via powercli, but I can't find them anywhere.
Could someone show me where I can change the Agent VM settings on the host via powercli?
Try like this
$esxName = 'MyEsx'
$dsName = 'ds1'
$netName = 'netpg'
$esx = Get-VMHost -Name $esxName
$agMgr = Get-View -Id $esx.ExtensionData.ConfigManager.EsxAgentHostManager
$agent = New-Object VMware.Vim.HostEsxAgentHostManagerConfigInfo
$agent.AgentVmDatastore = (Get-Datastore -Name $dsName).ExtensionData.MoRef
$agent.AgentVmNetwork = $esx.ExtensionData.Network | where{(Get-View -Id $_).Name -eq $netName}
$agMgr.EsxAgentHostManagerUpdateConfig($agent)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Which Agent VM Settings do you mean?
Could you perhaps include a screenshot?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This is a setting where you can specify a datastore and network that the installation of vm agents can use to put there appliances on.
Try like this
$esxName = 'MyEsx'
$dsName = 'ds1'
$netName = 'netpg'
$esx = Get-VMHost -Name $esxName
$agMgr = Get-View -Id $esx.ExtensionData.ConfigManager.EsxAgentHostManager
$agent = New-Object VMware.Vim.HostEsxAgentHostManagerConfigInfo
$agent.AgentVmDatastore = (Get-Datastore -Name $dsName).ExtensionData.MoRef
$agent.AgentVmNetwork = $esx.ExtensionData.Network | where{(Get-View -Id $_).Name -eq $netName}
$agMgr.EsxAgentHostManagerUpdateConfig($agent)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This worked like a charm. Thanks!