Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1215533

Summary: [Docs][Tech] API docs should cover: How to add a disk to VM from a different storage domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Andrew Burden <aburden>
Component: DocumentationAssignee: Lucy Bopf <lbopf>
Status: CLOSED CURRENTRELEASE QA Contact: Megan Lewis <melewis>
Severity: low Docs Contact:
Priority: medium    
Version: 2.1.0CC: adahms, amureini, derez, ecohen, gklein, juan.hernandez, lsurette, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-10 07:10:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1256971    

Description Andrew Burden 2015-04-27 05:15:59 UTC
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 11:58:55 UTC
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 05:10:59 UTC
Assigning juwu as the QA contact.