Hi All,
I am running VirtualBox 4.2.10 on Ubuntu 12.04.
I am trying to clone a vm with the Java API. Doing this operation from the
console, I would issue the following command:
VBoxManage clonevm vmuid_src --name vmname_dest --register
With Java I am doing the following:
IMachine m_clone = vbox.findMachine(vmuid_src);
String m_clone_os = m_clone.getOSTypeId();
IMachine machine = vbox.createMachine(null, vmname_dest, null,
m_clone_os, null);
machine.saveSettings();
vbox.registerMachine(machine);
CloneMode cm = CloneMode.MachineState;
List<CloneOptions> cloneOptionsList = new ArrayList<CloneOptions>();
cloneOptionsList.add(CloneOptions.KeepAllMACs);
machine.cloneTo(m_clone, cm, cloneOptionsList);
After the execution of this code, I found a new vm in the list, but without
any storage attached. What am I missing? Can you direct me to the right way
to do it? I couldn't understand it from the sdkref.
Thanks, best
Carlo
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev