Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

How to delete a VM into a script

$
0
0


Hello,

 

I want to delete some VM with a VCO script, I would not use the Action element named destroyVM. I explain you why I would not use it, because in my script I make this action :

 

1. I list all VM into a specific folder that the name is different of ServerName-Today Date and are powered Off.

2. I would destroy each VM into this list.

 

But When I would just test the following command :

 

System.getModule("com.vmware.library.vc.vm").destroyVm("VMName");

 

I receive the following error message :

 

TypeError: Cannot read property "runtime" from undefined (Dynamic Script Module name : destroyVm#52993)

 

I search on google and VMware blog, I find nothing to help me !!!!

 

If someone have an idea, you are welcomed to respond me.

 

Thank you by advance

 

Have a nice day

 

Best Regards

 

Christophe


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>