Bug 1129634

Summary: Cannot export VM. Disk configuration (COW Preallocated) is incompatible with the storage domain type.
Product: Red Hat Enterprise Virtualization Manager Reporter: Prasad Mukhedkar <pmukhedk>
Component: ovirt-engineAssignee: Tal Nisan <tnisan>
Status: CLOSED ERRATA QA Contact: Elad <ebenahar>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: amureini, ebenahar, ecohen, iheim, lbopf, lpeer, rbalakri, Rhev-m-bugs, scohen, sherold, tnisan, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_rc1.1 Doc Type: Bug Fix
Doc Text:
Previously, sparse (thinly provisioned) virtual machine disks that were imported from a file storage domain to a block domain would change format to COW preallocated. Disk images in this format could not be exported, because the disk configuration was incompatible with the storage domain type. Now, a fix introduced in https://bugzilla.redhat.com/show_bug.cgi?id=1116486 converts the images to COW sparse instead, and images can be successfully exported.
Story Points: ---
Clone Of:
: 1132084 1132417 (view as bug list) Environment:
Last Closed: 2015-02-11 18:07:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1132084, 1132086, 1132417, 1135112, 1142923, 1156165    

Description Prasad Mukhedkar 2014-08-13 11:59:37 UTC
Description of problem:

Unable to export a virtual machine (with prealloacted disk ) from iscsi storage domain to NFS Export. When  "export" action is initiated it fails with below error event :

----
Cannot export VM. Disk configuration (COW Preallocated) is incompatible with the storage domain type.
----

and below errors in engine.log :

2014-08-13 07:26:41,973 INFO  [org.ovirt.engine.core.bll.ExportVmCommand] (ajp-/127.0.0.1:8702-7) [7a3ce0a] Lock Acquired to object EngineLock [exclusiveLocks= key: 68c90755-3ae2-48cd-92b7-836e9eebabca value: VM
[-]

2014-08-13 07:26:42,169 WARN  [org.ovirt.engine.core.bll.ExportVmCommand] (ajp-/127.0.0.1:8702-7) [7a3ce0a] CanDoAction of action ExportVm failed. Reasons:VAR__ACTION__EXPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED,$volumeFormat COW,$volumeType Preallocated

-No apparent errors on spm hypervisor 


Version-Release number of selected component (if applicable):
rhevm-3.4.1-0.30.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. RHEV-M + ISCSI storage domain
2. Create a virtual machine with pre-alloacted allocation policy.
3. Try to export the vm to export storage domain.

Actual results:


Expected results:
Export fails with error :

Cannot export VM. Disk configuration (COW Preallocated) is incompatible with the storage domain type.

Additional info:

VM should get exported irrespective whether it has thin or think disk.

Comment 2 Prasad Mukhedkar 2014-08-14 16:00:51 UTC
I believe this bug somehow related to it. https://bugzilla.redhat.com/show_bug.cgi?id=1116486

Comment 3 Tal Nisan 2014-08-20 11:27:24 UTC
Ok, managed to find exact steps to reproduce:

Create a VM with a thinly provision disk on an NFS domain
Export the VM to an export domain
Import the VM, in the disk allocation choose a block domain
Disk will be imported as Cow-Preallocated and export will not be possible for it.

The bug causing it was fixed in BZ 1111655 so this should not happen in this process anymore, we are working on a fix for the already existing Cow-Preallocated disks

Comment 5 Elad 2014-08-26 06:51:14 UTC
Since there is no such disk combination as COW preallocated in the system, and the only way to achieve it would be by reproducing this  https://bugzilla.redhat.com/show_bug.cgi?id=1130753, I'm not sure how can we try to reproduce it. I tried to test it by reproducing https://bugzilla.redhat.com/show_bug.cgi?id=1130753. I got a COW preallocated disk by importing a sparse disk to a block domain. The disk did turn to COW preallocated. My plan was to leave this disk in the system and to upgrade RHEVM to the latest build where the bug should be fixed and see that exporting a COW preallocated disk will work.
The problem is that after the upgrade, the COW preallocated disk turned to sparse.

Tal, do you have any idea how to get a COW preallocated disk in the system so we will be able to test this?

Comment 6 Tal Nisan 2014-08-26 08:50:16 UTC
Since the bug fix it shouldn't happen so basically the fact that it doesn't happen means that the bug was indeed fixed

Comment 7 Elad 2014-08-26 09:10:02 UTC
After a discussion with Tal, I'm moving the bug to VERIFIED because the fix here is that the COW preallocated disk,  created because of https://bugzilla.redhat.com/show_bug.cgi?id=1130753 is converted to sparse after the upgrade to the build where the bug is fixed.

Verified by reproducing https://bugzilla.redhat.com/show_bug.cgi?id=1130753, upgrading from ovirt-3.5 RC1 to RC2. Checked that the disk was converted to sparse and exported it the the export domain. The export succeeded.

Comment 8 Elad 2014-08-26 09:15:06 UTC
CORRECTION:
Verified by reproducing https://bugzilla.redhat.com/show_bug.cgi?id=1130753, upgrading from ovirt-3.5 RC1 to RC1.1. Checked that the disk was converted to sparse and exported it the the export domain. The export succeeded.

Comment 9 Allon Mureinik 2014-11-26 20:57:38 UTC
Tal, can you please provide the doctext?

Comment 11 errata-xmlrpc 2015-02-11 18:07:46 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.

https://rhn.redhat.com/errata/RHSA-2015-0158.html