While on custom offering with 1 cpu, 1000 MHz/core, 512MB RAM:

http://10.2.x.y:8080/client/api?command=scaleVirtualMachine&response=json&id=19a67e20-c747-43bb-b149-c2b2294002f9&serviceofferingid=1b86713b-0131-4b25-8392-46518104bb90&details%5B0%5D.cpuSpeed=1300&details%5B0%5D.cpuNumber=2&details%5B0%5D.memory=768

You can craft a CloudMonkey command from above API (what I did here ^^^, I
used developer tools in Chrome, to catch the API call that changed offering
(from static) to custom one, and then I repeated the same with just
different cpu number, MHz, RAM...

It's always good to "learn" API syntax by catching GUI calls via Developer
tools or such.

Andrija

On Thu, 28 Mar 2019 at 22:39, Fariborz Navidan <mdvlinqu...@gmail.com>
wrote:

> What if I want to change cpu and memory. Native UI does not have such
> capability even for customized service offering. How do I change them via
> cloudmonkey? I have already tried the "change
> serviceofferingforvirtualmachine" command but it always complain s  about
> invalid cpu cores.
>
> Thanks
>
> On Fri, Mar 29, 2019 at 1:55 AM Fariborz Navidan <mdvlinqu...@gmail.com>
> wrote:
>
> >
> >
> > On Fri, Mar 29, 2019 at 1:24 AM Andrija Panic <andrija.pa...@gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> you don't have to re-apply (nor there is such thing) same offering to a
> VM
> >> (you could change to other offering and back to original one - but that
> >> doesn't change a thing) - when VM is booted, some parameters are read
> from
> >> it's offering and applied acordingly (while some parameters might be
> >> cloned
> >> from the disk_offering / service_offering table to the vm_instance table
> >> during VM creation - but this doesn't apply for network rate)
> >>
> >> Depending on hypervisor, it should be enoughto just stop and start VM -
> >> that would trigger the update of network rate for that VM.
> >> I'm personally not sure if 0 means unlimited, worth trying with very
> high
> >> value (i.e.99999) - anyway, try to confirm on hypervisor level if the
> new
> >> value is applied
> >>
> >> Andrija
> >>
> >> On Thu, 28 Mar 2019 at 21:33, Fariborz Navidan <mdvlinqu...@gmail.com>
> >> wrote:
> >>
> >> > Hello,
> >> >
> >> > I have custom service offering with custom cpu and  memory. I have
> >> modified
> >> > the offering's network rate to be set to 0 for unlimited bandwidth.
> >> > CloudStack's native UI does not allow to change service offering of a
> VM
> >> > due to a bug. How can I re-apply the service offering to VMs deployed
> >> with
> >> > it via cloudmonkey?
> >> >
> >> > Thanks
> >> >
> >>
> >>
> >> --
> >>
> >> Andrija Panić
> >>
> >
>


-- 

Andrija Panić

Reply via email to