[ovirt-users] How do I activate a hot-plugged disk (in v3 Python SDK) ?

Yaniv Kaul ykaul at redhat.com
Tue Jul 26 06:53:01 UTC 2016


On Mon, Jul 25, 2016 at 4:36 PM, Ondra Machacek <omachace at redhat.com> wrote:

> You actually have to run method 'activate()'[1] on VM disk.
>
> So it will look like this:
>
>  api.vms.get(VM0_NAME).disks.get(DISK1_NAME).activate()
>
> [1]
> https://gerrit.ovirt.org/gitweb?p=ovirt-engine-sdk.git;a=blob;f=src/ovirtsdk/infrastructure/brokers.py;h=7def8a5adea3357d31827f754a1e644b70de146d;hb=sdk_3.6#l31779


Thanks.
I've ended up adding 'active=True' to the disk when adding it - and it
seems to do the same. Is that correct?
Y.


>
>
> On 07/25/2016 03:13 PM, Yaniv Kaul wrote:
>
>> After successfully attaching a disk and verifying its status is in 'ok',
>> I've tried:
>> api.vms.get(VM0_NAME).disks.get(DISK1_NAME).set_active(True)
>>
>> But it doesn't really activate it. What's the correct way to activate it?
>> (It works well via the UI).
>>
>> TIA,
>> Y.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160726/7c8f5bc9/attachment-0001.html>


More information about the Users mailing list