vmware vim25 查找数据存储

阅读更多

查找指定名称的Datastore

    public ManagedObjectReference getDatastore(String name) throws RuntimeFaultFaultMsg {
	String path="datacenter/datastore";
	ManagedObjectReference folder = vimPort.findByInventoryPath(serviceContent.getSearchIndex(), path);
	ManagedObjectReference datastore=vimPort.findChild(serviceContent.getSearchIndex(), folder, name);
	return datastore;
    }

 

你可能感兴趣的:(vim25)