Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1215533 - [Docs][Tech] API docs should cover: How to add a disk to VM from a different storage domain
[Docs][Tech] API docs should cover: How to add a disk to VM from a different ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation (Show other bugs)
2.1.0
Unspecified Unspecified
medium Severity low
: ---
: 3.5.0
Assigned To: Lucy Bopf
Megan Lewis
:
Depends On:
Blocks: 1256971
  Show dependency treegraph
 
Reported: 2015-04-27 01:15 EDT by Andrew Burden
Modified: 2015-09-10 03:10 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-10 03:10:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Burden 2015-04-27 01:15:59 EDT
This was brought to my attention by Juan Hernandez as a question he is frequently asked. Most likely this requires a new topic.
Comment 3 Juan Hernández 2015-06-09 07:58:55 EDT
The question that I frequently get is how to add to a VM a disk that will reside in a storage domain different to the one where the other disks or the VM reside. To do so the caller has to provide the identifier (or name) or that storage domain. For example:

#!/bin/sh -ex

url="https://engine.example.com/ovirt-engine/api"
user="admin@internal"
password="..."
vm_id="1423ee7b-cbe1-4bcf-8594-1a16f1f19da7"
sd_id="929162d4-5a96-48c2-a9b3-dd606172b963"

curl \
--insecure \
--user "${user}:${password}" \
--request POST \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data "
<disk>
    <alias>mydisk</alias>
    <size>10737418240</size>
    <interface>virtio</interface>
    <format>cow</format>
    <storage_domains>
      <storage_domain id=\"${sd_id}\"/>
    </storage_domains>
</disk>
" \
"${url}/vms/${vm_id}/disks"

The important part in this example is the "storage_domains" element used to specify explicitly in what storage domain the disk should be created.
Comment 4 Andrew Dahms 2015-06-24 01:10:59 EDT
Assigning juwu as the QA contact.

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