Bug 1060575 - [RFE] OVF descriptor file data via the REST API for the Active VM
Summary: [RFE] OVF descriptor file data via the REST API for the Active VM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Liron Aravot
QA Contact: Meital Bourvine
URL:
Whiteboard: storage
Depends On: 1047965
Blocks: 1061239 rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2014-02-02 19:12 UTC by Sean Cohen
Modified: 2015-09-22 13:09 UTC (History)
16 users (show)

Fixed In Version: ovirt-3.4.0-beta3
Doc Type: Enhancement
Doc Text:
The REST API now provides OVF file descriptor data for the active VM.
Clone Of: 1047965
Environment:
Last Closed: 2014-06-09 15:02:07 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:
scohen: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0506 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.4.0 update 2014-06-09 18:55:38 UTC
oVirt gerrit 24287 0 None MERGED core, restapi: provide capabillity to get vm ovf config 2020-08-19 17:38:08 UTC
oVirt gerrit 24410 0 None MERGED core, restapi: provide capabillity to get vm ovf config 2020-08-19 17:38:08 UTC

Comment 2 Juan Hernández 2014-02-04 09:48:42 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 3 Sandro Bonazzola 2014-02-19 12:27:59 UTC
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA

Comment 4 Meital Bourvine 2014-02-19 14:59:17 UTC
Verified on ovirt-3.4.0-beta3

GET: https://10.35.161.44/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1

HEADER: All-Content: true

RESPONSE:
<vm href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1" id="78275a97-e42b-4cde-95d9-95bb92bbcaf1">
<actions>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/migrate" rel="migrate"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/reboot" rel="reboot"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/cancelmigration" rel="cancelmigration"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/move" rel="move"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/ticket" rel="ticket"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/detach" rel="detach"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/export" rel="export"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/shutdown" rel="shutdown"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/start" rel="start"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/stop" rel="stop"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/suspend" rel="suspend"/>
</actions>
<name>mbourvin</name>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/applications" rel="applications"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/disks" rel="disks"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/nics" rel="nics"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/cdroms" rel="cdroms"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/snapshots" rel="snapshots"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/tags" rel="tags"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/permissions" rel="permissions"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/statistics" rel="statistics"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/reporteddevices" rel="reporteddevices"/>
<link href= "/api/vms/78275a97-e42b-4cde-95d9-95bb92bbcaf1/watchdogs" rel="watchdogs"/>
<type>server</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>1</priority>
</high_availability>
<display>
<type>spice</type>
<monitors>1</monitors>
<single_qxl_pci>false</single_qxl_pci>
<allow_override>true</allow_override>
<smartcard_enabled>false</smartcard_enabled>
</display>
<cluster href= "/api/clusters/00000001-0001-0001-0001-000000000001" id="00000001-0001-0001-0001-000000000001"/>
<template href= "/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
<stop_time>2014-02-19T15:41:16.842+02:00</stop_time>
<creation_time>2014-02-19T15:41:16.825+02: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"/>
<initialization>
<configuration>
<type>ovf</type>
<data>
<?xml version='1.0' encoding='UTF-8'?><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"><References><File ovf:href="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:id="b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:size="2147483648" ovf:description="Active VM"/><File ovf:href="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/70e5b314-81f9-4d77-9ac9-cad2e4814c5f" ovf:id="70e5b314-81f9-4d77-9ac9-cad2e4814c5f" ovf:size="2147483648" ovf:description="snap2"/><File ovf:href="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/f6c69dad-8b77-425a-a2dd-9577f427c5d0" ovf:id="f6c69dad-8b77-425a-a2dd-9577f427c5d0" ovf:size="2147483648" ovf:description="snap1"/></References><Section xsi:type="ovf:NetworkSection_Type"><Info>List of networks</Info><Network ovf:name="Network 1"/></Section><Section xsi:type="ovf:DiskSection_Type"><Info>List of Virtual Disks</Info><Disk ovf:diskId="b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:size="2" ovf:actual_size="0" ovf:vm_snapshot_id="d0d86aba-0a2a-4ab1-be06-cc7514e4c556" ovf:parentRef="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:fileRef="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:format="http://www.gnome.org/~markmc/qcow-image-format.html" ovf:volume-format="COW" ovf:volume-type="Sparse" ovf:disk-interface="VirtIO" ovf:boot="true" ovf:disk-alias="mbourvin_Disk1" ovf:wipe-after-delete="false"/><Disk ovf:diskId="70e5b314-81f9-4d77-9ac9-cad2e4814c5f" ovf:size="2" ovf:actual_size="0" ovf:vm_snapshot_id="32c54f2f-310a-4dd0-953c-9d7c05b7285a" ovf:parentRef="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/b20c2ffe-2316-48f5-9e8c-f25b9a0eac41" ovf:fileRef="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/70e5b314-81f9-4d77-9ac9-cad2e4814c5f" ovf:format="http://www.gnome.org/~markmc/qcow-image-format.html" ovf:volume-format="COW" ovf:volume-type="Sparse" ovf:disk-interface="VirtIO" ovf:boot="true" ovf:disk-alias="mbourvin_Disk1" ovf:wipe-after-delete="false"/><Disk ovf:diskId="f6c69dad-8b77-425a-a2dd-9577f427c5d0" ovf:size="2" ovf:actual_size="0" ovf:vm_snapshot_id="d1536599-1db3-4352-a182-39e2114534f8" ovf:parentRef="" ovf:fileRef="3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/f6c69dad-8b77-425a-a2dd-9577f427c5d0" ovf:format="http://www.vmware.com/specifications/vmdk.html#sparse" ovf:volume-format="RAW" ovf:volume-type="Sparse" ovf:disk-interface="VirtIO" ovf:boot="true" ovf:disk-alias="mbourvin_Disk1" ovf:wipe-after-delete="false"/></Section><Content ovf:id="out" xsi:type="ovf:VirtualSystem_Type"><Description></Description><CreationDate>2014/02/19 13:41:16</CreationDate><ExportDate>2014/02/19 14:56:12</ExportDate><DeleteProtected>false</DeleteProtected><SsoMethod>guest_agent</SsoMethod><IsSmartcardEnabled>false</IsSmartcardEnabled><TimeZone></TimeZone><default_boot_sequence>0</default_boot_sequence><Generation>4</Generation><VmType>1</VmType><MinAllocatedMem>1024</MinAllocatedMem><IsStateless>false</IsStateless><IsRunAndPause>false</IsRunAndPause><CreatedByUserId>fdfc627c-d875-11e0-90f0-83df133b58cc</CreatedByUserId><Name>mbourvin</Name><TemplateId>00000000-0000-0000-0000-000000000000</TemplateId><TemplateName>Blank</TemplateName><IsInitilized>false</IsInitilized><Origin>3</Origin><DefaultDisplayType>1</DefaultDisplayType><TrustedService>false</TrustedService><OriginalTemplateId>00000000-0000-0000-0000-000000000000</OriginalTemplateId><OriginalTemplateName>Blank</OriginalTemplateName><AutoStartup>false</AutoStartup><UseLatestVersion>false</UseLatestVersion><Section ovf:id="78275a97-e42b-4cde-95d9-95bb92bbcaf1" ovf:required="false" xsi:type="ovf:OperatingSystemSection_Type"><Info>Guest Operating System</Info><Description>other</Description></Section><Section xsi:type="ovf:VirtualHardwareSection_Type"><Info>1 CPU, 1024 Memeory</Info><System><vssd:VirtualSystemType>ENGINE 3.4.0.0</vssd:VirtualSyste
mType></System><Item><rasd:Caption>1 virtual cpu</rasd:Caption><rasd:Description>Number of virtual CPU</rasd:Description><rasd:InstanceId>1</rasd:InstanceId><rasd:ResourceType>3</rasd:ResourceType><rasd:num_of_sockets>1</rasd:num_of_sockets><rasd:cpu_per_socket>1</rasd:cpu_per_socket></Item><Item><rasd:Caption>1024 MB of memory</rasd:Caption><rasd:Description>Memory Size</rasd:Description><rasd:InstanceId>2</rasd:InstanceId><rasd:ResourceType>4</rasd:ResourceType><rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits><rasd:VirtualQuantity>1024</rasd:VirtualQuantity></Item><Item><rasd:Caption>mbourvin_Disk1</rasd:Caption><rasd:InstanceId>b20c2ffe-2316-48f5-9e8c-f25b9a0eac41</rasd:InstanceId><rasd:ResourceType>17</rasd:ResourceType><rasd:HostResource>3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/b20c2ffe-2316-48f5-9e8c-f25b9a0eac41</rasd:HostResource><rasd:Parent>70e5b314-81f9-4d77-9ac9-cad2e4814c5f</rasd:Parent><rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template><rasd:ApplicationList></rasd:ApplicationList><rasd:StorageId>5bb442bb-debf-4d12-a651-12bc0b3aba1b</rasd:StorageId><rasd:StoragePoolId>00000002-0002-0002-0002-000000000002</rasd:StoragePoolId><rasd:CreationDate>2014/02/19 13:41:57</rasd:CreationDate><rasd:LastModified>2014/02/19 13:41:57</rasd:LastModified><rasd:last_modified_date>2014/02/19 14:56:12</rasd:last_modified_date></Item><Item><rasd:Caption>mbourvin_Disk1</rasd:Caption><rasd:InstanceId>70e5b314-81f9-4d77-9ac9-cad2e4814c5f</rasd:InstanceId><rasd:ResourceType>17</rasd:ResourceType><rasd:HostResource>3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/70e5b314-81f9-4d77-9ac9-cad2e4814c5f</rasd:HostResource><rasd:Parent>f6c69dad-8b77-425a-a2dd-9577f427c5d0</rasd:Parent><rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template><rasd:ApplicationList></rasd:ApplicationList><rasd:StorageId>5bb442bb-debf-4d12-a651-12bc0b3aba1b</rasd:StorageId><rasd:StoragePoolId>00000002-0002-0002-0002-000000000002</rasd:StoragePoolId><rasd:CreationDate>2014/02/19 13:41:31</rasd:CreationDate><rasd:LastModified>2014/02/19 13:41:58</rasd:LastModified><rasd:last_modified_date>2014/02/19 14:56:12</rasd:last_modified_date></Item><Item><rasd:Caption>mbourvin_Disk1</rasd:Caption><rasd:InstanceId>f6c69dad-8b77-425a-a2dd-9577f427c5d0</rasd:InstanceId><rasd:ResourceType>17</rasd:ResourceType><rasd:HostResource>3bac90af-02a7-43b1-bcd3-6f0e0bb4fb8d/f6c69dad-8b77-425a-a2dd-9577f427c5d0</rasd:HostResource><rasd:Parent>00000000-0000-0000-0000-000000000000</rasd:Parent><rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template><rasd:ApplicationList></rasd:ApplicationList><rasd:StorageId>5bb442bb-debf-4d12-a651-12bc0b3aba1b</rasd:StorageId><rasd:StoragePoolId>00000002-0002-0002-0002-000000000002</rasd:StoragePoolId><rasd:CreationDate>2014/02/19 13:41:22</rasd:CreationDate><rasd:LastModified>2014/02/19 13:41:31</rasd:LastModified><rasd:last_modified_date>2014/02/19 14:56:12</rasd:last_modified_date></Item><Item><rasd:Caption>USB Controller</rasd:Caption><rasd:InstanceId>3</rasd:InstanceId><rasd:ResourceType>23</rasd:ResourceType><rasd:UsbPolicy>DISABLED</rasd:UsbPolicy></Item></Section></Content></ovf:Envelope>
</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>

Comment 5 Satya 2014-02-19 17:43:29 UTC
I don't see any network/nic information in the xml. Is this by design?

Comment 6 Liron Aravot 2014-02-20 07:30:33 UTC
it's contained in the ovf as well, i assume that the tested vm just didn't have any nics.

quick note, as mentioned by metial - recieving the ovf of the active vm is done using a get request to /api/vms/GUID/ or /api/vms with the header All-Content (value : true) and not through /snapshots.

Comment 7 Meital Bourvine 2014-02-20 09:21:40 UTC
Indeed the tested vm didn't have any nic.

Comment 8 errata-xmlrpc 2014-06-09 15:02:07 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.

http://rhn.redhat.com/errata/RHSA-2014-0506.html


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