The latest VSAN Beta Refresh includes a new Ruby vSphere Console (RVC) namespace to manage VM Storage Policies. The SPBM (Storage Policy Based Management) called namespaces does not work out of the box. It crashes when you want to query the available policies or check for compliance.
/localhost/Hamburg> spbm.check_compliance ~/vms/vma.virten.lab/
NoMethodError: undefined method `RetrieveServiceContent' for PbmServiceInstance("ServiceInstance"):RbVmomi::VIM::PbmServiceInstance
This problem can be solved by updating RVC to the latest version.
RVC SPBM namespaces fails with the following error-message:
/localhost/Hamburg> spbm.check_compliance ~/vms/vma.virten.lab/ NoMethodError: undefined method `RetrieveServiceContent' for PbmServiceInstance("ServiceInstance"):RbVmomi::VIM::PbmServiceInstance /opt/vmware/rvc/gems/rbvmomi-1.7.0/lib/rbvmomi/pbm.rb:54:in `serviceContent' /opt/vmware/rvc/lib/rvc/modules/spbm.rb:482:in `block in check_compliance' /opt/vmware/rvc/lib/rvc/modules/spbm.rb:698:in `_catch_spbm_resets' /opt/vmware/rvc/lib/rvc/modules/spbm.rb:480:in `check_compliance' /opt/vmware/rvc/lib/rvc/command.rb:42:in `invoke' /opt/vmware/rvc/lib/rvc/shell.rb:126:in `eval_command' /opt/vmware/rvc/lib/rvc/shell.rb:73:in `eval_input' /opt/vmware/rvc/bin/rvc:164:in `<main>'
That problem happens in RVC version 1.3.2-1, delivered with the refreshed vCenter Server Appliance (VMware-vCenter-Server-Appliance-5.5.0.10000-1440531):
- Download rvc_1.3.3-1_x86_64.rpm from here (VSAN Beta login required)
- Copy the package to the vCSA
- Open an SSH connection to the appliance
- Update the package
vc:~ # rpm -U rvc_1.3.3-1_x86_64.rpm
- Verify the version:
vc:~ # rpm -qa rvc rvc-1.3.3-1
- Start Ruby vSphere Console
vc:~ # rvc root@localhost
You can now use SPBM related features:
/localhost/Hamburg/vms> spbm.check_compliance ~/vms/vma.virten.lab/ +-----------------+---------+------------+ | VM/Virtual Disk | Profile | Compliance | +-----------------+---------+------------+ | vma.virten.lab | n+1 | compliant | | Hard disk 1 | n+1 | compliant | +-----------------+---------+------------+ Number of 'compliant' entities: 2