Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Cannot create VM with vCenter

$
0
0

Hi,

 

I am using Java API to create a client similar to vSphere. But the problem I face is of create a new VM.

 

So, I am using something like:

 

 

        final Folder vmFolder = datacenter.getVmFolder();
        final Task task = vmFolder.createVM_Task(vmSpec, resourcePool, host);
and the datacenter belongs to the HostSystem. The problem I see is that, if I directly connect to the ESX server the HostSystem is the ESX server and this works. But, when I connect to the vCenter, the HostSystem address is shown as the vCenter one, but it still is the HostSystem under the vCenter which I find if I go find the child entities under vCenter.
The error I see in case of the vCenter server is 'Invalid datastore path '[<data_store>]'. I checked the paths that is being created in the code is correct, as it works in case of ESX. Please let me know if I am missing something here.
Thanks.
-Pritam

Viewing all articles
Browse latest Browse all 179681

Trending Articles