Set-VMHostFirmware issues

Guys,

Trying to restore the configuration of a host getting this error.....

PS H:\> Set-VMHostFirmware -Restore -SourcePath C:\temp\backup\configBundle-Computername.tgz -force
Set-VMHostFirmware : 04/09/2018 10:56:35      Set-VMHostFirmware            Response status code does not indicate success: 401 (Unauthorized).      
At line:1 char:1
+ Set-VMHostFirmware -Restore -SourcePath C:\temp\backup\configBundle-U ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VMHostFirmware], ViError
    + FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_UploadHostFirmware_UploadFailed,VMware.VimAutomation.ViCore.Cmdle
   ts.Commands.Host.SetVMHostFirmware
 
I've also changed the host name of the new box I'm restoring too, also, when I try the restore..... Wait, If i have a different Root password on the new host than that which is on the source host. Would that cause my restore to fail? Because when I restore it looks like it'll be successful and then goes wrong.

Thanks

Alex

P.S We taking bets if Mr Hancock comes? :-)  He's always on the ball :D
LVL 17
Alex Green3rd Line Server SupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alex Green3rd Line Server SupportAuthor Commented:
Oh I have dropped it into maintenance mode as well
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Are you using the command...

Set-VMHostFirmware -VMHost 10.0.0.1 -Restore -SourcePath c:\bundleToRestore.tgz -HostUser root -HostPassword exampleRootPassword

Open in new window


You need to use the current password for the host you are accessing....,....

Have you tried using  vSphere CLI ?
0
Alex Green3rd Line Server SupportAuthor Commented:
I'm doing it in power CLi, is that different? I got it from VMware's website and just ran the code to install the CMDLets

I'm doing everything but the username and password, I'll try that now,
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, many ways to backup and restore...

PowerCLI is one method...

vSphere CLI is another...

https://kb.vmware.com/s/article/2042141

There is also a GUI by Slymsoft, which will backup automatically, but you will need to restore manually.

http://slymsoft.com/esxi-conf-backup/
0
Alex Green3rd Line Server SupportAuthor Commented:
OK so I'm doing that code now and I get

Set-VMHostFirmware : 04/09/2018 11:30:31      Set-VMHostFirmware            A general system error occurred: Internal error      
At line:1 char:1
+ Set-VMHostFirmware -VMHost 10.0.0.1 -Restore -SourcePath C:\temp\bac ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VMHostFirmware], SystemError
    + FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_RestoreVmHostFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets
   .Commands.Host.SetVMHostFirmware
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
what version of PowerCLI is this, and what host version/build are you using ?
0
Alex Green3rd Line Server SupportAuthor Commented:
VMware.Vim                      6.7.0.9288211
VMware.VimAutomation.Cis.Core   10.1.0.8377811
VMware.VimAutomation.Common     10.1.0.8342134
VMware.VimAutomation.Core       10.1.0.8344055
VMware.VimAutomation.Sdk        10.1.0.8342078

And it's on VMware-ESXi-6.5.0-5310538-HPE-650.10.1.0.47-Jul2017
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I've seen this issue before, it could be to do with either Power CLI version mismatch between Host version and PowerCLI, or Scratch location which is often a problem with HPE versions.

the scratch location is used, to receive the config, before writing to the destination.

it may be worth checking scratch locations, do you know how to do this ?
0
Alex Green3rd Line Server SupportAuthor Commented:
Iv'e checked the scratch location and there is a downloads folder for creating the backup, but I don't know if I need another folder for restoring.
0
Alex Green3rd Line Server SupportAuthor Commented:
OK so

PS C:\WINDOWS\system32> Set-VMHostFirmware -VMHost 10.1.9.27 -Restore -Force -SourcePath C:\temp\Backup\configBundle-UKTVMWL04P.tgz -HostUser Root -HostPassword "Password"
Set-VMHostFirmware : 04/09/2018 13:24:20        Set-VMHostFirmware              Response status code does not indicate success: 401 (Unauthorized).
At line:1 char:1
+ Set-VMHostFirmware -VMHost 10.1.9.27 -Restore -Force -SourcePath C:\t ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VMHostFirmware], ViError
    + FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_UploadHostFirmware_UploadFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostFirmware
0
Alex Green3rd Line Server SupportAuthor Commented:
I'm restoring this onto new metal as well, I can't see why this won't work.... So I've taken a config from one host in an HA cluster and i'm trying to restore it to a test server. If that's relevant.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Try vSphere CLI, this is a common issue with Power CLI, if vSphere CLI commands also fail, there is a host config issue.

Same models of hardware and ESXi version ?
0
Alex Green3rd Line Server SupportAuthor Commented:
Andrew, I don't suppose you've written a guide for this have you?
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
It's very easy...

Download and install vSphere CLI

https://code.vmware.com/tool/vsphere-cli/6.5

and then execute

vicfg-cfgbackup
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alex Green3rd Line Server SupportAuthor Commented:
Thank you as always Andrew, consistently a pleasure learning from you :D
1
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
No problems, glad to be of assistance. Have a good day.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.