Very cool fling, was able to get this running on my Mac without too much issue.
I noticed that rvc only accepts IP Address of the ESX(i)/vCenter host, even with FQDN it fails, I assume this is expected?
I also found that the "help" operation always throws the following error no matter at what level of the inventory:
NoMethodError: undefined method `keys' for [["destroy", "basic.destroy"]]:Array
0 vesxi41-1. (standalone): cpu 5 GHz, memory 4294254 GB
The environment is a standalone ESXi 4.1 Update 1 host
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin9.8.0]
Thanks for the bug report, I've fixed the help command (it was using a Ruby 1.9 feature). RVC supports DNS hostnames - what error did you get? Can you ping using the same hostname?
I am trying to get this installed on FC 14 (64 bit). Installed Ruby 188.8.131.524-1.fc14, Gems 1.3.7-2.fc14 as well as libxml2, libxslt and devel packages.
I get the foolowing error:
[root@myPC etc]# gem install rvc
Building native extensions. This could take a while...
ERROR: Error installing rvc:
ERROR: Failed to build gem native extension.
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... no
checking for ruby_thread_has_gvl_p()... no
checking for ruby_native_thread_p()... no
checking for rb_thread_call_with_gvl()... no
/usr/lib/ruby/gems/1.8/gems/ffi-1.0.7/ext/ffi_c/libffi/configure: line 725: 0: Bad file descriptor
make: *** [/usr/lib/ruby/gems/1.8/gems/ffi-1.0.7/ext/ffi_c/libffi/.libs/libffi_convenience.a] Error 1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.0.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.0.7/ext/ffi_c/gem_make.out
I am a total nob when it comes to ruby so any help would be appreciated.
The FFI gem isn't actually required for RVC to work, so you can run "gem install rbvmomi trollop backports && gem install --no-dependencies rvc".
Thanks, there was an error of invalid option for --no-dependencies so I used --igonore-dependencies and got it installed but the following error when I run rvc:
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem ffi (>= 1.0.7) (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
Any ideas? Thnaks agin.
Sorry, replying to my own post. Needed to install libffi-devel then all worked, did a gem install rvc and it is working now.
Time to start exploring.
Thanks for writing this.
I've pushed rvc-1.0.3, which makes the FFI dependency optional. You'll still want to install it if you can since it enables useful tab-completion features.
Tim, could you post the Fedora packages you needed to install?
I started with a base FC14 install and installed the following via 'yum install':
I was able to get ffi installed after using 'gem install ffi' and tab completion is working.
How would I got about updating rvc to I do a gem uninstall download latest and then gem instll again?
Use "gem update rvc" to get the latest version.
A great tool, must try.
Just for anyone who might get this issue too:
On Ubuntu 10.04 64-bit after installing all the mentioned packages, when connecting I got the following:# rvc 10.21.65.41/home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/lib/rvc/modules/vim.rb:64:in `connect': uninitialized constant RVC::CmdModule::OpenSSL (NameError)from /home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/lib/rvc/modules/vim.rb:54:in `loop'from /home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/lib/rvc/modules/vim.rb:54:in `connect'from /home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/bin/rvc:63from /home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/bin/rvc:60:in `each'from /home/eamon/.gem/ruby/1.8/gems/rvc-1.0.3/bin/rvc:60from /home/eamon/.gem/ruby/1.8/bin/rvc:19:in `load'from /home/eamon/.gem/ruby/1.8/bin/rvc:19
Solution (given by rlane) is to install the package libopenssl-ruby1.x (1.8 for me). Works now :-)
THANKS for this awesome tool. I'm one of the members of the "give us a Linux client" choir. Installed this on an openSUSE 11.4 64-Bit - and it works perfectly out of the box.
Now my only question is: WHY does this have to be done by ESX developers on their own as only a VMware-the-company halfheartedly supported project - this is so great, release it as a proper VMWare Product!
Now off to enjoy VMRCs in RVC! :-)
Wow, interesting project. If this project continues to grow I wonder if there's a possibilty to include it in the vMA? and wondering why its not added yet to the VMware Flings area? Wondering what other commands you will add next? svmotion, editing properties of the vms? connecting/disconnecting floppies/cdroms etc. ?
This would indeed be a neat utility to add to vMA, for now, you'll have to manually install but here is a quick blog post on how to do so - http://www.virtuallyghetto.com/2011/04/how-to-install-ruby-vsphere-console-on.html