Java code...
public void startVM(String vm) {
try {
System.out.println("Starting replica " + vm);
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("xm create " + vm);
pr.waitFor();
pr.destroy();
rt.freeMemory();
rt.gc();
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
}
}
Change "create" to any command you want to do with your vm.
2011/10/19 Mo Mal <ma1000000000@gmail.com>
> Hello,
>
> I want to be able to reset or restart a VM from C/C++ or Java
> code remotely. Is it possible?
>
> Thanks.
> Mo
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xensource.com
> lists.xensource.com/xen-users
>
--
Luciano Barreto
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
lists.xensource.com/xen-users