Bug 1109546 - Create vm via REST with parameter <os type="windows_2008r2"/> will create vm with <os type="other"/>
Summary: Create vm via REST with parameter <os type="windows_2008r2"/> will create vm ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Martin Betak
QA Contact: Petr Kubica
URL:
Whiteboard: virt
: 1115350 (view as bug list)
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-06-15 07:59 UTC by Artyom
Modified: 2015-02-17 08:27 UTC (History)
9 users (show)

Fixed In Version: vt2.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 08:27:55 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 30767 0 master MERGED restapi: Make OsType enum consistent with OsRepository Never
oVirt gerrit 31904 0 ovirt-engine-3.5 MERGED restapi: Make OsType enum consistent with OsRepository Never

Description Artyom 2014-06-15 07:59:38 UTC
Description of problem:
Create vm via REST with parameter <os type="windows_2008r2"/> will create vm with <os type="other"/>, from some reason engine change value "windows_2008r2" with value "other"

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

How reproducible:
Always

Steps to Reproduce:
1. Create new vm via REST:
<vm>
<name>vm2</name>
<cluster>
<name>cluster_name</name>
</cluster>
<template>
<name>Blank</name>
</template>
<os type="windows_2008r2"/>
</vm>

2.
3.

Actual results:
Vm with <os type="other"/>

Expected results:
Vm with <os type="windows_2008r2"/>

Additional info:
I also can't see windows_2008r2 in /api/capabilities for 3.4 version

Comment 1 Juan Hernández 2014-06-16 08:48:21 UTC
Apparently the list of operating systems provided in /capabilities isn't the same list that is used to check the value given by the caller. In /capabilities "windows_2008r2" is one of the values:

  <os_types>
    <os_type>UNASSIGNED</os_type>
    <os_type>WINDOWS_XP</os_type>
    <os_type>WINDOWS_2003</os_type>
    <os_type>WINDOWS_2008</os_type>
    <os_type>OTHER_LINUX</os_type>
    <os_type>OTHER</os_type>
    <os_type>RHEL_5</os_type>
    <os_type>RHEL_4</os_type>
    <os_type>RHEL_3</os_type>
    <os_type>WINDOWS_2003X64</os_type>
    <os_type>WINDOWS_7</os_type>
    <os_type>WINDOWS_7X64</os_type>
    <os_type>RHEL_5X64</os_type>
    <os_type>RHEL_4X64</os_type>
    <os_type>RHEL_3X64</os_type>
    <os_type>WINDOWS_2008X64</os_type>
    <os_type>WINDOWS_2008R2</os_type>  <-- Here it is, case isn't relevant
    <os_type>RHEL_6</os_type>
    <os_type>RHEL_6X64</os_type>
    <os_type>WINDOWS_8</os_type>
    <os_type>WINDOWS_8X64</os_type>
    <os_type>WINDOWS_2012X64</os_type>
  </os_types>

But when checking the OS type the OSRepositoryImpl.idToUnameLookup class contains the following:

  {
    0=other,
    1=windows_xp,
    3=windows_2003,
    4=windows_2008,
    5=other_linux,
    7=rhel_5,
    8=rhel_4,
    9=rhel_3,
    10=windows_2003x64,
    11=windows_7,
    12=windows_7x64,
    13=rhel_5x64,
    14=rhel_4x64, 
    15=rhel_3x64, 
    1001=other_ppc64, 
    17=windows_2008R2x64,  <-- This is the closest, but not equal
    16=windows_2008x64, 
    1003=rhel_6_ppc64, 
    19=rhel_6x64, 
    1002=other_linux_ppc64, 
    18=rhel_6, 
    21=windows_8x64, 
    20=windows_8, 
    1004=sles_11_ppc64, 
    23=windows_2012x64,
    24=rhel_7x64, 
    1255=ubuntu_13_10, 
    1254=ubuntu_13_04, 
    1253=ubuntu_12_10, 
    1252=ubuntu_12_04, 
    1193=sles_11
  }

I believe that these two lists should match.

Comment 2 Martin Betak 2014-07-29 09:45:33 UTC
*** Bug 1115350 has been marked as a duplicate of this bug. ***

Comment 4 Petr Kubica 2014-09-15 08:53:27 UTC
Verified 
with: <os type="windows_2008r2x64"/>
in: 3.5.0-0.10.master.el6ev

Comment 5 Petr Kubica 2014-09-15 08:59:38 UTC
EDIT: with <os type="windows_2008R2x64"/>

Comment 6 Omer Frenkel 2015-02-17 08:27:55 UTC
RHEV-M 3.5.0 has been released


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