Vmware Viruntime

Dec 06, 2021

Problem

I need to run VMware commands in Windows, but I can't change my script to run the Windows cmd shell. If you have any ideas that would work even though I'm using VMware commands via cygwin, they would be much appreciated. Here's a sample script where the command is explicit.

#!/bin/bash
# Paths for vmware-cmd.pl file to run vmware commands from vsphere cli
_vcli_dir="/cygdrive/c/Program Files (x86)/VMware/VMware vSphere CLI"
_vcli_bin="$_vcli_dir/bin"
_vcli_perl="$_vcli_dir/Perl"
_vcli_perl_bin="$_vcli_perl/bin"
_vcli_perl_lib="$_vcli_perl/lib"
_vcli_perl_vlib="$_vcli_perl_lib/VMware"
_vcmd=vmware-cmd.pl

export _orig_path=$PATH
# Add above directories to path variable
export PATH=$PATH:$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
echo $PATH

$_vcmd /?

export PATH=$_orig_path
echo $PATH

* I'm able to run the vmware-cmd.pl script from a DOS command prompt, but not from PowerShell.

c:> vmware-cm.pl

* I now that the installation is working. Any clue as to what could

Solution

Had the idea to fix it with this post, but I received a core dump when I executed my Perl script.

Can PERL5LIB affect the location of Perl modules? How does @INC get constructed?

#!/bin/bash
# Path for vmware-cmd.pl file to run vmware commands from vsphere cli
_vcli_dir="/cygdrive/c/Program Files (x86)/VMware/VMware vSphere CLI"
_vcli_bin="$_vcli_dir/bin"
_vcli_perl="$_vcli_dir/Perl"
_vcli_perl_bin="$_vcli_perl/bin"
_vcli_perl_lib="$_vcli_perl/lib"
_vcli_perl_vlib="$_vcli_perl_lib/VMware"
_vcmd=vmware-cmd.pl

export _orig_path=$PATH
# Add above directories to path variable
export PATH=$PATH:$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
export PERL5LIB=$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
echo $PATH

$_vcmd /?

export PATH=$_orig_path
echo $PATH
I am using Windows 8 and I'm not able...
I'm experiencing a problem with the mouse on my...
How do I set up a forwarding rule so...
I want to speed up the process of video...
here are the virtual machines I have running: ...
I'm trying to mount and explore a vmdk (vmware)...