CS-15734 KVM Snapshots show incorrect disk usage.

Changed the code to show virtual size (allocated size).
RB: https://reviews.apache.org/r/6699/
Send-by: saksham.srivastava@citrix.com
This commit is contained in:
Edison Su 2012-08-20 11:22:41 -07:00
parent 481aae1ebc
commit 5a1c2dad87
1 changed files with 1 additions and 2 deletions

View File

@ -1159,6 +1159,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
long disksize;
try {
primaryPool = _storagePoolMgr.getStoragePool(pool.getUuid());
disksize = dskch.getSize();
if (cmd.getTemplateUrl() != null) {
@ -1170,9 +1171,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
return new Answer(cmd, false,
" Can't create storage volume on storage pool");
}
disksize = vol.getSize();
} else {
disksize = dskch.getSize();
vol = primaryPool.createPhysicalDisk(UUID.randomUUID()
.toString(), dskch.getSize());
}