RVC BlogLogo2As of lately I’ve been playing around with some of the many management tools and that are available from VMware. One nifty tool that I’ve decided to start using a bit more due to top secret reasons is the Ruby vSphere Console (RVC). For those of you who don’t know about RVC here is a bit of information about it.

Ruby vSphere Console (RVC) is a Linux console UI for vSphere, built on the RbVmomi bindings to the vSphere API. RVC is a console UI for ESXi and vCenter servers. The vSphere object graph is presented as a virtual filesystem, allowing you to navigate and run commands against managed entities using familiar shell syntax. RVC doesn’t (yet) have every feature vSphere Client does, but for common tasks it can be much more efficient than clicking through a GUI.

The RVC has been available for some time as one of the Flings available at the VMware labs website. While I’m not new to the tool, it has been a long while since I last played around with it. While trying to complete one of my projects testing interoperability and capabilities of the tool I came a cross an error that halted my progress for a few minutes, but lucky for me my old school Ruby skills haven’t been completely flushed out my brain and some searching I was able to correct issue.

Here is the problem I experienced and the solution implemented:

When attempting to open a connection to a vCenter Server virtual appliance from the Terminal application in OS X (10.8.4) I received the error illustrated below:

RVC  SyntaxError

From the looks of it, there seems to be some sort of problem with one of the RVC ruby modules which is called out in the first line of the error output with a (SyntaxError) listed in parenthesis.

  • /Library/Ruby/Gems/1.8//gems/rvc/-1.7.0/lib/rvc/modules/vds.rb:662:in ‘load_code’: compile error (SyntaxError)
After some research and looking at many resources and articles discussing a similar problem I was able to identify and validate the root cause of the error. It turns out that the error is the result of the incorrect use of a character or just simply a typo. The solution to the problem is quiet simple once the root cause has been identified and verified and can be easily corrected with the use of a text editor. Use a text editor of your choice and navigate to the directory listed above and open the vds.rb module and navigate to the bottom of the page and as illustrated below and find the following code entry:
  • :switchUuid =>portgroup.config.distributedVirtualSwitch.uuid,
RVC - vds.rb module
Depending on the text editor in you firing the entry can be simplified. For example if the text editor in use presents the lines of code in a number sequence, then you can easily find this line of code in question by going directly to line code 656. If the editor in use doesn’t present the number sequence just navigate to the very bottom of the page and locate the line of code discussed above.
If you pay close attention to the line of code listed and illustrated above the is a comma ( , ) at the end of the line. That is the problem right there. So delete the comma ( , ) and save the vds.rb module and you should be ready to go and start using RVC. I figured since I ran into this issue and looked quiet a few different articles about it in order to correct the problem
RVC  Working
 For those of you out here that are familiar with RVC and have used it in some capacity great, good for you all and keep going. For those of you who haven’t seen or know much about it I would recommend to get familiar with RVC sooner than later if you know what i’m trying to say and get my hints here  ; )
 – Enjoy
 For future updates, be sure to follow me on Twitter at @PunchingClouds