With the release of vSphere 5.5, VMware supports a new command line utility: Ruby vSphere Console (RVC). RVC is a Ruby based interactive object oriented command line utility. It was initially released as a Fling some years ago. RVC has support for both, the Windows version of vCenter Server and the vCenter Server Appliance (VCSA). It is similar to other command line tools like PowerCLI or ESXCLI and can be used to manage and troubleshoot vSphere environments. In this post I am going to show how to install RVC on the vSphere Management Assistant (vMA).

RVC Installation

Install Ruby (root permissions required)

vma:~ # sudo su

vma:~ # zypper install rubygems

Press a to trust

Press y to confirm installation

We need to update Ruby to Version 1.9.2. To manage Ruby Versions I am going to use RVM (Ruby Version Manager). This also requires some additional packages.

vma:~ # \curl -L https://get.rvm.io | bash -s stable

vma:~ # source /etc/profile.d/rvm.sh

vma:~ # zypper install patch automake bison gcc gcc-c++ libtool patch gdbm-devel glibc-devel libffi-devel libopenssl-devel readline-devel zlib-devel

Press 1 to resolving package dependencies

Press y to confirm installation

Install Ruby Version 1.9.2, RVC (Ruby Virtual Console) and FFI (Auto-complete library):

vma:~ # rvm install 1.9.2

vma:~ # gem install rvc

vma:~ # gem install ffi

That's it. You can now connect to an ESXi Hosts or a vCenter Server:

vma:~ # rvc 192.168.222.200



Troubleshooting‎

ERROR: Error installing rvc:

nokogiri requires Ruby version >= 1.9.2.

Solution: Update Ruby to version >= 1.9.2

vma:~ # \curl -L https://get.rvm.io | bash -s stable

vma:~ # source /etc/profile.d/rvm.sh

vma:~ # zypper install patch automake bison gcc gcc-c++ libtool patch gdbm-devel glibc-devel libffi-devel libopenssl-devel readline-devel zlib-devel

vma:~ # rvm install 1.9.2



Error running 'requirements_opensuse_libs_install patch automake bison gcc gcc-c++ libtool patch gdbm-devel glibc-devel libffi-devel libopenssl-devel readline-devel zlib-devel',

please read /usr/local/rvm/log/1385998607_ruby-1.9.2-p320/package_install_patch_automake_bison_gcc_gcc-c++_libtool_patch_gdbm-devel_glibc-devel_libffi-devel_libopenssl-devel_readline-devel_zlib-devel.log

Requirements installation failed with status: 4.

Solution: Install required dependencies

vma:~ # zypper install patch automake bison gcc gcc-c++ libtool patch gdbm-devel glibc-devel libffi-devel libopenssl-devel readline-devel zlib-devel



Problem: gcc-4.5-19.1.x86_64 requires gcc45, but this requirement cannot be provided

uninstallable providers: gcc45-4.5.1_20101208-9.8.i586[opensuse]

gcc45-4.5.1_20101208-9.8.x86_64[opensuse]

Solution 1: downgrade of binutils-2.21.1-0.9.2.x86_64 to binutils-2.21-13.1.x86_64

Solution 2: do not install gcc-4.5-19.1.x86_64

Solution 3: do not install gcc-4.5-19.1.x86_64

Solution 4: break gcc-4.5-19.1.x86_64 by ignoring some of its dependencies Choose from above solutions by number or cancel [1/2/3/4/c] (c):

Solution: Use Solution 1 to downgrade binutils.