Bug 1172207 - Create new vm from template that lay on other than vm cluster failed on cpu_profile error
Summary: Create new vm from template that lay on other than vm cluster failed on cpu_p...
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Doron Fediuck
QA Contact: Shira Maximov
Depends On:
Blocks: 1220125
TreeView+ depends on / blocked
Reported: 2014-12-09 15:42 UTC by Artyom
Modified: 2019-04-28 09:54 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, changing the cluster of a virtual machine failed as the CPU profile from the old cluster did not match the CPU profile of the new cluster. With this update, the CPU profile gets updated automatically to match the newly selected cluster.
Clone Of:
: 1220125 (view as bug list)
Last Closed: 2016-03-09 20:52:44 UTC
oVirt Team: SLA
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0376 0 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.6.0 2016-03-10 01:20:52 UTC
oVirt gerrit 36054 0 master MERGED restapi: wrong cpu_profile on change template cluster 2020-05-19 19:59:35 UTC
oVirt gerrit 36696 0 ovirt-engine-3.5 MERGED restapi: wrong cpu_profile on change template cluster 2020-05-19 19:59:35 UTC

Description Artyom 2014-12-09 15:42:56 UTC
Description of problem:
Have environment with two clusters(cluster_1, cluster_2), all templates placed on cluster_1, so when I want to create new vm from template on cluster_2, operation failed with error:

Status: 400
Reason: Bad Request
Detail: [Cannot add VM. CPU Profile doesn't match provided Cluster.]

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Setup environment with two clusters
2. Create template from vm on cluster_1
3. Create new vm from template on cluster_2

Actual results:
Operation failed with error.

Expected results:
Operation success, without any errors

Additional info:
My template:
<template href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82" id="366f1e3c-289f-4fc4-82d6-1872594fde82">
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/export" rel="export"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/disks" rel="disks"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/nics" rel="nics"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/cdroms" rel="cdroms"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/tags" rel="tags"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/permissions" rel="permissions"/>
<link href= "/ovirt-engine/api/templates/366f1e3c-289f-4fc4-82d6-1872594fde82/watchdogs" rel="watchdogs"/>
<topology sockets="1" cores="1"/>
<os type="other">
<boot dev="hd"/>
<cluster href= "/ovirt-engine/api/clusters/08ea0169-ae42-4e1b-bb20-839a66cd2010" id="08ea0169-ae42-4e1b-bb20-839a66cd2010"/>
<method id="GUEST_AGENT"/>
<cpu_profile href= "/ovirt-engine/api/cpuprofiles/69d5efc1-9dc0-46f3-84a4-37df7f12d432" id="69d5efc1-9dc0-46f3-84a4-37df7f12d432"/>

Create vm looks like:
    <cluster href="/api/clusters/67866b36-fd68-4106-8758-34cf31b0c3d4" id="67866b36-fd68-4106-8758-34cf31b0c3d4">
    <template id="366f1e3c-289f-4fc4-82d6-1872594fde82"/>

Comment 1 Juan Hernández 2014-12-09 16:03:22 UTC
This happens because the details of the VM, including the disk profile, are taken from the template, and the disk profile in the template is only valid for the cluster of the template. In previous similar discussions (see bug 1158458) it has been decided that rejecting this is correct behavior, and that it won't be changed, so this should probably closed as WONTFIX. However, I let that to the SLA team to decided. As a workaround you can create the VM initially in the same cluster that the template and then, with an additional request, change only the cluster.

Comment 6 Juan Hernández 2015-07-07 08:53:45 UTC
The fix for this bug is included upstream since ovirt-engine-3.6.0_alpha1, thus I'm moving to ON_QA.

Comment 8 Julie 2016-02-23 02:16:22 UTC
Hey Roy,
     I've updated the doc text. Please let me know if it is correct.
Kind regards,

Comment 10 errata-xmlrpc 2016-03-09 20:52:44 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.


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