[Users] How to change number of cpu cores in Ovirt 3.1 with the python sdk.

Michael Pasternak mpastern at redhat.com
Thu Sep 27 10:23:15 UTC 2012


Well done Steve!,

Don,

Use method/s __doc__, you'll find there how to build parameters holder,
vm.add() for instance, looks like this:

        ...
        [@param vm.os.boot: collection]
        {
          [@ivar boot.dev: string]
        }
        ...
        [@param vm.cpu.topology.cores: int]
	...

as you can see, vm.os.boot is collection of boot.dev, while vm.cpu.topology
is a type.

On 09/25/2012 05:32 PM, Steve Gordon wrote:
> ----- Original Message -----
>> From: "Don Dupuis" <dondster at gmail.com>
>> To: "Steve Gordon" <sgordon at redhat.com>
>> Cc: users at ovirt.org
>> Sent: Tuesday, September 25, 2012 11:03:44 AM
>> Subject: Re: [Users] How to change number of cpu cores in Ovirt 3.1 with the python sdk.
>>
>> Steve
>>
>> THANKS!!!  That did the trick.
>>
>> I was originally trying it like this
>>
>> vm_cpu = params.CPU(topology=[params.CpuTopology(cores=4,
>> sockets=1)])
>>
>>
>> Don
> 
> In the params.OperatingSystem(boot=[params.Boot(dev="hd")]) example the reason you pass a list (denoted by the square brackets) is that the VM can have a number of boot devices which will be tried in order. A VM can only have one CPU topology though which is why the topology argument shouldn't be a list. That is my understanding anyway ;).
> 
> Steve
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Users mailing list