Can someone provide an example of how to delete a vm via the PHP bindings?
ie $vmsdk->delete()?
I know this is probably sooo simple but I have looked and cannot find the method to do this.
thanks
Update:
I have found out its easy... just scroll to the bottom of the docs pages and see the inherited methods
So I can do this:
but run into the problem William describes here:
http://blogs.vmware.com/vsphere/2012/04/partially-powered-off-vapp-vms.html
I can do a
$task = $sdkVm->undeploy();
$service->waitForTask($task);
but it expects a parameter and I am not sure exactly what it is looking for here... Any code example of the use of the undeploy($someObjectHere) would be appreciated.
Update:
was able to just create an object of that type and pass it in:
$undeployparams = new VMware_VCloud_API_UndeployVAppParamsType();
$task = $sdkVm->undeploy($undeployparams);
$service->waitForTask($task);
VM deleted.