def vms
      logger.debug "get all VMs in all datacenters: begin"
      result = dcs.inject([]) do |r, dc|
        r + serviceContent.viewManager.CreateContainerView(
          container: dc.vmFolder,
          type: ['VirtualMachine'],
          recursive: true
        ).view
      end
      logger.debug "get all VMs in all datacenters: end"
      result
    end
def vms
      logger.debug "get all VMs in all datacenters: begin"
      result = dcs.inject([]) do |r, dc|
        r + serviceContent.viewManager.CreateContainerView(
          container: dc.vmFolder,
          type: ['VirtualMachine'],
          recursive: true
        ).view
      end
      logger.debug "get all VMs in all datacenters: end"
      result
    end
get all vms in all datacenters