|
I believe my problem was probably different than yours... (sorry for cluttering the thread). I traced this down to this scenario/issue: I am using the vmware-cmd.pl remote access feature. When I issue the command on the local ESX server the getstate works just fine. If I do it remotely it fails with the aforementioned error. What it comes down to is this code in vmware-cmd.pl (well... actually the functions that are being called): my $vm_cfg_path = generate_cfg_path($cmdarray[0]); my $vm_view; if (defined $vm_cfg_path) { $vm_view = get_vm($vm_cfg_path); } As the function name suggests, generate_cfg_path generates the path to the configuration. In the remote case, the get_vm call does not actually append the actual configuration file name (the one with the .vmx). I haven't looked into why that happens, but the function returns just the original path and then things fail. If I pass in the already resloved name as "Volume VM/12345/vmwconfig.vmx" then things work fine. Looks like a name lookup issue in vm_view, and a lack of testing this tool in remote mode. Another workaround would be to take the tail of the original cmdarray[0] (after the last /) and append that to $vm_view if it is identical to $vm_cfg_path. Thanks, Sven |
|
I assume you're passing in the fullpath to the .vmx to the command in either of these formats:
/vmfs/volumes/somedatastorename/my_vm.vmx
or
[somedatastorename] my_vm/my_vm.vmx
If that's the case, then it "should" function like version on the Service Console ========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |
|
Yes... I am passing the exact path in that is returned by vmware-cmd.pl. The exact same command works fine on the local esx server. In my case that would be the absolute file system path. One thing that may confuse thinks for vmware-cmd.pl (not sure... I haven't looked into the underlying code), is that the server is linux, while the client is windows. Nevertheless... using the already resolved name as "Volume blah/blah.vmx" works fine remotely, so something with the finding of the vmx file seems to be messed up. If you want me to run any debugging code I am happy to do that... Thanks, Sven |
|
I'm using VMware VIMA and the RCLI and it works fine:
Are you using the latest RCLI, on Windows or Linux? I would highly recommend VIMA to manage your hosts and automate scripted tasks/queries ========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |
|
VMware VIMA is a vApp (virtual appliance) by VMware, it's an alternative to the Service Console most of us are used to and eventually will replace the Service Console and remove the management console into a VM. This is primarily useful in when managing and automating tasks on ESXi which does not have a supported console.
VIMA basically provides the default RCLI utilities along with VI Perl Toolkit and some neat features such as VI-Fastpass and vilogger which only comes with VMware VIMA. For some high level information you can check out: http://engineering.ucsb.edu/~duonglt/vmware/#vmware_vima It's a great tool and free download to help manage your ESX/ESXi host and virtual machines. ========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |
|
Just make sure you're running the latest VI Perl Toolkit which is 1.6 which is the same version that's installed by default on the VIMA.
========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |
|
Are you using the RCLI for Windows or for Linux? The command itself should work on RCLI for Linux and I've demonstrated on VIMA as well. It could be a bug or known issue if you're running it on Windows. You can always open an SR to VMware to see if that is the case
========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |
|
You can try to either post in the VI API forum, there are some engineers that might be able to help or you can create an SR w/VMware if you have a support contract.
In terms of rsxtop .. I don't recall if this is installed by default with RCLI, I know it's available in VIMA and that's what I use for management so I'm not 100% sure, you can probably check the release notes if this is part of the RCLI or part of VIMA only. ========================================================================= --William VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ |