Quantcast
Channel: VMware Communities : Discussion List - Automation Tools
Viewing all articles
Browse latest Browse all 9071

invoke-vmscript vmwarte tools upgrade on linux

$
0
0

trying to get an automated way to patch linux guests

 

$cmd1 = get-vm testlinux | Mount-Tools

start-sleep 5

$script1 = "mkdir -p /mnt/cdrom && mount /dev/cdrom /mnt/cdrom && cp -f /mnt/cdrom/*.gz /tmp && tar -xzvf /tmp/*.gz -C /tmp/"

$script2 = "cd /tmp/vmware-tools-distrib && ./vmware-install-pl -d default"

$cmd2 = invoke-vmscript -VM testlinux -ScriptText $script1 -Guestuser "root" -GuestPassword "xxxxxxx"

start-sleep 10

$cmd3 = invoke-vmscript -VM testlinux -ScriptText $script2 -Guestuser "root" -GuestPassword "xxxxxxx"

 

 

I can get $script1 working but not $script2. I tried combining them and tools do not get installed.

 

however after $script1 runs. If I run $script2 manually. it works  fine

 

even though i get this error

 

Screen Shot 2017-09-10 at 11.23.44 AM.png

 

any idea?


Viewing all articles
Browse latest Browse all 9071

Latest Images

Trending Articles



Latest Images

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