VMware Ruby Virtual Console for vSAN 6.6
The Ruby vSphere Console (RVC) is an interactive command-line console user interface for VMware vSphere and Virtual Center.
The Ruby vSphere Console comes bundled with both the vCenter Server Appliance (VCSA) and the Windows version of vCenter Server. RVC is quickly becoming one of the primary tools for managing and troubleshooting Virtual SAN environments
How to begin
- To begin using the Ruby vSphere Console to manage your vSphere infrastructure, deploy the vCenter Server Appliance and configure network connectivity for the appliance.
- Afterwards, SSH using Putty or an app you prefer to the dedicated vCenter Server Appliance and login as a privileged user. No additional configuration is required to begin.
- Commands such as ‘cd’ and ‘ls’ work fine and if you want to return to the previous directory type ‘cd .. and press Enter
How to Login
RVC credentials are directly related to the default domain setting in SSO (Single Sign-On). Verify the default SSO Identity Source is set to the desired entity.
So there are a few different ways to logon potentially either locally or with domain credentials. Examples below
- rvc firstname.lastname@example.org@localhost
- rvc root@localhost
- rvc email@example.com@localhost
Where to go from here
You are now at the root of the virtual filesystem.
- To access and navigate through the system type ‘cd 0‘ to access the root (/) directory or ‘cd 1‘ to access the ‘localhost/’ directory. You can type the ‘ls’ command to list the contents of a directory. I am going to type ‘cd 1‘ to access my localhost directory so lets see what we have.
- Type ls to see what directory structure we have now. You should now see your datacenter or datacenters
- Change directory by typing cd 0 to the relevant datacenter and you will now see the following folder structure.
- Type ls to see the structure of this folder
- Type cd 1 to change to the Computers folder where we will see the cluster and then type ls
- We can now use a command to check the state of the vSAN cluster. You don’t want to enter the command ‘vsan.check_state vsan-cluster’ as that will not work. The number ‘0’ is what you need to use to look at the state of the cluster so type vsan.check_state 0
- Next look at the vSAN Object Status Report. Type vsan.obj_status_report 0
- We can also run the command vsan.obj_status_report 0 -t which displays a table with more information about vSAN objects
- Next look at a detailed view of the cluster. Type vsan.cluster_info 0
- Next we’ll have a look at disk stats. Type vsan.disks_stats 0
- Next have a look at simulating a failure of a host on your vSAN cluster. type vsan.whatif_host_failures 0
- You can also type vsan.whatif_host_failures -s 0
- You can also view VM performance by typing vsan.vm_perf_stats “vm” This command will sample disk performance over a period of 20 seconds. This command will provide you with ‘read/write’ information IOPS, throughput and latency
Using vSAN Observer
To generate a performance statistics bundle over a one hour period at 30 second intervals for a vSAN cluster named vSAN and save the generated statistics bundle to the /tmp folder, run this command:
- Log into rvc
- Navigate down to Computers
- Type the following vsan.observer ~/computers/clustername(fill this in)/ –run-webserver –force –generate-html-bundle /tmp –interval 30 –max-runtime 1
- While this is running, you can log into a web browser and run http://vCentername:8010 which will provide multiple graphs and information you can view
- Press Control C to stop if you want to stop this prior to the test ending.
Inaccessible objects or orphaned objects
If you get an issue like I did with an orphaned object then browse through the vSAN datastore in the Web Client and find the GUID of the object and run the following command on the hosts. Take care you have the correct GUID!
- /usr/lib/vmware/osfs/bin/objtool delete -u 5825a359-2645-eb1e-b109-002564f9b0c2 -f -v 10
- Give it a minute and you will see it vanish from your vSAN datastore
Within the RVC Console, type in vsan. then press tab twice to get the whole list of vsan commands you can use.
On the hosts the following commands can be useful
- cd /etc/init.d/vsanmgmtd status
- cd /etc/init.d/vsanmgmtd restart