Bug 1625543 - After importing KVM VM the actual size is bigger than the virtual size
Summary: After importing KVM VM the actual size is bigger than the virtual size
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.2.0
Hardware: All
OS: Linux
Target Milestone: ovirt-4.3.0
: ---
Assignee: Dan Kenigsberg
QA Contact: Nisim Simsolo
: 1587892 (view as bug list)
Depends On: 1587892 1628477
TreeView+ depends on / blocked
Reported: 2018-09-05 07:49 UTC by Steven Rosenberg
Modified: 2020-08-03 15:35 UTC (History)
22 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
When Importing KVM VMs and Sparseness is specified, the actual Disk Size should be preserved to improve the performance of the Import as well as to conserve disk space on the Destination Storage Domain. Previously, when you set thin provisioning for importing a KVM-based VM into a Red Hat Virtualization environment, the disk size of the VM within the Red Hat Virtualization storage domain was inflated to the volume size or larger, even when the original KVM-based VM was much smaller. KVM Sparseness is now supported so that when you import a virtual machine with thin provisioning enabled into a Red Hat Virtualization environment, the disk size of the original virtual machine image is preserved. However, KVM Sparseness is not supported for Block Storage Domains.
Clone Of: 1587892
: 1628477 (view as bug list)
Last Closed: 2019-05-08 12:38:08 UTC
oVirt Team: Virt
Target Upstream Version:
mavital: needinfo+
lsvaty: testing_plan_complete-

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:1085 0 None None None 2019-05-08 12:38:29 UTC
oVirt gerrit 94109 0 'None' ABANDONED virt: vm: Added Sparse support for Import 2021-02-15 15:18:19 UTC
oVirt gerrit 94110 0 'None' MERGED virt: vm: Added Sparse support for Import 2021-02-15 15:18:19 UTC
oVirt gerrit 94169 0 'None' MERGED virt: vm: Added Sparse support for Import 2021-02-15 15:18:19 UTC

Comment 7 Steven Rosenberg 2018-09-05 14:15:43 UTC
1. To test this feature, one needs to first set up a KVM Host. This may be performed via the Virtual Machine Manager which can connect to a remote machine for saving KVM VMs.

One can check the Volume and Disk size of the VM image file via the following command:

qemu-img info  <file Image>

One can find the image file here:


A sample output is as follows:

[root@sla-leonard ~]# qemu-img info /var/lib/libvirt/images/generic.qcow2
image: /var/lib/libvirt/images/generic.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 3.3M
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: true
    refcount bits: 16
    corrupt: false

2. Enter the WebAdmin oVirt Open Visualization Manager. Enter the Compute >> Virtual Machines tab. At the far right on the screen after the Create Snapshot button are three vertical dots. Please press on the button with the three vertical dots and choose Import on the drop down list. Choose the Data Center, Change the Source Drop Down List to KVM (Via Libvirt). Enter the URI, User and Password of the KVM Host and click on the Load button.

Note: at least one VM has to be running in the Data Center.

The URI should be in the following format (replacing HostName with the IP Address or Host Name of the KVM Host):


3. One should see the list of virtual machines available in the “Virtual Machines on Source” List Box on the left side. Please choose the VMs to be imported to oVirt, press the right arrow button so that the VMs chosen appear in the “Virtual Machines to Import” List Box on the right side and press the Next button.

4. Ensure the Allocation Policy is set to “Thin Provision” and choose the OK button.

5. Wait for the Import to succeed.

6. One can check the file on the storage domain to verify the Disk Size matches the original.

Comment 9 Michal Skrivanek 2018-09-07 06:24:02 UTC

Comment 11 Michal Skrivanek 2018-09-14 14:40:32 UTC
*** Bug 1587892 has been marked as a duplicate of this bug. ***

Comment 12 Nisim Simsolo 2018-10-25 11:41:41 UTC

Verification scenario:
Polarion TC added to external trackers.

Comment 13 RHV bug bot 2018-12-10 15:13:31 UTC
INFO: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Project 'vdsm'/Component 'ovirt-engine' mismatch]

For more info please contact: rhv-devops@redhat.com

Comment 19 errata-xmlrpc 2019-05-08 12:38:08 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, and where to find the updated
files, follow the link below.

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


Comment 20 Daniel Gur 2019-08-28 13:13:30 UTC

Comment 21 Daniel Gur 2019-08-28 13:17:43 UTC

Note You need to log in before you can comment on or make changes to this bug.