I have written a job which will delete the VMs from a repository from the GRID.
- Deploy the SAR file with zosadmin deploy command.
- Go to the deletevms.policy, specify the datastore name in the list value.
- Run the scheduler “deletevms”.
It will delete all the VMs discovered from the repository in the GRID.
You can specify more than one datastore name in the policy.
This job is useful when Developing/Testing scenarios. We needed to delete all the discovered VMs manually whenever we need to clean up. This is a very painful task.
This job will delete all the VMs from the specified datastore cleanly.