Is there an easy way to get a copy of the vpxd log using power shell?
Sure is.
PS > Get-LogType | where-object { $_.key -match "vpxd" } Key Summary --- ------- vpxd:vpxd-0.log VirtualCenter server log in 'plain' format vpxd:vpxd-1.log VirtualCenter server log in 'plain' format vpxd:vpxd-2.log VirtualCenter server log in 'plain' format vpxd:vpxd-3.log VirtualCenter server log in 'plain' format vpxd:vpxd-4.log VirtualCenter server log in 'plain' format vpxd:vpxd-5.log VirtualCenter server log in 'plain' format vpxd:vpxd-6.log VirtualCenter server log in 'plain' format vpxd:vpxd-7.log VirtualCenter server log in 'plain' format vpxd:vpxd-8.log VirtualCenter server log in 'plain' format vpxd:vpxd-9.log VirtualCenter server log in 'plain' format vpxd:vpxd-index VirtualCenter server log in 'plain' format PS > $log = Get-Log -Key vpxd:vpxd-0.log PS > $log Entries ------- {Log for VMware VirtualCenter, pid=1636, version=2.5.0, build=build-104215, option=Release, s... PS > $log.Entries[http://1..10|http://1..10] -03 18:30:50.552 'StackTracer' 2880 info] [2880] Exit DRS_PROFILE CallingProposeActions (171 ms) [2009-01-03 18:30:50.552 'StackTracer' 2880 info] [2880] Exit DRS_PROFILE AskForDrmRecommendations (171 ms) [2009-01-03 18:30:50.552 'StackTracer' 2880 info] [2880] Exit DRS_PROFILE AskAndRefreshDrmRecommendations (171 ms) [2009-01-03 18:30:50.552 'App' 2880 info] [VpxLRO] -- FINISH task-internal-2487 -- -- AskRefreshDrmRecLro [2009-01-03 18:30:51.552 'App' 2956 info] [VpxLRO] -- BEGIN task-internal-2488 -- -- AskRefreshDrmRecLro [2009-01-03 18:30:51.552 'StackTracer' 2956 info] [2956] Enter DRS_PROFILE AskAndRefreshDrmRecommendations [2009-01-03 18:30:51.552 'StackTracer' 2956 info] [2956] Enter DRS_PROFILE VpxdDrmInstanceAllocator [2009-01-03 18:30:51.552 'StackTracer' 2956 info] [2956] Exit DRS_PROFILE VpxdDrmInstanceAllocator (0 ms) [2009-01-03 18:30:51.552 'StackTracer' 2956 info] [2956] Enter DRS_PROFILE AskForDrmRecommendations [2009-01-03 18:30:51.552 'StackTracer' 2956 info] [2956] Enter DRS_PROFILE VpxDrmRetrieveDomainConfigInfoLockAcq1 PS > $log | select-string "error"
[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org
Note that the Get-LogType and Get-Log cmdlets can access host server logs (e.g. vmkernel, hostd.log) only if you connect directly to the host server. Otherwise, you'll see only VC logs as in my example.
[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org
I believe that if you can still get logs from hosts if you only connect to the Virtual Center server. You just have to pass the host to the Get-Log* commands as a parameter or in the pipeline.
Connect-VIServer virtualcenter
then
$vmhost = (Get-VMHost)[0]
Get-LogType $vmhost
or
$vmhost | Get-LogType
You are right, the Get-Log bug was solved in the current build 113525.
The following works while connected to the VC.
Get-Log -Key vpxa -VMHost (Get-VMHost <ESX-name>)
The bug with the -Bundle parameter still exists.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference