From 51643949498a26a61e1319447b39147cf5a35c99 Mon Sep 17 00:00:00 2001 From: frank Date: Tue, 1 Nov 2011 18:12:35 -0700 Subject: [PATCH] Bug 11646 - OVM - volume > download volume failed for both ROOT and DATA volumes return volume name instead of full path to ingratiate mgmt server's bad name convention --- ovm/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py | 5 ++++- server/src/com/cloud/server/ManagementServerImpl.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ovm/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py b/ovm/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py index 2e9f5c885ff..d1578a52eac 100755 --- a/ovm/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py +++ b/ovm/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py @@ -433,7 +433,10 @@ if this doesn't resolve the problem, please check oracle manual to see how to of primaryStoragePath = sr.mountpoint resultPath = copyToPrimary(secMountPoint, volumeFolderOnSecStorage, volumePath, primaryStoragePath) OvmStoragePool()._umount(secMountPoint) - rs = toGson({"installPath":resultPath}) + + # ingratiate bad mgmt server design, it asks 'installPath' but it only wants the volume name without suffix + volumeUuid = basename(resultPath).rstrip(".raw") + rs = toGson({"installPath":volumeUuid}) return rs except Exception, e: try: diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 104abb05166..b6f952de6fc 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -4406,6 +4406,8 @@ public class ManagementServerImpl implements ManagementServer { return "qcow2"; }else if (cluster.getHypervisorType() == HypervisorType.VMware){ return "ova"; + }else if (cluster.getHypervisorType() == HypervisorType.Ovm){ + return "raw"; }else{ return null; }