Last year I wrote a blog post about changing the COS memory. You can find the post here: https://ict-freak.nl/2008/11/26/vmware-service-console-memory/ (it’s written in Dutch). In that post there is already a one-liner made by LucD butt in this post you’ll get an extra one-liner to determine the COS memory value.
If you want to see how much memory is allocated for the Service Console run the next script:
Get-VMHost | Sort Name | Get-View | Select Name, ` @{N="Service Console Memory";E= {"" + ` [math]::round($_.Config.ConsoleReservation.ServiceConsoleReserved / 1MB, 0) + " MB "}}
Just add | Export-Csv -NoTypeInformation "D:\cosmem.csv" to export the data to a CSV file.
The output will look like this:
The script/one-liner:
Get-VMHost | Get-View | % { $_.Name | Where { $_.Config.ConsoleReservation.ServiceConsoleReserved -eq "314572800" } (Get-View -Id $_.ConfigManager.MemoryManager).ReconfigureServiceConsoleReservation(800*1mb) }
You can monitor the changes in vCenter:
More information about the maximum values can be found here: vsp_40_config_max.pdf.
The maximum value for the COS Memory is 800MB so that’s what the script will use to set the COS memory.
Note: You have to restart the server to apply the changes.