[ https://issues.apache.org/jira/browse/CLOUDSTACK-6514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Tutkowski reassigned CLOUDSTACK-6514: ------------------------------------------ Assignee: (was: Mike Tutkowski) > VMware: Is space allocated for snapshots counted correctly? > ----------------------------------------------------------- > > Key: CLOUDSTACK-6514 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6514 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: VMware > Affects Versions: 4.4.0 > Environment: Ubuntu 12.04 for CloudStack Management Server (just one > in this config) > Two ESXi 5.1 hosts > Reporter: Mike Tutkowski > Priority: Major > Fix For: 4.5.3, Future > > > long CapacityManager.getAllocatedPoolCapacity(StoragePoolVO, VMTemplateVO) > may not add up allocated space in the passed-in storage pool properly for > VMware. > The idea is to count the allocated space of all non-destroyed volumes and the > corresponding allocated space of their snapshots, if any. In addition, > templates on the storage pool should be taken into consideration. > I think the number that is in the vm_snapshot_chain_size column of the > volumes table is not correctly calculated (and this number is used by the > getAllocatedPoolCapacity method when it invokes another method). > This is how it currently works when you have a new VM and you take a snapshot > of it for the first time (not taking a snapshot of memory): > These are the relevant files and their respective sizes: > ROOT-21-000001-delta.vmdk (16,785,408 bytes) > ROOT-21-000001.vmdk (316 bytes) > ROOT-21-flat.vmdk (2,147,483,648 bytes) > ROOT-21.vmdk (515 bytes) > i-2-21-VM-Snapshot1.vmsn (28,310 bytes) > We include these files for the vm_snapshot_chain_size: > ROOT-21-flat.vmdk (2,147,483,648 bytes) > ROOT-21.vmdk (515 bytes) > i-2-21-VM-Snapshot1.vmsn (28,310 bytes) > I think we should be counting these instead: > ROOT-21-000001-delta.vmdk (16,785,408 bytes) > ROOT-21-000001.vmdk (316 bytes) > i-2-21-VM-Snapshot1.vmsn (28,310 bytes) > My thinking is that when we add up the total space that this volume consumes > that we've already taking into account 2,147,483,648 bytes because this value > is stored in the size column of the volumes table. > I would think we'd want to add up the sizes of the VMSN files and the sizes > of the -xxxxxx files to arrive at vm_snapshot_chain_size? > Any thoughts on this? > Thanks! -- This message was sent by Atlassian JIRA (v7.6.3#76005)