If you are a Ruby and VMware fan (heck, even if you are not a Ruby fan), you should check out the "unofficial" VMware Lab Fling - Ruby vSphere Console (RVC) created by Rich Lane of VMware. RVC is described as a Linux console UI for vSphere, built on the RbVmomi (another VMware Fling) bindings to the vSphere API. RVC is platform agnostic, as long as you can get Ruby/Gem installed, you can run RVC on Windows (I believe), UNIX/Linux and even OSX!
Rich just released another update today supporting Linked Clones functionality for virtual machines and maintenance mode for ESX(i) host. I wanted to check out the latest update and I thought give it a try on vMA, here are the instructions for installing Ruby, Gem (Ruby package manager) and RVC on vMA 4.1. If you do not want to manually go through this manual process, jump towards the bottom for an automated script that does all this for you
Step 1 - You will need to download a few dependencies for both Ruby and Gems, the easiest way to do so is to setup a YUM repo pointing to CentOS mirrors. You will need to create a .repo file under /etc/yum.repos.d and in this example, we'll just call it /etc/yum.repos.d/CentOS-Base.repo
Copy the following into this file, make sure you create the file using sudo:
Step 2 - Install the following packages:
yum -y install gcc gcc-c++ zlib-devel openssl-devel readline-devel libxml2 libxml2-devel libxslt libxslt-devel
Step 3 - Download Ruby and Gems using wget:
Step 4 - Install Ruby
tar -zxvf ruby-1.8.7.tar.gz
sudo make install
You can verify that Ruby was installed correctly by running the following:
[vi-admin@vMA rubygems-1.7.2]$ ruby --version
ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
Step 5 - Install Gem
tar -zxvf rubygems-1.7.2.tgz
sudo ruby setup.rb
You can verify that Gem was installed correctly by running the following:
[vi-admin@vMA rubygems-1.7.2]$ gem --version
Step 6 - Update Gem (not necessary if you downloaded the latest version which is 1.7.2)
sudo gem update --system
Step 7 - Install ffi gem, this is used for faster tab competition
sudo gem install ffi
Step 8 - Install Ruby vSphere Console (RVC) gem
sudo gem install rvc
You can verify that RVC was installed correctly by running the following command:
[vi-admin@vMA ~]$ rvc -h
Ruby vSphere Console.
I also wrote a quick RVC installation script which does exactly the above without the manual labor.
Step 1 - Download installRVC.sh script to vMA:
Step 2 - Set the script to be executable:
chmod +x installRVC.sh
Step 3 - Run the installation script
Once completed, you should get a successful message that RVC is installed on your vMA host.
Now you are ready to start playing with RVC!
Here is an example of the two latest features added by Rich
As you can see it is very easy to use and intuitive, what would be even cooler is to have the various objects be colorized so you can easily distinguish between them, perhaps feature enhancement Rich?
If there are other vSphere operations that you would like to see get implemented, drop your feedback on this VMTN thread which is being monitored by Rich. You can also follow Rich on twitter for the latest updates about RVC.
Hopefully VMware will make this into an official fling and put it on their VMware Lab's website to get the word out!