Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1598747 - Fix displaying disk type of a VM created from template and passing clone parameter to RHV
Summary: Fix displaying disk type of a VM created from template and passing clone para...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.9.0
Hardware: All
OS: All
Target Milestone: GA
: 5.10.0
Assignee: Boriso
QA Contact: Ilanit Stein
Depends On:
Blocks: 1595269 1621449
TreeView+ depends on / blocked
Reported: 2018-07-06 11:28 UTC by Felix Dewaleyne
Modified: 2019-02-11 14:02 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: We did not pass a "clone" parameter when provisioning a VM from a template. Consequence: All vms were provisioned as dependent Fix: From now on we pass clone => true when the user selects "preallocated" storage, and clone => false when "thin" or "default" is selected. Result: When the user selects the "preallocated" storage type the VM will be provisioned as "clone/independent". It will be provisioned as "dependent" otherwise. Please note this is not as granular selection as on RHV, but it simplifies the choice for the client.
Clone Of:
: 1621449 (view as bug list)
Last Closed: 2019-02-11 14:02:17 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:

Attachments (Terms of Use)
verification_details (deleted)
2018-09-06 11:01 UTC, Ilanit Stein
no flags Details

System ID Priority Status Summary Last Updated
Github ManageIQ manageiq-providers-ovirt pull 277 None None None 2018-08-30 12:53:51 UTC
Github ManageIQ manageiq-providers-ovirt pull 282 None None None 2018-08-30 12:52:10 UTC
Red Hat Bugzilla 1403183 None POST Cloned VMs created from template with "Raw" format are having "Thin Provision" Allocation Policy 2019-03-12 18:03:50 UTC

Internal Links: 1403183

Description Felix Dewaleyne 2018-07-06 11:28:51 UTC
Description of problem:
provisions made against a rhev template are always thin / dependant and never clone/independant, a change in behaviour from 5.8 that generates a lot of extra work as converting the vm requires exporting and importing it.

Version-Release number of selected component (if applicable):
cfme 5.9.2
rhev 4.1.2

How reproducible:
all the time

Steps to Reproduce:
1. create a catalog item that will provision a rhel 7 template. there should be no snapshots.
2. make sure you have set the provision to be "native clone" and under hardware do   a full copy of the storage, not thin
3. send the provision.

Actual results:
the resulting vm in the provider shows  under "template" the info "thin/dependant"

Expected results:
the resulting vm in the provider shows under "template" the info "clone/independant" 

Additional info:
- rhev 4.1
- behaviour introduced in 5.9
- documentation suggest this should be a full clone not a native clone as no snapshots are presents.
- a service provision is used for the request

Comment 4 Greg McCullough 2018-07-06 13:18:13 UTC
Please provide logs from that show the provision task it would be best if it includes "Clone Options:" and "Prov Options:" logging.

There are flags in provisioning that control if it is a "linked_clone"

and the disk_type:

Comment 10 Greg McCullough 2018-07-25 12:13:43 UTC
In the evm.log we log the parameters being passed to the provider using the header "Clone Options:" so I would suggest looking of that in the logs.

The code that runs that is here:

Then the same parameters are sent to the ovirt service a few lines down on line 84.

There should be useful details in the rhevm.log on the appliance as well.  The logging level for this file can be adjusted in the Advanced settings, the default value is "info".  Depending on the level of output (I am not that familiar with it) you may need to specify "debug" here, but I would suggest trying with info first and changing if needed.

Snippet for the Advanced settings of the UI:

  :level_rhevm: info

Comment 18 Martin Perina 2018-08-16 13:17:40 UTC
We have found out that this is UI only issue, because reporting of disk being thin or preallocated is based on sparseness feature instead of disk format (RHV webadmin has the same issue tracked in BZ1615287). So if you create a VM template with preallocated disk and then create VM from this template, VM's disk will be preallocated even though it's being reported as thin, because the reporting is bad.

Because of that reducing severity to medium and targeting 5.9.5 (because customer ticket is attached).

Comment 19 CFME Bot 2018-08-16 13:48:20 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
commit a0002db568b408bf57877489994465ecc6146909
Author:     Boris Odnopozov <>
AuthorDate: Thu Aug 16 07:45:37 2018 -0400
Commit:     Boris Odnopozov <>
CommitDate: Thu Aug 16 07:45:37 2018 -0400

    Fix disk_type attribute

    We were calculating the disk_type based on the sparse property of the
    disk. This is incorrect, it should actually be calculated based on the
    format property.


 app/models/manageiq/providers/redhat/infra_manager/refresh/parse/parser.rb | 2 +-
 app/models/manageiq/providers/redhat/infra_manager/refresh/parse/strategies/vm_inventory.rb | 2 +-
 app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb | 2 +-
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_graph_spec.rb | 4 +-
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_4_async_spec.rb | 4 +-
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_target_vm_4_spec.rb | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

Comment 23 CFME Bot 2018-08-21 17:28:22 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
commit 8dd133f077156f44b5fb17f4f9e9bc342f83e655
Author:     Boris Odnopozov <>
AuthorDate: Mon Aug 20 05:03:05 2018 -0400
Commit:     Boris Odnopozov <>
CommitDate: Mon Aug 20 05:03:05 2018 -0400

    Fix provisioning independent VM

    We ignored the clone_type parameter during provisioning from template.


 app/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4.rb | 2 +-
 app/models/manageiq/providers/redhat/infra_manager/provision/cloning.rb | 14 +-
 spec/models/manageiq/providers/redhat/infra_manager/provision_spec.rb | 19 +-
 3 files changed, 32 insertions(+), 3 deletions(-)

Comment 27 CFME Bot 2018-08-30 14:14:00 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
commit e22fe21c86d8a40b94b66c59003caf25aa731ea3
Author:     Boris Odnopozov <>
AuthorDate: Wed Aug 29 03:59:42 2018 -0400
Commit:     Boris Odnopozov <>
CommitDate: Wed Aug 29 03:59:42 2018 -0400

    Fix setting storage attributes during vm provision

    We did not pass the sparse and storage_domain parameters when
    provisioning a VM using version 4 of the sdk.


 app/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4.rb | 43 +-
 spec/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4_spec.rb | 67 +
 2 files changed, 103 insertions(+), 7 deletions(-)

Comment 28 Ilanit Stein 2018-09-06 11:00:13 UTC
Verified on CFME-
Tested the attached NFS/ISCSI options: 'clone_bug_1598747_verification.png'

Comment 29 Ilanit Stein 2018-09-06 11:01:20 UTC
Created attachment 1481260 [details]

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