[ovirt-users] Ovirt 4.2 - Help adding VM to numa node via python SDK
Don Dupuis
dondster at gmail.com
Thu Jan 25 19:14:15 UTC 2018
Thanks Andrej. I will use this information and see how far I get.
Don
On Thu, Jan 25, 2018 at 10:39 AM, Andrej Krejcir <akrejcir at redhat.com>
wrote:
> Hi,
>
> The VirtualNumaNode[1] object has 'numa_node_pins' member, that is a list
> of NumaNodePin[2].
> Most of the members of NumaNodePin object are deprecated and not used.
> The important one is 'index', which is the index of the host numa node to
> which the
> vm numa node is pinned. Here is the REST API documentation: [3].
>
> A simple python example can be:
>
>
> import ovirtsdk4 as sdk
>
> conn = sdk.Connection("URL", "admin at internal", "PASSWORD")
>
> host_node = conn.service("hosts/123/numanodes/456").get()
>
> vm_node_service = conn.service("vms/789/numanodes/123")
> vm_node = vm_node_service.get()
>
> vm_node.numa_node_pins = [ sdk.types.NumaNodePin(index=host_node.index,
> pinned=True) ]
>
> vm_node_service.put(vm_node)
>
>
> Andrej
>
> [1] - http://ovirt.github.io/ovirt-engine-sdk/master/types.m.
> html#ovirtsdk4.types.VirtualNumaNode
> [2] - http://ovirt.github.io/ovirt-engine-sdk/master/types.m.
> html#ovirtsdk4.types.NumaNodePin
>
> [3] - http://ovirt.github.io/ovirt-engine-api-model/4.2/#types/
> numa_node_pin
>
> On 25 January 2018 at 16:12, Don Dupuis <dondster at gmail.com> wrote:
>
>> I am able to create a vm using the sdk with nic and disks using the
>> python sdk, but having trouble understanding how to assign it to virtual
>> numanode onto the physical numanode via python sdk. Any help in this area
>> would be greatly appreciated
>>
>> Thanks
>>
>> Don
>>
>> _______________________________________________
>> 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/20180125/157c6d6e/attachment.html>
More information about the Users
mailing list