VMware {code} Community
lamw
Community Manager
Community Manager

Running vmrun on Linux/Windows with ESX

I know VIX 1.6.2 was just released which now supports ESX 3.5u2+ (I believe).

I know there are some blogs floating out there about how to use "vmrun.exe" on Windows to manage your Virtual Machines on ESX. I just installed VIX on both Windows and on our VIMA box. I found that "vmrun" exists on both systems which is great, now I found small discrepancy in running the same exact command on the two hosts and was wondering if I was missing something:

Windows host execution:

C:\Program Files\VMware\VMware VIX>vmrun.exe -T -h esx https://a.b.c.d/sdk -u root -p SOME_PASS list
Total running VMs: 1
[san-storage1] TEST-VM/TEST-VM.vmx

VIMA (Linux) host execution:

vmrun -T esx -h https://a.b.c.d/sdk -u root -p SOME_PASS list

Nothing is returned and it shows the usage summary, I'm not sure if the syntax is supposed to be different? VIMA can talk to the ESX Host and it's also in VIMA's management. The ESX Host in question is running latest VMware ESX 3.5u3

I've tried both Types = (server|esx), the results yield the same, works on Windows but not on Linux

Any idea what the issue might be?

Also on a side note, is there a way we can force the password to be prompted, I've found that if you just do -p or without -p that it'll error out. I'm pretty sure people will agree putting the root password in the page is probably not the best idea, especially in clear text. I'm looking at utilizing VIX to automate some tasks and I would like to either pass in the credentials once or store them in a temp cache like how VIMA / VI Perl Toolkit does its authentication.

Reply
0 Kudos
6 Replies
admin
Immortal
Immortal

Thanks for the feedback.

We'll have to look into that discrepancy, do you find differences in any other commands?

vmrun prompting for a password will have to be tracked as a feature request. You can use VIX functionality via C or Perl, and it should be easy enough to integrate with VIMA's FastPass if you're using Perl.

lamw
Community Manager
Community Manager

I have not tried other commands, I wanted to just check out what VIX had to offer and try out some commands in our development environment.

We're looking at implementing a solution that would run on a Linux system, though at at this time I would wait until this issue is somehow resolved before moving forward with VIX. We may go the Windows route, if there is no fix in the short run but would like to keep it UNIX/Linux base if possible

Thanks Carter

Reply
0 Kudos
admin
Immortal
Immortal

Actually you're missing a -h

vmrun -T esx -h https://host/sdk -u root -p pass list works for me on Ubuntu 8.04. Maybe Windows is a bit more lenient in argument processing.

Reply
0 Kudos
lamw
Community Manager
Community Manager

Actually I had a "-h" but I was manually typing out the syntax since my RGS client did not have remote clipboard enabled, it yields the same result with nothing being outputted.

Update3: Ubuntu 8.10 2.6.27-7-generic also fails

Update2: Just tried it on Archlinux - Linux Auroa 2.6.22-ARCH #1 SMP (32bit) and the same thing still occurs, I guess I can get a copy of Ubuntu to see if it works

Update1: Hm if it works for you on ubuntu, is this a VIMA issue then? I'll try it on another Linux host we have access to.

On another note, this would be a great package to be bundled with VIMA or possibly even integrated into the standard VIMA toolset.

Reply
0 Kudos
admin
Immortal
Immortal

Can you tell me which of the above are 32/64 bit? VIMA is 64 bit so my guess was that it may be related to that, but the failure on Archlinux seems to suggest it's not the real reason.

Reply
0 Kudos
lamw
Community Manager
Community Manager

Attempt 1: VIMA is 64bit, so I was using the 64bit VIX

Attempt 2: Arch Linux was 32bit, used 32bit VIX

Attempt 3: Ubuntu 8.10 Desktop was also 32bit and used 32bit VIX

I guess I can attempt to download Ubuntu 8.0.4 32bit and I assume this their standard download and give that a try? If not, then I'm out of ideas. If I remove any of the required flags, I get errors so it looks like it's parsing the command in properly but just keeps printing the usage summary.

Update: Ubuntu 8.04.1 32bit does the same thing. Is there something I'm missing? These deve systems are on the same network as the ESX Server, it does not have any firewall/iptables configured. I also pass in the port 443 and no go, though if I pass this exact syntax on a the Windows XP image, then it works like a charm

Reply
0 Kudos