Hello,
I wrote this powercli script in order to update the HP Smart array P840 firmware and driver of my HP DL380 G9s. I am currently running ESXi 65U1 and vSAN 661.
I staged the files with another script so assume they are already on the hosts chomod'd and unzipped.
The VIB installation works just fine but when this part of the code runs I get an error stating: "unable to create scratch directory"
$cmd1 = @'
'/tmp/CP032780.vmexe --rewrite --force --silent --log-dir=/tmp'
'@
I also tried to stage the files in a datastore as opposed to root with the same message being returned:
$cmd1 = @'
'/vmfs/volumes/datastore1 (5)/files/CP032780/CP032780.vmexe' --inventory --log-dir=/tmp
'@
This is the command output. The ./_hp_scexe_info does not exist anywhere. I'm presuming the command can't write to either /tmp or /vmfs/...
Here is a detailed ls of both directories.
permissions for the exe
-rwxr-xr-x 1 root root 27408 Jan 30 19:25 CP032780.vmexe
-rw-r--r-- 1 root root 12460831 Jan 30 19:25 CP032780.vmfile
-rw-r--r-- 1 root root 370802 Jan 30 19:25 CP032780.xml
I forgot to mention that either command works in an SSH session.
You can see the entire script here, in my github page.
https://github.com/Coolguydoesnotlookatexplosions/vmware-utils/blob/master/Executeremotecommands.ps1
LucD tagging as i have seen him post some on plink.
For me your plink.exe calls look ok.
I suspect there might be an issue with this CP032780.vmexe
Do you get the same error when you run that from a SSH session to the ESXi node?
Another idea, leave of the -silent switch when passing the line to plink.exe.
Perhaps that will give more clues on what goes wrong.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No, I don't get the same issue in an SSH session, it works. I'm wondering if it's a linux thing or how the shell runs it.
Have you tried using screen or how about doing an echo <command> instead of executing the command?
Did you try with leaving out the -silent option on the command via plink.exe?
It might prompt, but we would see what the command is looking for.
Not sure I get what you mean with the 'echo'?
Unfortunately I don't have any HP hardware where I could test myself.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference