use correct disk offering id

This commit is contained in:
Edison Su 2013-02-07 14:57:06 -08:00
parent 70742a1cc0
commit bb9aac0db5
1 changed files with 3 additions and 3 deletions

View File

@ -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,