Bug 1115350 - Certain OS types can't be set to a new VM via REST.
Summary: Certain OS types can't be set to a new VM via REST.
Keywords:
Status: CLOSED DUPLICATE of bug 1109546
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Martin Betak
QA Contact: Ilanit Stein
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-02 08:51 UTC by Ilanit Stein
Modified: 2014-07-30 10:17 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-29 09:45:33 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (655.14 KB, application/x-bzip2)
2014-07-02 08:53 UTC, Ilanit Stein
no flags Details

Description Ilanit Stein 2014-07-02 08:51:54 UTC
Description of problem:
Add VM, with certain OS types, is defined with OS other instead
It occurs for example for OS "windows_2008r2". 

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

How reproducible:
100%

VM create:
2014-06-22 16:26:11,894 - MainThread - vms - DEBUG - CREATE request content is --  url:https://jenkins-vm-25.scl.lab.tlv.redhat.com/api/vms body:<vm>
    <name>template_vm</name>
    <os type="windows_2008r2"/>
    <cluster href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c" id="db1bb452-3703-4a22-827b-f70c012bb76c">
        <name>templates_Cluster</name>
        <link href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c/networks" rel="networks"/>
        <link href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c/permissions" rel="permissions"/>
        <link href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c/glustervolumes" rel="glustervolumes"/>
        <link href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c/glusterhooks" rel="glusterhooks"/>
        <link href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c/affinitygroups" rel="affinitygroups"/>
        <cpu id="Intel Westmere Family">
            <architecture>X86_64</architecture>
        </cpu>
        <data_center href="/api/datacenters/bce668f2-5d3e-4177-9754-f3ab0dd90493" id="bce668f2-5d3e-4177-9754-f3ab0dd90493"/>
        <memory_policy>
            <overcommit percent="200"/>
            <transparent_hugepages>
                <enabled>true</enabled>
            </transparent_hugepages>
        </memory_policy>
        <scheduling_policy>
            <policy>none</policy>
        </scheduling_policy>
        <version major="3" minor="4"/>
        <error_handling>
            <on_error>migrate</on_error>
        </error_handling>
        <virt_service>true</virt_service>
        <gluster_service>false</gluster_service>
        <threads_as_cores>false</threads_as_cores>
        <tunnel_migration>false</tunnel_migration>
        <trusted_service>false</trusted_service>
        <ha_reservation>false</ha_reservation>
        <ballooning_enabled>false</ballooning_enabled>
        <ksm>
            <enabled>false</enabled>
        </ksm>
    </cluster>
    <template id="00000000-0000-0000-0000-000000000000"/>
</vm>
 
Response:
2014-06-22 16:26:12,376 - MainThread - vms - DEBUG - Response body for CREATE request is: 
<vm href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4" id="21f07877-1888-4905-89ea-eb091776d4f4">
    <actions>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/ticket" rel="ticket"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/undo_snapshot" rel="undo_snapshot"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/reboot" rel="reboot"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/migrate" rel="migrate"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/commit_snapshot" rel="commit_snapshot"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/preview_snapshot" rel="preview_snapshot"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/cancelmigration" rel="cancelmigration"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/maintenance" rel="maintenance"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/detach" rel="detach"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/move" rel="move"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/export" rel="export"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/shutdown" rel="shutdown"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/start" rel="start"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/stop" rel="stop"/>
        <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/suspend" rel="suspend"/>
    </actions>
    <name>template_vm</name>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/applications" rel="applications"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/disks" rel="disks"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/nics" rel="nics"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/cdroms" rel="cdroms"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/snapshots" rel="snapshots"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/tags" rel="tags"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/permissions" rel="permissions"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/statistics" rel="statistics"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/reporteddevices" rel="reporteddevices"/>
    <link href="/api/vms/21f07877-1888-4905-89ea-eb091776d4f4/watchdogs" rel="watchdogs"/>
    <type>desktop</type>
    <status>
        <state>down</state>
    </status>
    <memory>1073741824</memory>
    <cpu>
        <topology sockets="1" cores="1"/>
        <architecture>X86_64</architecture>
    </cpu>
    <cpu_shares>0</cpu_shares>
    <os type="other">
        <boot dev="hd"/>
    </os>
    <high_availability>
        <enabled>false</enabled>
        <priority>0</priority>
    </high_availability>
    <display>
        <type>spice</type>
        <monitors>1</monitors>
        <single_qxl_pci>false</single_qxl_pci>
        <allow_override>false</allow_override>
        <smartcard_enabled>false</smartcard_enabled>
    </display>
    <cluster href="/api/clusters/db1bb452-3703-4a22-827b-f70c012bb76c" id="db1bb452-3703-4a22-827b-f70c012bb76c"/>
    <template href="/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <stop_time>2014-06-22T16:26:12.103+03:00</stop_time>
    <creation_time>2014-06-22T16:26:12.091+03:00</creation_time>
    <origin>ovirt</origin>
    <stateless>false</stateless>
    <delete_protected>false</delete_protected>
    <sso>
        <methods>
            <method id="GUEST_AGENT"/>
        </methods>
    </sso>
    <console enabled="false"/>
    <domain>
        <name></name>
    </domain>
    <initialization>
        <configuration>
            <type>ovf</type>
            <data>&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;ovf:Envelope xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1/" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ovf:version="3.4.0.0"&gt;&lt;References/&gt;&lt;Section xsi:type="ovf:NetworkSection_Type"&gt;&lt;Info&gt;List of networks&lt;/Info&gt;&lt;Network ovf:name="Network 1"/&gt;&lt;/Section&gt;&lt;Section xsi:type="ovf:DiskSection_Type"&gt;&lt;Info&gt;List of Virtual Disks&lt;/Info&gt;&lt;/Section&gt;&lt;Content ovf:id="out" xsi:type="ovf:VirtualSystem_Type"&gt;&lt;Description&gt;&lt;/Description&gt;&lt;CreationDate&gt;2014/06/22 13:26:12&lt;/CreationDate&gt;&lt;ExportDate&gt;2014/06/22 13:26:12&lt;/ExportDate&gt;&lt;DeleteProtected&gt;false&lt;/DeleteProtected&gt;&lt;SsoMethod&gt;guest_agent&lt;/SsoMethod&gt;&lt;IsSmartcardEnabled&gt;false&lt;/IsSmartcardEnabled&gt;&lt;TimeZone&gt;&lt;/TimeZone&gt;&lt;default_boot_sequence&gt;0&lt;/default_boot_sequence&gt;&lt;Generation&gt;1&lt;/Generation&gt;&lt;VmType&gt;0&lt;/VmType&gt;&lt;MinAllocatedMem&gt;1024&lt;/MinAllocatedMem&gt;&lt;IsStateless&gt;false&lt;/IsStateless&gt;&lt;IsRunAndPause&gt;false&lt;/IsRunAndPause&gt;&lt;AutoStartup&gt;false&lt;/AutoStartup&gt;&lt;Priority&gt;0&lt;/Priority&gt;&lt;CreatedByUserId&gt;fdfc627c-d875-11e0-90f0-83df133b58cc&lt;/CreatedByUserId&gt;&lt;Name&gt;template_vm&lt;/Name&gt;&lt;TemplateId&gt;00000000-0000-0000-0000-000000000000&lt;/TemplateId&gt;&lt;TemplateName&gt;Blank&lt;/TemplateName&gt;&lt;IsInitilized&gt;false&lt;/IsInitilized&gt;&lt;Origin&gt;3&lt;/Origin&gt;&lt;DefaultDisplayType&gt;1&lt;/DefaultDisplayType&gt;&lt;TrustedService&gt;false&lt;/TrustedService&gt;&lt;OriginalTemplateId&gt;00000000-0000-0000-0000-000000000000&lt;/OriginalTemplateId&gt;&lt;OriginalTemplateName&gt;Blank&lt;/OriginalTemplateName&gt;&lt;UseLatestVersion&gt;false&lt;/UseLatestVersion&gt;&lt;Section ovf:id="21f07877-1888-4905-89ea-eb091776d4f4" ovf:required="false" xsi:type="ovf:OperatingSystemSection_Type"&gt;&lt;Info&gt;Guest Operating System&lt;/Info&gt;&lt;Description&gt;other&lt;/Description&gt;&lt;/Section&gt;&lt;Section xsi:type="ovf:VirtualHardwareSection_Type"&gt;&lt;Info&gt;1 CPU, 1024 Memeory&lt;/Info&gt;&lt;System&gt;&lt;vssd:VirtualSystemType&gt;ENGINE 3.4.0.0&lt;/vssd:VirtualSystemType&gt;&lt;/System&gt;&lt;Item&gt;&lt;rasd:Caption&gt;1 virtual cpu&lt;/rasd:Caption&gt;&lt;rasd:Description&gt;Number of virtual CPU&lt;/rasd:Description&gt;&lt;rasd:InstanceId&gt;1&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;3&lt;/rasd:ResourceType&gt;&lt;rasd:num_of_sockets&gt;1&lt;/rasd:num_of_sockets&gt;&lt;rasd:cpu_per_socket&gt;1&lt;/rasd:cpu_per_socket&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:Caption&gt;1024 MB of memory&lt;/rasd:Caption&gt;&lt;rasd:Description&gt;Memory Size&lt;/rasd:Description&gt;&lt;rasd:InstanceId&gt;2&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;4&lt;/rasd:ResourceType&gt;&lt;rasd:AllocationUnits&gt;MegaBytes&lt;/rasd:AllocationUnits&gt;&lt;rasd:VirtualQuantity&gt;1024&lt;/rasd:VirtualQuantity&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:Caption&gt;USB Controller&lt;/rasd:Caption&gt;&lt;rasd:InstanceId&gt;3&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;23&lt;/rasd:ResourceType&gt;&lt;rasd:UsbPolicy&gt;DISABLED&lt;/rasd:UsbPolicy&gt;&lt;/Item&gt;&lt;/Section&gt;&lt;/Content&gt;&lt;/ovf:Envelope&gt;</data>
        </configuration>
    </initialization>
    <placement_policy>
        <affinity>migratable</affinity>
    </placement_policy>
    <memory_policy>
        <guaranteed>1073741824</guaranteed>
        <ballooning>true</ballooning>
    </memory_policy>
    <usb>
        <enabled>false</enabled>
    </usb>
    <migration_downtime>-1</migration_downtime>
    <virtio_scsi enabled="true"/>
</vm>
 
2014-06-22 16:26:12,376 - MainThread - vms - DEBUG - Response code is valid: [200, 201, 202] 
2014-06-22 16:26:12,376 - MainThread - vms - INFO - New entity was added

Comment 1 Ilanit Stein 2014-07-02 08:53:22 UTC
Created attachment 914068 [details]
logs

Comment 2 Ilanit Stein 2014-07-02 08:54:49 UTC
engine.log, do not imply of any problem:

2014-06-22 16:26:12,051 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-3) [6c83be47-9064-4542_addVm_create] Lock Acquired to object EngineLock [exclusiveLocks= key: template_vm value: VM_NAME
, sharedLocks= ]
2014-06-22 16:26:12,089 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-3) [6c83be47-9064-4542_addVm_create] Running command: AddVmFromScratchCommand internal: false. Entities affected :  ID: db1bb452-3703-4a22-827b-f70c012bb76c Type: VdsGroups
2014-06-22 16:26:12,220 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-3) [6c83be47-9064-4542_addVm_create] Correlation ID: 6c83be47-9064-4542_addVm_create, Job ID: a151d116-dbf6-4349-a7d5-b15040e50382, Call Stack: null, Custom Event ID: -1, Message: VM template_vm was created by admin.
2014-06-22 16:26:12,230 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-3) [6c83be47-9064-4542_addVm_create] Lock freed to object EngineLock [exclusiveLocks= key: template_vm value: VM_NAME
, sharedLocks= ]

Comment 3 Martin Betak 2014-07-28 15:09:47 UTC
Ilanit: the VM ends up with "other" as OS in case you enter incorrect value as the <os></os>. In your case os windows_2008r2 is incorrect since we only support the 64 bit version (windows_2008R2x64). You can see this that in webadmin you are only able to create win08r2x64 vms.

Comment 4 Ilanit Stein 2014-07-29 06:59:16 UTC
Martin, 
OS windows_2008r2 is chosen from REST os_types list (bellow).
In case it is not supported any more, it should be removed from this list.

        <os_types>
            <os_type>windows_2008x64</os_type>
            <os_type>sles_11_ppc64</os_type>
            <os_type>unassigned</os_type>
            <os_type>other</os_type>
            <os_type>other_linux</os_type>
            <os_type>rhel_6_ppc64</os_type>
            <os_type>windows_2008r2</os_type>
            <os_type>ubuntu_12_04</os_type>
            <os_type>windows_2008</os_type>
            <os_type>other_ppc64</os_type>
            <os_type>windows_7x64</os_type>
            <os_type>windows_2003x64</os_type>
            <os_type>windows_8x64</os_type>
            <os_type>ubuntu_12_10</os_type>
            <os_type>windows_7</os_type>
            <os_type>rhel_6x64</os_type>
            <os_type>rhel_6</os_type>
            <os_type>rhel_5</os_type>
            <os_type>rhel_4x64</os_type>
            <os_type>rhel_4</os_type>
            <os_type>rhel_3</os_type>
            <os_type>windows_8</os_type>
            <os_type>windows_2012x64</os_type>
            <os_type>windows_2008R2x64</os_type>
            <os_type>windows_xp</os_type>
            <os_type>rhel_3x64</os_type>
            <os_type>windows_2003</os_type>
            <os_type>ubuntu_13_10</os_type>
            <os_type>other_linux_ppc64</os_type>
            <os_type>rhel_5x64</os_type>
            <os_type>sles_11</os_type>
            <os_type>ubuntu_13_04</os_type>
            <os_type>rhel_7x64</os_type>
        </os_types>

Comment 5 Martin Betak 2014-07-29 09:45:33 UTC
Yes You are right. This is already being addressed in #1109546

*** This bug has been marked as a duplicate of bug 1109546 ***

Comment 6 Ilanit Stein 2014-07-30 10:17:55 UTC
great, thanks!


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