Bug 1422087

Summary: wrong VMware OVA import capacity
Product: [oVirt] vdsm Reporter: Michal Skrivanek <michal.skrivanek>
Component: GeneralAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.18.30CC: bugs, nsimsolo
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
Target Release: 4.19.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:44:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Skrivanek 2017-02-14 12:46:30 UTC
When importing from OVA, we mistakenly assume that the disk capacity is always stored in GB. This is untrue and can mean that the disk capacity reported to engine is incorrect. This can is some cases cause the import to fail on storage errors because engine tries to prepare image in order of magnitudes larger than is necessary. The correct units of the ovf:capacity attribute are stored in ovf:capacityAllocationUnits attribute. The correct flow is to parse the units and then properly scale the reported capacity.

Comment 1 Nisim Simsolo 2017-03-19 14:25:46 UTC
Verification builds:
ovirt-engine-4.1.1.4-0.1.el7
vdsm-4.19.7-1.el7ev.x86_64
libvirt-client-2.0.0-10.el7_3.5.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64
sanlock-3.4.0-1.el7.x86_64
virt-v2v-1.32.7-3.el7_3.2.x86_64

Verification scenario: 
1. Create VMware VM with disk size smaller than 1GB.
2. Install OS on the VM.
3. Using VMware - vSphere client, export VM to OVF template (formatted as OVA).
4. Import OVA to RHEV.
5. Verify import succeeded, disk size in RHEV is shown as < 1 GB
6. Run VM, Verify VM is running properly and disk size (used/available) is equal to the original VM disk values.
7. Repeat test steps 1-6 this time import the VM itself and not the OVA.