availability: January 2017
This blogpost gives an overview of the options you have on Mac OSX to interact with a Vmware Esx, Vsphere server. I feel that Vmware threats Mac OSX users as a second thought, which is kind of strange. The options that we will explore are:
Suppose you have installed a new Vmware Vsphere/Esx server, the screen will greet you with a URL that you can use to connect to the server. That URL will redirect you to a webpage that gives you two client options:
Install the Vpshere Client: as there is only a windows .exe , this option can't be used on a Mac OSX system. I found two ways to get around the problem but it requires you to have a windows machine running:
Interact via the Web UI:
The second way of interacting, is by using the Web UI. The URL to connect to https://
<% codify(:shell) do %> $ chkconfig –level 345 vmware-webAccess on $ /etc/init.d/vmware-webAccess start or service vmware-webAccess start <% end %>
You can find more info in the vmware vpshere Web access PDF Document
Interact with Virtual Machines Console: The web interface allows you to do the most common tasks , the only thing you can't do on an Mac is to view the console of a machine. This requires a plugin for the browser. The plugin either runs in Linux or Windows, and there is no Mac version of the plugin.
To get around that problem, I found these options:
Beware that you need to allow the VNC service on the server for this <% codify(:shell) do %> $ esxcfg-firewall -e vncServer <% end %>
On the Vsphere server: Vmware provides several commandline tools on the server platform, through the following commands:
On Mac OS X: If you can't ssh into the server, your options are more limited on Mac OSX:
If the commandline tools are too limited for you, or scripting is not your thing, Vmware provides a multitude of options to program/script against an Vsphere/Esx server.
Note: if you only have an ESXi version, you can only read information! You can't do changes.
Project Onyx is a new tool in that generates code based on the mouse clicks you make in the vSphere Client. Project Onyx makes it easy to see what is happening behind the covers and can help with development of scripts and automation solutions. Please refer to the Using Project Onyx video for set up and more information.
Official Programming language options
All the official programming options are listed at http://www.vmware.com/support/pubs/sdk_pubs.html
On a side note, in case you want to automate stuff in the Guest you can use the Vix-API http://www.vmware.com/support/developer/vix-api/ . The VIX API helps you write programs and scripts to automate virtual machine operations and run programs or manipulate files within guest operating systems
From the official options, I consider only the java one to be usable on my Mac. I found the interface for programming Webservices in java, rather cumbersome. And samples are rather spread over the whole site.
I found much more consistency in the Open Source VI (vSphere) Java API for Managing VMware Platforms (VIjava) Created by Steve Jin , it builds upon the WebService interface but provides a great, rather simple but powerful programming API. And it has lots of samples and documentation.
Personally I believe, this is the way forward: java will undoubtably stay important with the SpringSource acquisition by VMware.
Other options: The truth is out there
It would be nice to interface with ruby, similar to the Powershell on Windows. I found some hints that this might happen in the future in a blogpost Vmware looking into Ruby? http://blog.mccrory.me/2010/10/08/vmware-looking-to-ruby/ . Hopefully to be continued in the future.
I'm not much into python, but if Python is your thing:
Last but not least, I was thinking on creating an interface for puppet to integrate it within manifests. Not much there yet, but I found these useful pointers:
And if Libvirt finally gets good esx/vsphere support, the Puppet-Virt project https://github.com/carlasouza/puppet-virt would be an awesome way to interface.
But that's still future stuff...