vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.2k stars 767 forks source link

Move datastore into datastore cluster? #773

Open xyker opened 5 years ago

xyker commented 5 years ago

I'm having trouble finding examples or references to methods that could possibly allow me to move/migrate a datastore into a datastore cluster. I've found a reference to vim.storagepod and can get various configuration/settings from it. However I'm not sure how to take a datastore object and add/remove it from the datastore cluster.

clarkus978 commented 4 years ago

I've been looking for the same method. The method you're looking for is MoveIntoFolder_Task. I've tested it several times, but I get "License not available to perform operation." Not sure what that means since we are using Enterprise Plus licensing... Below is documentation on it:

https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.Folder.html

mvs2 commented 3 years ago

I get the same license error and the slack channel is dead. If I manually turn storage DRS off, btw, it works. But then have to manually turn it back on. Any attempt to do that programmatically is met with the same licensing issue. However, all of it works just fine in PowerShell.

Edit: turns out if I do a time.sleep(10) things work OK. Your time interval may vary, of course.