I am trying out PowerCLI for the first time.
I did a backup and trying to restore it, but I get the error which looks to be something with the Source?
Any ideas if i missed something?
thanks
PowerCLI C:\> Set-VMHostFirmware -VMHost 192.168.70.10 -Restore -SourcePath c:\ESXi-Backup\configBundle.tgz –HostUser root -HostPassword ********* -Force
Set-VMHostFirmware : 6/4/2019 9:25:32 AM Set-VMHostFirmware A general system error occurred: Internal error
At line:1 char:1
+ Set-VMHostFirmware -VMHost 192.168.70.10-Restore -SourcePath c:\ES ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostFirmware], SystemError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_RestoreVmHostFirmware_ViError,VMware.VimAutomation
.ViCore.Cmdlets.Commands.Host.SetVMHostFirmware
VMHost UploadUrl
------ ---------
How did you make the backup? With the Set-VMHostFirmware or the Get-VMHostFirmware cmdlet?
Did you follow the steps in KB2042141?
Which PowerCLI version are you using?
Do a
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I used Get-VMHostFirmware
PowerCLI 6.5 Release 1 build 4624819
ESXi 6.7
Can you try upgrading to the latest version 11.2.0?
That is done from the PowerShell Gallery, see also Updating PowerCLI through the PowerShell Gallery
Just to make sure the backup and the target ESXi are the same version and build?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am not sure I follow..
I am running PowerCLI from my Windows 10 system.
The target ESXi 6.7 is at Build 13006603
The source ESXi 6.7 is at Build 8941472
I used the -Force parameter to make sure the restore would work.
Are you saying to update to 11.0 on my Windows 10 system?
Yes, it is always a good practice to go for the more recent versions of PowerCLI (in this case the latest is 11.2.0).
Your 6.5R1 is a rather old version, and you're missing out on several bug fixes.
The KB I mentioned explicitly mentions that version and build of the source and target ESXi should be the same.
You mention they are different builds, that could explain the issue.
I'm not sure if the Force switch overrides the note of the KB.
You could test by using a backup/restore between ESXi nodes of the same version and build.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks
I will have to do some testing as you suggest between the same versions.
...i do see the KB note about Builds ( When restoring configuration data, the build number of the host must match the build number of the host on backup file)
you would think a different error would be thrown like (invalid backup file for target: target is not running same build version)
on another note, do you know of any solutions that would convert an single ESXi Server to a VM?
You could try any of the other methods mentioned in the KB, that way we're sure it's not a PowerCLI feature.
I don't think the VMware Converter (aka P2V) allows converting a physical ESXi node into a VM.
And I'm afraid I don't know any other package that would allow you to do that.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I tried version PowerCLI 11.0,,and get the below..
Next may be to try to restore to the same ESXi 7.7 version?
PS C:\Windows\system32> Set-VMHostFirmware -VMHost 128.244.170.100 -Restore -Force -SourcePath c:\ESXi-Backup\configBundle-192.168.10.12.tgz
Set-VMHostFirmware : 6/11/2019 2:46:16 PM Set-VMHostFirmware A general system error occurred: Internal error
At line:1 char:1
+ Set-VMHostFirmware -VMHost 192.168.10.20 -Restore -Force -SourcePat ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostFirmware], SystemError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_RestoreVmHostFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostFirmware
ESXi 7.7? You're on a beta? :smileygrin:
Seriously though, yes, I think would be the best course of action as a next step.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Back to the Future - ESXi 7.7 -- yr 2028 - Doc and Marty came and picked me up in their new time machine Uber:smileylaugh:
I was able to restore the backup image to a VM.
I had to build the VM as nested on the ESXi Host and install the same build as the physicla ESXi Server.
The ESXi VM has a different IP than the backup made from the physical server.
I issued the below command and I get the below message in red, but I see the ESXi VM reboots and comes back with the IP of the backup (physical ESXi Server) instead of 192.168.70.10.
So, it appears to have worked, except for the red ?
What information is in the backup that was restored?
Is there a doc that describes what is in the backup and what files / folders to check on the ESXi Host ?
PowerCLI C:\>Set-VMHostFirmware -VMHost 192.168.70.10 -Restore -SourcePath c:\ESXi-Backup\configBundle.tgz –HostUser root -HostPassword ********* -Force
Set-VMHostFirmware : 6/14/2019 1:56:28 PM Set-VMHostFirmware The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
At line:1 char:1
+ Set-VMHostFirmware -VMHost 192.168.70.10 -Restore -SourcePath C:\ESX- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostFirmware], ViError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_RestoreVmHostFirmware_ViError,VMware.VimAutomation.
ViCore.Cmdlets.Commands.Host.SetVMHostFirmware
VMHost UploadUrl
------ ---------
192.168.70.10 http://192.168.70.10/tmp/configBundle.tgz
Could be a timeout of some kind.
Might not have restored everything.
And no, I don't know of any list to check. But you could extract the backup archive.
Did you try eliminating the default timeout of 5 minutes with
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i did not try the Set-PowerCLIConfiguration -WebOperationTimeoutSeconds 0 -Confirm:$false
I will restore from my snap and try ,,,
I tried the command as listed and get back
Set-PowerCLIConfiguration : Cannot bind parameter ‘WebOperationTimeoutSeconds’ to target. Exception setting “WebOperationTimeoutSeconds”: 0 is not a valid timeout value. Please, specify a positive value or (in case you want to specify an infinite timeout,) a negative value
Ok, then try a higher value than the default (which is 300)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i tried 30 and issued the command and the host immediately rebooted with the restored ESXi Server IP.. still see the same error below when I issued the command
Set-VMHostFirmware : 6/14/2019 1:56:28 PM Set-VMHostFirmware The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
At line:1 char:1
+ Set-VMHostFirmware -VMHost 192.168.70.10 -Restore -SourcePath C:\ESX- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostFirmware], ViError
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_RestoreVmHostFirmware_ViError,VMware.VimAutomation.
ViCore.Cmdlets.Commands.Host.SetVMHostFirmware
Can you also try with a higher than the default value, let's say 600.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I tried a -1 for time (based on the below documentation)
WebOperationTimeoutSeconds
Defines the timeout for web operations.
The default value is 300 sec.
To specify an infinite operation timeout, pass a negative integer to this parameter.
The same thing happened .
As soon as i hit return, the command executes and the VM that is getting restored reboots and comes up with the IP address of up backed up ESXi Server.
I get the error ....
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
Once it was restored, I could not ping or login to the VM via the Web Client.
I had to login to the restored VM console and select "Restore Network Settings" to defaults.
I then set the IP address to the correct IP and then could login
So, it looks like it still may not have been fully recovered ?
Next thing to try would be a network trace, but that is rather advanced.
You could also open a SR, but I don't think nested ESXi are supported.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
With the current restored backup that was just restored to the VM, if i SSh in, what can i check to see if the restore worked?
I am wondering if trying a backup / restore on nested VMs would work?