+
+ /** Retrieve the list of all existing VMs */
+ public static native VM[] all();
+
+ /** Retrieve a VM from its name */
+ public static native VM getVMByName(String name);
+
+ /** Shutdown and unref the VM.
+ *
+ * Actually, this strictly equivalent to shutdown().
+ * In C and in libvirt, the destroy function also releases the memory associated to the VM,
+ * but this is not the way it goes in Java. The VM will only get destroyed by the garbage
+ * collector when it is not referenced anymore by your variables. So, to see the VM really
+ * destroyed, don't call this function but simply release any ref you have on it.
+ */
+ public void destroy() {
+ shutdown();