Hello.
Can't reexport a VM if this VM is already present in the export domain
With Java api:
*VM vm = api.getVMs().get("vm01");StorageDomain exportDomain =
api.getStorageDomains().get("export"); *
*Action act = vm.exportVm(new Action() { {
setExclusive(True); setDiscardSnapshots(True);
setStorageDomain(exportDomain); }});*
And following error is returned:
Exception in thread "main"
code : 409
reason: Conflict
detail: Cannot export VM. VM with the same identifier already exists.
at org.ovirt.engine.sdk.web.HttpProxy.execute(HttpProxy.java:120)
at
org.ovirt.engine.sdk.web.HttpProxyBroker.add(HttpProxyBroker.java:209)
at
org.ovirt.engine.sdk.web.HttpProxyBroker.action(HttpProxyBroker.java:153)
at org.ovirt.engine.sdk.decorators.VM.exportVm(VM.java:784)