WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Ruby vSphere Console (RVC) 1.6 Released

Ruby vSphere Console (RVC) 1.6 Released

02.13.2012 by William Lam // 10 Comments

Rich Lane the creator of Ruby vSphere Console just recently released RVC 1.6 which includes some new features and bug fixes. If you are a current RVC user, you can update to the latest version by using the "gem" utility. For those of you who are not familiar with RVC, it is console UI for vCenter Server and ESX(i) host and it provides a way to interact with your vSphere infrastructure like the vSphere Client but using a console shell. RVC can be installed on a Windows, Linux or Mac OSX system and it's built on RbVmomi which is an open source Ruby library/bindings to the vSphere API.

I recently spent sometime revising RVC as it has gotten a significant amount of new features from the last time I looked at it. RVC currently has over 120+ commands that simplify some of the most common tasks such as cloning a VM (Full & Linked Clone), vDS Management, Cluster/Host/VM Management and many many others.

There are so many cool and unique features that RVC offers that I could not name them all, but I thought I share with you my top 5 favorite features of RVC.

1. vSphere Virtual Filesystem
RVC presents the vSphere infrastructure as a virtual filesystem, this allows you to quickly navigate your Hosts, Cluster, Datacenter, VMs, etc. in a very user friendly and intuitive manner. It also allows for tab completion of commands and the use of wild cards when referring to objects.

Here is an example of connecting to a vCenter Server and quickly building out a new infrastructure by creating a new datacenter, cluster, adding an ESXi host and then creating a Linked Clone VM in just seconds:

Here is another example of what can be done with the virtualFS that Rich has created, you can easily view or edit files within the datastores (e.g. .vmx,.vmdk,vmware.log).

2. Multi-vCenter Support

You can connect to multiple vCenter Server(s) at once and quickly navigate to any of your vCenter Servers to perform various operations. Each vCenter will have it's own constructed virtual filesystem that will show up when you login.

Here is an example of connecting to 4 different vCenter Servers:

3. Performance Graphs
You can view performance charts using RVC similar to the vSphere Client. RVC quickly allows you to see what performance metrics are relevant for an object and displaying the graph using gnuplot:

Here is an example of displaying the live "cpu.usagemhz.average" metric for an ESXi host:

4. Marks
You can think of marks like an alias, RVC allows you to quickly save your favorite paths for later use and also include them within commands. This can be really helpful if you do not want to keep typing out a super long path and just give it a short and easy name to remember.

Here is an example of creating a mark called "favVM" to a particular VM in my vSphere infrastructure and perform a linked clone operation using the mark I created:

5. Extensibility

RVC as Rich stated does not (yet) have every single capability that the vSphere Client has, but is extremely extensible. Anyone with a bit of Ruby and vSphere API knowledge can extend or create new commands for RVC. It it modular in nature and when you create/extend a new command, you do not necessary need to add it to the original RVC source code. You can actually add your *.rb files into the .rvc directory in your home directory and RVC will automatically pickup the commands you added. If you create some cool and useful new commands, be sure to send them to Rich via the github project so he can include it in the main branch.

Here is an example of extending two new commands for "cluster" object. There are currently only three cluster commands by default: add, configure_ha and create. You may have noticed that configuring DRS is not one of the available commands, but wouldn't it be nice to have it? I created two new commands called "configure_drs" and "configure_automationlevel" which allows you to enable/disable DRS for a cluster and also specifying the DRS automation level.

Here is the source code for two commands that were added in .rvc/cluster.rb

# William Lam
# http://www.virtuallyghetto.com/

## Command to Enable/Disable DRS ## 

opts :configure_drs do
  summary "Configure DRS on a cluster"
  arg :cluster, nil, :lookup => VIM::ClusterComputeResource
  opt :disabled, "Disable DRS", :default => false
end

def configure_drs cluster, opts
  spec = VIM::ClusterConfigSpecEx(
    :drsConfig => {
       :enabled => !opts[:disabled],
    }
  )
  one_progress(cluster.ReconfigureComputeResource_Task :spec => spec, :modify => true)
end

## Command to Configure DRS Automation Level ###

opts :configure_automationlevel do
  summary "Configure DRS Automation level on a cluster"
  arg :cluster, nil, :lookup => VIM::ClusterComputeResource
  arg :level, "DRS Automation Level [fullyAutomated|manual|partiallyAutomated]"
end

def configure_automationlevel cluster, level
  spec = VIM::ClusterConfigSpecEx(
    :drsConfig => {
       :defaultVmBehavior => level,
    }
  )
  one_progress(cluster.ReconfigureComputeResource_Task :spec => spec, :modify => true)
end

 
Note: This was my first time writing any Ruby code, I'm sure I could have combined the two operations with some conditionals and then create the property drsConfig object.

If these five features of RVC seems really cool, I would highly recommend you go download and install RVC and give the rest a spin. If you have any feedback, questions or want to submit a patch for the RVC project, be sure to check out the RVC github project page for all the details.

More from my site

  • vGhetto Lab #NotSupported Slides Posted
  • How to convert vSAN RVC commands into PowerCLI and/or other vSphere SDKs?
  • Docker Container for the Ruby vSphere Console (RVC)
  • Automating full configuration of a VSAN Stretched Cluster using RVC
  • How to run the VSAN Observer in "collection" mode in the background?

Categories // Uncategorized Tags // ruby vsphere console, rvc, vSphere

Comments

  1. *protectedid says

    02/14/2012 at 9:46 pm

    Hi there William,

    I´ve just discovered your post on this after you mentioned your site at the How to guide in the community and saw the little but annoying readline thing at the start of rvc. I had that too once and I wonder if you would like to get it sorted out.

    Do you use rvm (http://beginrescueend.com/) ? The Ruby Version Manager? If so it´s kinda simple.
    Just install libreadline with your favorite package manager.
    Then do the rvm install side:
    rvm package install readline

    Then install your version of choice:
    rvm install 1.9.2 --with-readline-dir=$rvm_path/usr

    And use it:

    rvm --default use 1.9.2

    Hope this helps =)

    Greetings,
    Kjellski

    Reply
  2. *protectedWilliam says

    02/14/2012 at 10:05 pm

    @Kjellski,

    Thanks for the tip, I don't use RVM, but I'll take a look as I've noticed that minor warning message. I've also reported it to Rich as well, perhaps he can document or find an alternative.

    Thanks

    Reply

Trackbacks

  1. Extending RVC to support renaming VM Storage Policies | virtuallyGhetto says:
    03/18/2014 at 2:56 pm

    […] was recently using RVC (Ruby vSphere Console) to setup one of my VSAN lab environments and I had noticed that in the SPBM namespace, that you […]

    Reply
  2. Newsletter: March 21, 2014 | Notes from MWhite says:
    03/22/2014 at 5:57 pm

    […] vSphere Console (RVC) 1.6 Released This is actually an old article that William did on RVC.  However with the release of VSAN, RVC has more importance now.  You can […]

    Reply
  3. VSAN Configuration Maximum Query Script | virtuallyGhetto says:
    03/31/2014 at 3:37 pm

    […] to the vSphere Web Client, a great way to further explore VSAN in greater depth is by leveraging RVC and the new VSAN namespace on the command-line. If you have not played with the new the VSAN […]

    Reply
  4. VSAN Flash/MD capacity reporting | virtuallyGhetto says:
    04/29/2014 at 5:23 pm

    […] those of you who have used RVC, this information is somewhat available today using the vsan.disks_stats command. The only problem […]

    Reply
  5. Automating full configuration of a VSAN Stretched Cluster using RVC | virtuallyGhetto says:
    10/23/2015 at 10:28 am

    […] who have not used RVC before, I highly recommend you give it a try and you can take a look at this article to see some of the cool features and benefits. I am making use of the RVC script option which I […]

    Reply
  6. Docker Container for the Ruby vSphere Console (RVC) | virtuallyGhetto says:
    11/08/2015 at 12:27 pm

    […] Ruby vSphere Console (RVC) is an extremely useful tool for vSphere Administrators and has been bundled as part of vCenter […]

    Reply
  7. VSAN 6.2 extends vSphere API to include new VSAN Management APIs | virtuallyGhetto says:
    02/26/2016 at 7:38 am

    […] VSAN Management SDK for Ruby - Extends rbvmomi (vSphere SDK for Ruby) […]

    Reply
  8. Getting started with the new VSAN 6.2 Management API | virtuallyGhetto says:
    03/17/2016 at 9:09 am

    […] proceed further. In our example, Python requires pyvmomi (vSphere SDK for Python) and Ruby requires rbvmomi (vSphere SDK for Ruby). If you are on Mac OS X, it is pretty easy to install these packages. Make […]

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025