Hello.
we are trying to back up the host configuration of our ESXi hosts following
https://kb.vmware.com/s/article/2042141
We have ESXi 6.5U3 and 6.7U3 hosts in a vCenter Server Appliance 6.7.0.52000. No errors in vCenter, all ESXi hosts and VM's are green/connected/ok.
For us it is not working to use ESXi Command Line because the webpage is showing "time out" when trying download the file from http://<IP-of-our-ESXi-host>/downloads/123456/configBundle-<IP-of-our-ESXi-host>.tgz.
We connected to the ESXi host using WinSCP, but the .tgz file is not to find. Also folder /downloads is not to find on that ESXi host.
That's why we were trying the next tool mentioned in the article: vSphere CLI. But also this is failing:
C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup --server=<IP-of-our-ESXi-host> --username=root -s configBundle-passau.tgz
'vicfg-cfgbackup' is not recognized as an internal or external command,
operable program or batch file.
Also trying the third tool - vSphere PowerCLI (running on same Windows 10 client like vSphere CLI with access to vCenter and the ESXi hosts). But when running the commands in PowerCLI (as Administrator) after connecting to vCenter this is the result:
PS C:\WINDOWS\system32> Get-VMHostFirmware -VMHost <IP-of-our-ESXi-host> -BackupConfiguration -DestinationPath C:\temp\VMware
Get-VMHostFirmware : 01.03.2022 09:28:14 Get-VMHostFirmware An error occurred while sending the request.
At line:1 char:1
+ Get-VMHostFirmware -VMHost <IP-of-our-ESXi-host> -BackupConfiguration -Dest ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], ViError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHostFirmware_DownloadError,VMware.VimAutomation.ViCore.Cmdlets.
Commands.Host.GetVMHostFirmware
Running Get-VMhost shows all our ESXi hosts (also <IP-of-our-ESXi-host>). So PowerCLI does not seem to be the reason.
We disabled the firewall of the ESXi hosts (esxcli network firewall set --enabled false), but this was not helping, same errors.
Any suggestions?
Found the solution here:
https://pradeeppapnai.wordpress.com/2019/09/14/esxi-backup-fails/
vSphere web access has been ok:
PS C:\WINDOWS\system32> Get-VMHostFirewallException -VMHost <IP-ESXi-host> -Name 'vSphere Web access'
Name Enabled IncomingPorts OutgoingPorts Protocols ServiceRunning
---- ------- ------------- ------------- --------- --------------
vSphere Web Access True 80 TCP
but checking showed:
PS C:\WINDOWS\system32> Test-NetConnection -Port 80 -ComputerName <IP-ESXi-host>
WARNING: TCP connect to (<IP-ESXi-host> : 80) failed
ComputerName : <IP-ESXi-host>
RemoteAddress : <IP-ESXi-host>
RemotePort : 80
InterfaceAlias : Ethernet 2
SourceAddress : xxx.xxx.xxx.xxx
PingSucceeded : True
PingReplyDetails (RTT) : 3 ms
TcpTestSucceeded : False
First after adding SourceAddress xxx.xxx.xxx.xxx in the firewall under 'vSphere Web access' (using vCenter) it worked with ESXi CLI. (using PowerCLI and vSphere CLI it is still not working)
Ciao
Check this post and try the solution for use the PowerCli command:
Solved: Can not backup ESXi - VMware Technology Network VMTN
Thank you fabio1975, but unfortunately the last command is not working:
PS C:\WINDOWS\system32> Install-Module -Name VMware.PowerCLI
PS C:\WINDOWS\system32> Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false
Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout
Seconds
----- ----------- ------------------- ------------------------ -------------------------- -------------------
Session UseSystemProxy Single Ignore True 300
User Single Ignore
AllUsers
PS C:\WINDOWS\system32> Connect-VIServer <IP-vCenter>
Name Port User
---- ---- ----
<IP-vCenter> 443 VSPHERE.LOCAL\Administrator
PS C:\WINDOWS\system32> Get-VMHostFirmware -VMHost <IP-ESXi-host> -BackupConfiguration -DestinationPath C:\temp
Get-VMHostFirmware : 01.03.2022 11:09:49 Get-VMHostFirmware An error occurred while sending the request.
At line:1 char:1
+ Get-VMHostFirmware -VMHost <IP-ESXi-host> -BackupConfiguration -Dest ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], ViError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHostFirmware_DownloadError,VMware.VimAutomation.V
iCore.Cmdlets.Commands.Host.GetVMHostFirmware
PS C:\WINDOWS\system32>
This is the version of PowerCLI:
PS C:\WINDOWS\system32> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.0.0.0 ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-PackagePro...
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapabilit...
Script 7.0.3.1... VMware.Vim
Script 12.5.0.... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 12.5.0.... VMware.VimAutomation.Common {Get-PowerCLIContext, Get-Task, New-OAuthSecurityContext, Stop-T...
Script 12.5.0.... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter,...
Script 12.5.0.... VMware.VimAutomation.Sdk {Get-ErrorReport, EnableParameterCompleters, Get-InstallPath, Ge...
Found the solution here:
https://pradeeppapnai.wordpress.com/2019/09/14/esxi-backup-fails/
vSphere web access has been ok:
PS C:\WINDOWS\system32> Get-VMHostFirewallException -VMHost <IP-ESXi-host> -Name 'vSphere Web access'
Name Enabled IncomingPorts OutgoingPorts Protocols ServiceRunning
---- ------- ------------- ------------- --------- --------------
vSphere Web Access True 80 TCP
but checking showed:
PS C:\WINDOWS\system32> Test-NetConnection -Port 80 -ComputerName <IP-ESXi-host>
WARNING: TCP connect to (<IP-ESXi-host> : 80) failed
ComputerName : <IP-ESXi-host>
RemoteAddress : <IP-ESXi-host>
RemotePort : 80
InterfaceAlias : Ethernet 2
SourceAddress : xxx.xxx.xxx.xxx
PingSucceeded : True
PingReplyDetails (RTT) : 3 ms
TcpTestSucceeded : False
First after adding SourceAddress xxx.xxx.xxx.xxx in the firewall under 'vSphere Web access' (using vCenter) it worked with ESXi CLI. (using PowerCLI and vSphere CLI it is still not working)