Skip to content

Commit 883d8f1

Browse files
Girish chaudhariDaanHoogland
authored andcommitted
CLOUDSTACK-5150 - set the template size from source
Signed-off-by: Daan Hoogland <daan@onecht.net>
1 parent b0d726a commit 883d8f1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ public Answer copyVolumeFromPrimaryToSecondary(CopyCommand cmd) {
9595
@Override
9696
public Answer createTemplateFromVolume(CopyCommand cmd) {
9797
DataTO destData = cmd.getDestTO();
98+
VolumeObjectTO srcData = (VolumeObjectTO)cmd.getSrcTO();
9899
TemplateObjectTO template = new TemplateObjectTO();
99100
template.setPath(template.getName());
100101
template.setFormat(Storage.ImageFormat.RAW);
102+
template.setSize(srcData.getSize());
101103
DataStoreTO imageStore = destData.getDataStore();
102104
if (!(imageStore instanceof NfsTO)) {
103105
return new CopyCmdAnswer("unsupported protocol");

0 commit comments

Comments
 (0)