'Lists the VM instances that are registered with vCenter cluster.'

def list_instances(self):

    properties = ['runtime.connectionState', 'config.extraConfig["nvp.vm-uuid"]']
    LOG.debug('Getting    list    of    instances    from    cluster    %s', self._cluster)
    vms = []
    if self._root_resource_pool:
        vms = self._session._call_method(vim_util, 'get_inner_objects', self._root_resource_pool, 'vm', 'VirtualMachine', properties)
    lst_vm_names = self._get_valid_vms_from_retrieve_result(vms)
    LOG.debug('Got    total    of    %s    instances', str(len(lst_vm_names)))
    return lst_vm_names
