Bug 1047965 - OVF descriptor file data via the REST API for the Active VM
Summary: OVF descriptor file data via the REST API for the Active VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Liron Aravot
QA Contact: Raz Tamir
URL:
Whiteboard: storage
: 1063891 (view as bug list)
Depends On:
Blocks: 1060575
TreeView+ depends on / blocked
 
Reported: 2014-01-02 18:22 UTC by Satya
Modified: 2016-02-10 17:20 UTC (History)
11 users (show)

Fixed In Version: ovirt-3.4.0-beta3
Clone Of:
: 1060575 (view as bug list)
Environment:
Last Closed: 2014-03-31 12:32:54 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 24287 0 None None None Never
oVirt gerrit 24410 0 None None None Never

Description Satya 2014-01-02 18:22:22 UTC
Description of problem:

This is a request for enhancement. The 3.3 REST api for snapshots provides the ovf descriptor data associated with the snapshots for all snapshots EXCEPT the Active VM.

This request is to enhance the API to include the OVF data for the Active VM as well.


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


How reproducible:
https://<server>/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<snapshot href="/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251" id="acea3d48-155b-4e6b-9edb-ab9d5c148251">
    <actions>
        <link href="/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251/undo" rel="undo"/>
        <link href="/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251/preview" rel="preview"/>
        <link href="/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251/commit" rel="commit"/>
        <link href="/api/vms/39e003b7-cc49-45b2-97fd-be3119b02849/snapshots/acea3d48-155b-4e6b-9edb-ab9d5c148251/restore" rel="restore"/>
    </actions>
    <description>Active VM</description>
    <type>active</type>
    <date>2013-12-26T09:34:46.074-08:00</date>
    <snapshot_status>ok</snapshot_status>
    <persist_memorystate>false</persist_memorystate>
</snapshot>


For regular snapshots, the OVF file is available in the response.

Comment 1 Itamar Heim 2014-01-12 08:43:15 UTC
setting target release to current version for consideration and review. please do not push non-RFE bugs to an undefined target release to make sure bugs are reviewed for relevancy, fix, closure, etc.

Comment 3 Juan Hernández 2014-02-03 15:25:49 UTC
Satya, can you elaborate on what you mean by the "ovf descriptor data"? Can you provide an example of the data that you see in a regular snapshot and not in the active VM?

Comment 4 Satya 2014-02-03 23:11:17 UTC
This is to extend Liron's fix

http://gerrit.ovirt.org/#/c/16176/

to include the Live VM.

Comment 5 Satya 2014-02-03 23:23:36 UTC
Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<snapshot href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403" id="e8eab53a-8823-41d4-96f2-182d7c15d403">
    <actions>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/preview" rel="preview"/>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/undo" rel="undo"/>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/restore" rel="restore"/>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/commit" rel="commit"/>
    </actions>
    <description>snap1</description>
    <type>regular</type>
    <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.3.0.0"&gt;&lt;References&gt;&lt;File ovf:href="da88e9da-7272-43b3-9645-40d11362343d/171aad00-c87f-4601-93c0-9dae0850f07b" ovf:id="171aad00-c87f-4601-93c0-9dae0850f07b" ovf:size="1073741824" ovf:description=""/&gt;&lt;Nic ovf:id="c16d55e0-a1c1-4873-8bde-a0df1f031a44"/&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;Disk ovf:diskId="171aad00-c87f-4601-93c0-9dae0850f07b" ovf:size="1" ovf:actual_size="0" ovf:vm_snapshot_id="e8eab53a-8823-41d4-96f2-182d7c15d403" ovf:parentRef="" ovf:fileRef="da88e9da-7272-43b3-9645-40d11362343d/171aad00-c87f-4601-93c0-9dae0850f07b" ovf:format="http://www.vmware.com/specifications/vmdk.html#sparse" ovf:volume-format="RAW" ovf:volume-type="Sparse" ovf:disk-interface="VirtIO" ovf:boot="false" ovf:disk-alias="bcd_Disk2" ovf:disk-description="ss" ovf:wipe-after-delete="false"/&gt;&lt;/Section&gt;&lt;Content ovf:id="out" xsi:type="ovf:VirtualSystem_Type"&gt;&lt;Description&gt;sdf&lt;/Description&gt;&lt;Domain&gt;&lt;/Domain&gt;&lt;CreationDate&gt;2014/02/03 20:52:24&lt;/CreationDate&gt;&lt;ExportDate&gt;2014/02/03 21:06:37&lt;/ExportDate&gt;&lt;DeleteProtected&gt;false&lt;/DeleteProtected&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;3&lt;/Generation&gt;&lt;VmType&gt;1&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;CreatedByUserId&gt;fdfc627c-d875-11e0-90f0-83df133b58cc&lt;/CreatedByUserId&gt;&lt;Name&gt;bcd&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;Section ovf:id="4bd7cf43-a249-4003-917a-24c081cc073f" 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.3.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;bcd_Disk2&lt;/rasd:Caption&gt;&lt;rasd:InstanceId&gt;171aad00-c87f-4601-93c0-9dae0850f07b&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;17&lt;/rasd:ResourceType&gt;&lt;rasd:HostResource&gt;da88e9da-7272-43b3-9645-40d11362343d/171aad00-c87f-4601-93c0-9dae0850f07b&lt;/rasd:HostResource&gt;&lt;rasd:Parent&gt;00000000-0000-0000-0000-000000000000&lt;/rasd:Parent&gt;&lt;rasd:Template&gt;00000000-0000-0000-0000-000000000000&lt;/rasd:Template&gt;&lt;rasd:ApplicationList&gt;&lt;/rasd:ApplicationList&gt;&lt;rasd:StoragePoolId&gt;5849b030-626e-47cb-ad90-3ce782d831b3&lt;/rasd:StoragePoolId&gt;&lt;rasd:CreationDate&gt;2014/02/03 20:56:04&lt;/rasd:CreationDate&gt;&lt;rasd:LastModified&gt;2014/02/03 20:56:04&lt;/rasd:LastModified&gt;&lt;rasd:last_modified_date&gt;2014/02/03 21:06:37&lt;/rasd:last_modified_date&gt;&lt;Type&gt;disk&lt;/Type&gt;&lt;Device&gt;disk&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;true&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;false&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:Caption&gt;Ethernet adapter on rhevm&lt;/rasd:Caption&gt;&lt;rasd:InstanceId&gt;c16d55e0-a1c1-4873-8bde-a0df1f031a44&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;10&lt;/rasd:ResourceType&gt;&lt;rasd:OtherResourceType&gt;rhevm&lt;/rasd:OtherResourceType&gt;&lt;rasd:ResourceSubType&gt;3&lt;/rasd:ResourceSubType&gt;&lt;rasd:Connection&gt;rhevm&lt;/rasd:Connection&gt;&lt;rasd:Linked&gt;true&lt;/rasd:Linked&gt;&lt;rasd:Name&gt;nic1&lt;/rasd:Name&gt;&lt;rasd:MACAddress&gt;00:14:22:01:23:45&lt;/rasd:MACAddress&gt;&lt;rasd:speed&gt;1000&lt;/rasd:speed&gt;&lt;Type&gt;interface&lt;/Type&gt;&lt;Device&gt;bridge&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;false&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;false&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&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;Item&gt;&lt;rasd:Caption&gt;Graphical Controller&lt;/rasd:Caption&gt;&lt;rasd:InstanceId&gt;28fd608d-4df8-46b0-b9ce-39db1fad525a&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;20&lt;/rasd:ResourceType&gt;&lt;rasd:VirtualQuantity&gt;1&lt;/rasd:VirtualQuantity&gt;&lt;rasd:SinglePciQxl&gt;false&lt;/rasd:SinglePciQxl&gt;&lt;Type&gt;video&lt;/Type&gt;&lt;Device&gt;qxl&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;true&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;true&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&gt;&lt;SpecParams&gt;&lt;vram&gt;32768&lt;/vram&gt;&lt;heads&gt;1&lt;/heads&gt;&lt;/SpecParams&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:Caption&gt;CDROM&lt;/rasd:Caption&gt;&lt;rasd:InstanceId&gt;f6adb532-6c67-47d4-81b5-ee3a72908bdb&lt;/rasd:InstanceId&gt;&lt;rasd:ResourceType&gt;15&lt;/rasd:ResourceType&gt;&lt;Type&gt;disk&lt;/Type&gt;&lt;Device&gt;cdrom&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;true&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;true&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&gt;&lt;SpecParams&gt;&lt;path&gt;&lt;/path&gt;&lt;/SpecParams&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:ResourceType&gt;0&lt;/rasd:ResourceType&gt;&lt;rasd:InstanceId&gt;2f4808de-56f4-433a-bf17-70eb6f05a23b&lt;/rasd:InstanceId&gt;&lt;Type&gt;controller&lt;/Type&gt;&lt;Device&gt;virtio-scsi&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;true&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;false&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&gt;&lt;/Item&gt;&lt;Item&gt;&lt;rasd:ResourceType&gt;0&lt;/rasd:ResourceType&gt;&lt;rasd:InstanceId&gt;a2c32c20-614b-43f1-b0c6-9a4a5cfbbb3f&lt;/rasd:InstanceId&gt;&lt;Type&gt;balloon&lt;/Type&gt;&lt;Device&gt;memballoon&lt;/Device&gt;&lt;rasd:Address&gt;&lt;/rasd:Address&gt;&lt;BootOrder&gt;0&lt;/BootOrder&gt;&lt;IsPlugged&gt;true&lt;/IsPlugged&gt;&lt;IsReadOnly&gt;true&lt;/IsReadOnly&gt;&lt;Alias&gt;&lt;/Alias&gt;&lt;SpecParams&gt;&lt;model&gt;virtio&lt;/model&gt;&lt;/SpecParams&gt;&lt;/Item&gt;&lt;/Section&gt;&lt;/Content&gt;&lt;/ovf:Envelope&gt;
            </data>
        </configuration>
    </initialization>
    <vm id="4bd7cf43-a249-4003-917a-24c081cc073f">
        <name>bcd</name>
        <description>sdf</description>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/cdroms" rel="cdroms"/>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/disks" rel="disks"/>
        <link href="/api/vms/4bd7cf43-a249-4003-917a-24c081cc073f/snapshots/e8eab53a-8823-41d4-96f2-182d7c15d403/nics" rel="nics"/>
        <type>server</type>
        <status>
            <state>down</state>
        </status>
        <memory>1073741824</memory>
        <cpu>
            <topology sockets="1" cores="1"/>
        </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 id="99408929-82cf-4dc7-a532-9d998063fa95"/>
        <template id="00000000-0000-0000-0000-000000000000"/>
        <creation_time>2014-02-03T12:52:24.000-08:00</creation_time>
        <origin>ovirt</origin>
        <stateless>false</stateless>
        <delete_protected>false</delete_protected>
        <timezone></timezone>
        <placement_policy>
            <affinity>migratable</affinity>
        </placement_policy>
        <memory_policy>
            <guaranteed>1073741824</guaranteed>
        </memory_policy>
        <usb>
            <enabled>false</enabled>
        </usb>
    </vm>
    <date>2014-02-03T13:06:37.185-08:00</date>
    <snapshot_status>ok</snapshot_status>
    <persist_memorystate>false</persist_memorystate>
</snapshot>

Comment 6 Juan Hernández 2014-02-04 09:46:24 UTC
This OVF information is presented by the RESTAPI if it is available in the database, the limitation is that for the active VM the database doesn't populate the vm_configuration column of the snapshots table. Once that column is populated the RESTAPI will automatically provide the information.

Comment 7 Arik 2014-02-12 16:18:03 UTC
*** Bug 1063891 has been marked as a duplicate of this bug. ***

Comment 8 Sandro Bonazzola 2014-02-19 12:27:43 UTC
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA

Comment 9 Meital Bourvine 2014-02-20 11:29:37 UTC
Exactly the same as https://bugzilla.redhat.com/show_bug.cgi?id=1060575, which I verified yesterday on ovirt-3.4.0-beta3. See more verification details there.

Comment 10 Sandro Bonazzola 2014-03-31 12:32:54 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released


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