use correct disk offering id
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/bb9aac0d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/bb9aac0d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/bb9aac0d Branch: refs/heads/storage_refactor Commit: bb9aac0db566e368f73da31ad2f15f5a8e707efe Parents: 70742a1 Author: Edison Su <[email protected]> Authored: Thu Feb 7 14:57:06 2013 -0800 Committer: Edison Su <[email protected]> Committed: Thu Feb 21 10:03:38 2013 -0800 ---------------------------------------------------------------------- .../storage/motion/AncientDataMotionStrategy.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bb9aac0d/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java index d686336..70f65c7 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -282,10 +282,10 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { } protected String cloneVolume(DataObject template, DataObject volume) { - - DiskOfferingVO offering = diskOfferingDao.findById(volume.getId()); - VMTemplateStoragePoolVO tmpltStoredOn = templatePoolDao.findByPoolTemplate(template.getDataStore().getId(), template.getId()); VolumeInfo volInfo = (VolumeInfo)volume; + DiskOfferingVO offering = diskOfferingDao.findById(volInfo.getDiskOfferingId()); + VMTemplateStoragePoolVO tmpltStoredOn = templatePoolDao.findByPoolTemplate(template.getDataStore().getId(), template.getId()); + DiskProfile diskProfile = new DiskProfile(volInfo, offering, null); CreateCommand cmd = new CreateCommand(diskProfile,
