Operating Windows,linux and other virtual machines can be ssh,wmi to operate the shutdown, restart. You can also add a virtual machine to the host, data center by first. Then through the host, data center to manipulate. This is the same thing that can be done with VMware vsphere Client management tools. The package used
Packages used: Vijava.jar
public static void Main (string[] args) {try {String ip= ' 192.168.10.60 ';
Clientsesion session = new Clientsesion ("Address", "username", "password");
StringBuffer protocol = new StringBuffer ("https");
Protocol.append ("://");
Protocol.append (IP);
Protocol.append (":");
Protocol.append (443);
Protocol.append ("/");
Protocol.append ("SDK");
String urlstr = protocol.tostring ();
URL url = new URL (urlstr);
Serviceinstance si = new serviceinstance (URL, "root", "gzyl@38921561", true);
Folder RootFolder = Si.getrootfolder (); managedentity mes = new Inventorynavigator (rootfolder). Searchmanagedentity ("Virtualmachine", "Windows 2008 R2_Test
& "225");
if (mes!= null) {Virtualmachine virtualmachine = (virtualmachine) mes;
System.out.println ("Virtualmachine Name:" +virtualmachine.getname ()); Virtual machine reload//Virtualmachine.reload ();
Virtual Organization Machine virtualmachine.shutdownguest ();
Virtual machine standby//virtualmachine.standbyguest ();
}else{si.getserverconnection (). Logout ();
}}catch (Exception e) {e.printstacktrace ();
}
}