Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 172599

Using plink.exe in Powershell script returns "Unable to create scratch directory"

$
0
0

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/...

Capture.PNG

Here is a detailed ls of both directories.

post 2.PNG

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.


Viewing all articles
Browse latest Browse all 172599

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>