I can connect to a vCenter and fetch a log bundle for the vCenter itself:
> Connect-VIServer -Server vCenterFQDN -Credential (Get-Credential)
...
> Get-Log -Bundle -DestinationPath E:\Downloads\
VERBOSE: 7/11/2023 11:11:07 AM Get-Log Finished execution
Data
----
E:\Downloads\vcsupport-[guid].tgz
This works fine.
However, when I attempt to download a log bundle from an ESXi host, nothing happens.
> $vmHost = Get-VMHost esxiHostnameFQDN
> $vmHost | Get-Log -Bundle -DestinationPath E:\Downloads\
VERBOSE: 7/11/2023 11:32:35 AM Get-Log Finished execution
>
At which point, nothing happens. No error that I can see. No empty file created. No verbose lines indicating an issue or other information whatsoever. It just returns next prompt and doesn't do anything.
So while it is less than ideal, I decided I'd directly connect to the various ESXi hosts I want to get log bundles from and get the logs individually that way.
> Connect-VIServer -Server esxiHostnameFQDN -Credential (Get-Credential) # root
...
> Get-Log -Bundle -DestinationPath E:\Downloads\
VERBOSE: 7/11/2023 12:13:39 PM Get-Log Finished execution
Get-Log: 7/11/2023 12:13:41 PM Get-Log The operation for the entity "[esxiHostnameFQDN]" failed with the following message: "A general system error occurred: Internal error"
Get-Log: 7/11/2023 12:13:41 PM Get-Log 7/11/2023 12:13:41 PM Get-Log The operation for the entity "[esxiHostnameFQDN]" failed with the following message: "A general system error occurred: Internal error"
Well that's not a very helpful error message. And I'm kind of hitting a roadblock.
Perhaps something with permissions? I mean, I'm using an admin (though not administrator@vsphere.local) when connecting to the vCenter. And I'm connecting as root to the ESXi directly. So that doesn't feel like the problem.
I started feeling this might be something like firewall blocking needed ports or some issue with a self-signed certificate or something. However, if - from the same host I'm running the PSConsole - I hit the UI for the host (https://[esxiHostnameFQDN]/ui) I can download the log bundle through the /cgi-bin/vm-support.cgi endpoint. So I have the necessary ports open for https and whatever PowerCLI/Connect-VIServer uses to connect to the host. Plus, I'm neither getting any warnings about certificates when I hit that host via PowerCLI nor through the https UI.
So I'm at a bit of a loss and am trying to understand what might be going on here.
Any help would be appreciated.
EnvInfo:
> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware.PowerCLI 13.1.0 build 21624340
---------------
Component Versions
---------------
VMware Common PowerCLI Component 13.1 build 21605386
VMware Cis Core PowerCLI Component PowerCLI Component 13.1 build 21605976
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.1 build 21606170
> $global:DefaultVIServer | Select Version,Build
Version Build
------- -----
8.0.1 21860503
> $vmHost | Select Version,Build
Version Build
------- -----
8.0.1 21495797