Bug 1986726

Summary: VM imported from OVA gets thin provisioned disk despite of allocation policy set as 'preallocated'
Product: Red Hat Enterprise Virtualization Manager Reporter: Chetan Nagarkar <cnagarka>
Component: ovirt-engineAssignee: Arik <ahadas>
Status: CLOSED ERRATA QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.6CC: ahadas, emarcus, mavital, nsimsolo, shipatil
Target Milestone: ovirt-4.5.0Keywords: ZStream
Target Release: 4.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.0 Doc Type: Bug Fix
Doc Text:
When importing VM from OVA and setting the allocation policy to Preallocated, the disks were imported as Thin provisioned. In this release, the selected allocation policy is followed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-26 16:22:29 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:
Bug Depends On: 2076465, 2076474    
Bug Blocks:    

Comment 2 Arik 2021-08-02 11:11:40 UTC
(In reply to Arik from comment #1)
> Yeah, we don't respect the allocation policy when importing from OVA [1]
> 
> [1]
> https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.4.8.1/backend/
> manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/
> ImportVmFromOvaCommand.java#L107-L109

Adding to the above that we don't want to change the format within the OVA because we wish to preserve sparseness

Comment 9 Nisim Simsolo 2022-05-02 17:22:44 UTC
Verified:
ovirt-engine-4.5.0.5-0.7.el8ev
vdsm-4.50.0.13-1.el8ev.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+14707+5aa4b42d.x86_64
libvirt-daemon-8.0.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64

Verification scenario:
1. Export VM with preallocated disk as OVA.
   Import OVA, select preallocated policy in import dialog.
   Verify VM imported, verify disk policy is preallocated.
   Run VM and verify VM is running properly.
2. Export VM with thin provision disk as OVA.
   Import OVA, select preallocated policy in import dialog.
   Verify VM imported, verify disk policy is preallocated.
   Run VM and verify VM is running properly.
3. Export VM with preallocated disk as OVA.
   Import OVA, select "auto detect" policy in import dialog.
   Verify VM imported, verify disk policy is preallocated.
   Run VM and verify VM is running properly.
4. Export VM with thin provision disk as OVA.
   Import OVA, select "auto detect" policy in import dialog.
   Verify VM imported, verify disk policy is thin provision.
   Run VM and verify VM is running properly.

Comment 14 errata-xmlrpc 2022-05-26 16:22:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4711