java - Hyper-V Delete VM J-Interop -
i want modify msvm_virtualsystemmanagementservice resource , want utilize destroysystem method of msvm_virtualsystemmanagementservice.. purpose want reference instance of cim_computersystem represents virtual machine instance destroyed. don't know how using j-interop.. kindly help me..thanks
using http://jwbem.sourceforge.net/ should able msvm_computersystem reference
(sample jwbem doc)
import com.hyper9.jwbem.swbemobjectset; import com.hyper9.jwbem.msvm.msvmcomputersystem; ... // define wql query returns of hyper-v's virtual machines. string wql = "select * msvm_computersystem caption='virtual machine'"; // execute query. swbemobjectset<msvmcomputersystem> compsysset = svc.execquery(wql, msvmcomputersystem.class); // print names of virtual machines. (msvmcomputersystem cs : compsysset) { system.out.println(cs.getelementname()); }
java hyper-v
No comments:
Post a Comment