Posted in Divers VMware

Starter Guide for Ruby vSphere Console

Starter Guide for Ruby vSphere Console Posted on 27/11/2017

Most peoples don’t use Ruby vSphere Console but you could find some features very useful. I think it’s the best console when you use vSAN. I write this starter guide to help yourself with those features. You can send to me an email if you need more informations.

First, open on SSH to your vCenter server. Then, enter “RVC”, you can show all option with –help option.

root@vcenterhome [ ~ ]# rvc --help
 Install the "ffi" gem for better tab completion.
 Ruby vSphere Console.

Usage:
 rvc [options] [username[:password]@]hostname

where [options] are:
 --path= Initial directory
 --create-directory Create the initial directory if it doesn't exist
 -c, --cmd= command to evaluate
 -s, --script= file to execute
 --script-args= arguments to script (default: )
 -k, --cookie= authentication cookie file
 -q, --quiet silence unnecessary output
 -a, --accept-unknown-host add unknown host into list of known hosts automatically
 -v, --version Print version and exit
 -h, --help Show this message

Example, if you are connected on your vCenter server. You can enter “localhost” with nothing else. After that, you have to enter your password for “Administrator@vsphere.local” :

root@vcenterhome [ ~ ]# rvc
Install the "ffi" gem for better tab completion.
Host to connect to (user@host): localhost
Using default username "administrator@vsphere.local".
password:
0 /
1 localhost/

Use CD command line with ID to enter in the section that you wish as well as LS command to list all sections. You can show the NameSpace’s options with TAB button.

All NameSpaces could be show if you enter command HELP as well.

/localhost/home> help
Namespaces:
alarm
basic
cluster
connection
core
datacenter
datastore
device
diagnostics
esxcli
find
host
issue
mark
perf
permissions
resource_pool
role
snapshot
spbm
statsinterval
syslog
vds
vim
vm
vm_guest
vmrc
vnc
vsan

For example, when you use TAB button for the NameSpace vSAN. You could show all options available for this NameSpace.

/vcenterhome.home.local/home> vsan.
vsan.apply_license_to_cluster
vsan.host_claim_disks_differently
vsan.perf.
vsan.check_limits
vsan.host_consume_disks
vsan.proactive_rebalance
vsan.check_state 
vsan.host_evacuate_data
vsan.proactive_rebalance_info
vsan.clear_disks_cache
vsan.host_exit_evacuation
vsan.purge_inaccessible_vswp_objects
vsan.cluster_change_autoclaim
vsan.host_info
vsan.reapply_vsan_vmknic_config
vsan.cluster_info
vsan.host_wipe_non_vsan_disk
vsan.recover_spbm
vsan.cluster_set_default_policy
vsan.host_wipe_vsan_disks
vsan.resync_dashboard
vsan.cmmds_find
vsan.iscsi_target.
vsan.scrubber_info
vsan.disable_vsan_on_cluster
vsan.lldpnetmap
vsan.stretchedcluster.
vsan.disk_object_info
vsan.login_iso_depot
vsan.support_information
vsan.disks_info
vsan.obj_status_report
vsan.upgrade_status
vsan.disks_stats
vsan.object_info
vsan.v2_ondisk_upgrade
vsan.enable_vsan_on_cluster
vsan.object_reconfigure
vsan.vm_object_info
vsan.enter_maintenance_mode
vsan.observer
vsan.vm_perf_stats
vsan.fix_renamed_vms
vsan.observer_process_statsfile
vsan.vmdk_stats
vsan.health.
vsan.ondisk_upgrade
vsan.whatif_host_failures

Have fun !!