Hi,
I want to get a list of all vms which shows a configuration options and it's value. AND if there is a vm without that configuration I'd like to see these too.
Get-VM -name * | Get-AdvancedSetting | where {$_.Name -eq "monitor_control.enable_softResetClearTSC"} | Select Entity, Name, Value
The one-liner above works pretty fine, but only shows the machines which have this configuration present in the vmx file. But I miss the not configured vms.
How will I get them in the list too ?
Regards Wolfgang
Leave out the Where-clause, something like this
Get-VM |
Select Name,
@{N='monitor_control.enable_softResetClearTSC';E={
Get-AdvancedSetting -Entity $_ -Name monitor_control.enable_softResetClearTSC | Select -ExpandProperty Value}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Leave out the Where-clause, something like this
Get-VM |
Select Name,
@{N='monitor_control.enable_softResetClearTSC';E={
Get-AdvancedSetting -Entity $_ -Name monitor_control.enable_softResetClearTSC | Select -ExpandProperty Value}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
perfect ! Many thanks !
Is it safe to change such settings while a vm is running ? I never used PowerCli before for administration of vSphere.
I don't know for sure, but KB2092807 seems to assume the VM is powered off while you change the setting.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sorry my question was not pointed to the value mentioned in the example above.
I meant is it okay to change some settings in the vmx file with the powercli while the vm is running? It's okay when it does not take any effect for the moment. I only want to be sure that on next reboot the settings are present.
Or should changes only be done when a vm is powered off. Because if you use the GUI you are not able to change these while the machine is running.
There are settings that are overwritten in the VMX when you power off a VM.
So a best practice would be to do those changes while the VM is powered off.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OK that's good to know ! Many thanks for your quick help !
Regards Wolfgang