Hi Daniel, Thanks for the reply. This clears a lot of things. I will test it out.
On Mon, 22 Nov 2021 at 18:57, Daniel Augusto Veronezi Salvador < dvsalvador...@gmail.com> wrote: > Hi Abishek, > It's only available via CLI (at least, right now). There are some > details that you need to pay attention when dynamic scaling the VMs > (with KVM) and using the API: > > (examples via CloudMonkey) > > - The definitions that allow a VM (in KVM) to be dynamic scalable are > set in the XML while deploying the VM. Therefore, if you have a running > VM or change its service offering, you will need to stop it and start it > again. > > - If you are using a custom constrained service offering, you always > have to inform the parameters 'details[0].memory' and > 'details[0].cpuNumber='; also, if you are using a custom unconstrained > service offering, you must inform the parameter 'details[0].cpuSpeed'. > If you only want to increase the memory, you will need to inform the > current CPU number and vice-versa. > > - Related to memory, as they are hotplugged, the value to be added must > be multiple of 128 (Mb). Therefore, if your VM has 1500Mb of memory, for > instance, and you want to add some more, the value informed in the API > must be the current value + some number multiple of 128. For instance, > the parameter 'details[0].memory' must receive the value '1628' (1500 + > 128), '1756' (1500 + 256), '1884' (1500 + 384), '2012' (1500 + 512) and > so on. > > > Best regards, > Daniel > > On 21/11/2021 03:49, Abishek wrote: > > Hello All, > > > > I have successfully upgraded qemu-kvm to qemu-kvm-ev and now I can > > start the VM with dynamic-scaling template and > > service-offering(custom) unlike before. But after > > successfully starting the VM I did not find any scaleVM option in the > > Web UI while the VM is running. Is the feature only supported via CLI > > only or do I have to enable some other options (enable dynamic scale > > vm is already set to true). > > Mgmt : Cloudstack 4.16 (upgraded from 4.15.2) > > HV: Centos 7.9 with KVM > > > > Thank You > > image.png > > > > On Fri, 19 Nov 2021 at 19:18, Abishek <abckd...@gmail.com> wrote: > > > > Hi Slavka, > > > > I am very grateful for the response. Can i directly proceed to > > replace qemu-kvm with qemu-kvm-ev package. What effect will it > > have on my current environment? If you could point me to any > > documentation regarding it I would be extremely grateful. > > Environment: > > Hypervisor: Centos 7.9 KVM > > > > Thank You. > > > > On Fri, 19 Nov 2021 at 16:27, Slavka Peleva > > <slav...@storpool.com.invalid> wrote: > > > > Hi all, > > > > I've tested the dynamic scaling with qemu-kvm and qemu-kvm-ev. > > Here are the > > results for both with "Custom constrained" compute offering: > > > > qemu-kvm-ev > > deploy VM - passed > > scale VM - passed > > > > qemu-kvm > > deploy VM - failed with the same error > > (org.libvirt.LibvirtException: > > internal error: process exited while connecting to monitor: > > qemu: invalid > > ram size: size=524288k,slots=16,maxmem=4194304k) > > scale VM on existing VM - passed > > > > Best regards, > > Slavka > > > > On Fri, Nov 19, 2021 at 6:12 AM Abishek <abckd...@gmail.com> > > wrote: > > > > > Thanks a lot Wei for helping out. I will first try it in the > > Ubuntu > > > environment. > > > > > > On Fri, 19 Nov 2021 at 00:09, Wei ZHOU > > <ustcweiz...@gmail.com> wrote: > > > > > > > Great, thanks Daniel. > > > > > > > > Abishek, now it seems you need to install qemu-kvm-ev for > > testing the > > > > feature. > > > > > > > > -Wei > > > > > > > > On Thursday, 18 November 2021, Daniel Augusto Veronezi > > Salvador < > > > > dvsalvador...@gmail.com> wrote: > > > > > > > > > Hi Abishek, Wei, I tested this feature with Ubuntu 20.04 > > + KVM. Some > > > > > community members tested with CentOS7 and qemu-kvm-ev > > and it worked. > > > > Also, > > > > > as live snapshots and live migrations, hotplug memory is > > a known > > > > limitation > > > > > of qemu-kvm. I cannot give you advice regarding this > > replacement too, > > > as > > > > I > > > > > do not use CentOS. Best regards, Daniel Salvador > > > > > > > > > > On 17/11/2021 09:07, Wei ZHOU wrote: > > > > > > > > > >> Hi Abishek, > > > > >> > > > > >> I cannot give your advice on it as I did not install > > qemu-kvm-ev to > > > > >> replace > > > > >> qemu-kvm before. > > > > >> > > > > >> I suspect that the issue you faced is caused by > > qemu-kvm. qemu-kvm-ev > > > > >> supports more advanced features than qemu-kvm. > > > > >> > > > > >> cc @Daniel, what hypervisor did you use to test the > > dynamic scaling ? > > > > >> > > > > >> -Wei > > > > >> > > > > >> On Wed, 17 Nov 2021 at 11:42, > > Abishek<abckd...@gmail.com> wrote: > > > > >> > > > > >> HI Wei, > > > > >>> > > > > >>> I have not tested with qemu-kvm-ev. I am willing to > > try but what > > > > >>> effect will it have on my existing setup when I > > install qemu-kvm-ev > > > in > > > > my > > > > >>> existing qemu-kvm. Should I have to remove qemu-kvm > > and install > > > > >>> qemu-kvm-ev? In the previous test I was able to start > > the machine > > > with > > > > >>> Fixed Offering but the option for Scaling the VM in UI > > was not > > > present > > > > >>> while the VM was in running state but was available > > when the VM was > > > in > > > > >>> shutdown state only. > > > > >>> > > > > >>> Thank You. > > > > >>> > > > > >>> On Wed, 17 Nov 2021 at 15:23, Wei > > ZHOU<ustcweiz...@gmail.com> > > > wrote: > > > > >>> > > > > >>> Hi Abishek, > > > > >>>> > > > > >>>> Have you tested with qemu-kvm-ev instead of qemu-kvm ? > > > > >>>> > > > > >>>> -Wei > > > > >>>> > > > > >>>> On Wed, 17 Nov 2021 at 10:00, > > Abishek<abckd...@gmail.com> wrote: > > > > >>>> > > > > >>>> Hello Wei, > > > > >>>>> > > > > >>>>> I am very grateful for your response. In my test > > environment I > > > first > > > > >>>>> created a service offering of Custom Constrained > > (minCore=1, > > > > >>>>> > > > > >>>> maxCore=10, > > > > >>> > > > > >>>> minRam=1GB, maxRam=12GB, CPUSpeed=2000) with dynamic > > scaling > > > enabled. > > > > >>>>> > > > > >>>> But > > > > >>> > > > > >>>> every time I tried to start the VM under this > > ServiceOffering I got > > > > the > > > > >>>>> above mentioned error. Please find the following > > agent log for that > > > > >>>>> particular VM: > > > > >>>>> > > > > >>>>> https://controlc.com/4618c4d8 > > > > >>>>> > > > > >>>>> HOST OS : Centos 7.9 > > > > >>>>> QEMU: QEMU emulator version 1.5.3 > > (qemu-kvm-1.5.3-175.el7_9.4), > > > > >>>>> > > > > >>>> Copyright > > > > >>>> > > > > >>>>> (c) 2003-2008 Fabrice Bellard > > > > >>>>> > > > > >>>>> And I think the error seems to be with the service > > offering (Custom > > > > >>>>> Constrained). So, I created two Fixed services > > offering A(1 core > > > and > > > > >>>>> > > > > >>>> 1GB) > > > > >>> > > > > >>>> and B(2 Core and 2 GB) with dynamic scaling enabled. > > I then built a > > > VM > > > > >>>>> based on service offering A and the VM > > started(finally). But I did > > > > not > > > > >>>>> > > > > >>>> find > > > > >>>> > > > > >>>>> any option to scale the VM while it's running. I was > > only able to > > > > scale > > > > >>>>> > > > > >>>> the > > > > >>>> > > > > >>>>> VM to shutdown state. > > > > >>>>> > > > > >>>>> Thank You. > > > > >>>>> > > > > >>>>> On Wed, 17 Nov 2021 at 13:11, Wei > > ZHOU<ustcweiz...@gmail.com> > > > > wrote: > > > > >>>>> > > > > >>>>> Hi Abishek, > > > > >>>>>> > > > > >>>>>> I guess the error is same as before: > > > > >>>>>> > > > > >>>>>> qemu: invalid ram size: > > size=4194304k,slots=16,maxmem=1583660032k > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> What are your hypervisor/qemu version and guest OS > > version ? > > > > >>>>>> Can you check agent.log and share the xml > > definition of the vm ? > > > > >>>>>> > > > > >>>>>> -Wei > > > > >>>>>> > > > > >>>>>> On Wed, 17 Nov 2021 at 05:18, Abishek Budhathoki < > > > > abckd...@gmail.com > > > > >>>>>> wrote: > > > > >>>>>> > > > > >>>>>> Hello Wei, > > > > >>>>>>> > > > > >>>>>>> I have also tested with limited service offering > > where max RAM is > > > > >>>>>>> > > > > >>>>>> 12GB > > > > >>>> > > > > >>>>> and > > > > >>>>>> > > > > >>>>>>> CPU is 12 core. But the result is the same. I can > > not start the > > > VM. > > > > >>>>>>> > > > > >>>>>> But > > > > >>>> > > > > >>>>> if > > > > >>>>>> > > > > >>>>>>> I turn off Dynamic Scaling to Off on Advance Mode > > while creating > > > > >>>>>>> > > > > >>>>>> the > > > > >>> > > > > >>>> instance I can start the VM. > > > > >>>>>>> > > > > >>>>>>> Thank You. > > > > >>>>>>> > > > > >>>>>>> On Tue, 16 Nov 2021 at 20:50, Wei > > ZHOU<ustcweiz...@gmail.com> > > > > >>>>>>> > > > > >>>>>> wrote: > > > > >>>> > > > > >>>>> The max ram looks very huge. It would be better to > > double check > > > > >>>>>>>> > > > > >>>>>>> the > > > > >>> > > > > >>>> offerings. > > > > >>>>>>>> > > > > >>>>>>>> "minRam":"(4.00 GB) 4294967296","maxRam":"(1.4749 > TB) > > > > >>>>>>>> > > > > >>>>>>> 1621666836480" > > > > >>>> > > > > >>>>> > > > > >>>>>>>> -Wei > > > > >>>>>>>> > > > > >>>>>>>> > > > > >>>>>>>> On Tue, 16 Nov 2021 at 15:21, Abishek Budhathoki < > > > > >>>>>>>> > > > > >>>>>>> abckd...@gmail.com > > > > >>>> > > > > >>>>> wrote: > > > > >>>>>>>> > > > > >>>>>>>> HI Daniel, > > > > >>>>>>>>> > > > > >>>>>>>>> Extremely glad to hear that dynamic scaling is > > now supported in > > > > >>>>>>>>> > > > > >>>>>>>> KVM. > > > > >>>>> > > > > >>>>>> There is no issue of resources. I cannot start a VM > > with > > > > >>>>>>>>> > > > > >>>>>>>> dynamic > > > > >>> > > > > >>>> scaling > > > > >>>>>>> > > > > >>>>>>>> enabled template and service offering. But I am > > able to start > > > > >>>>>>>>> > > > > >>>>>>>> other > > > > >>>> > > > > >>>>> VMs. > > > > >>>>>>> > > > > >>>>>>>> I > > > > >>>>>>>> > > > > >>>>>>>>> have shared the logs on > > > > >>>>>>>>> > > > > >>>>>>>>> https://controlc.com/204f727d > > > > >>>>>>>>> > > > > >>>>>>>>> Thank You > > > > >>>>>>>>> > > > > >>>>>>>>> On Tue, 16 Nov 2021 at 16:51, Abishek Budhathoki < > > > > >>>>>>>>> > > > > >>>>>>>> abckd...@gmail.com > > > > >>>>> > > > > >>>>>> wrote: > > > > >>>>>>>>> > > > > >>>>>>>>> Hello All, > > > > >>>>>>>>>> > > > > >>>>>>>>>> I have just upgraded my Cloudstack installation > > from 4.15 to > > > > >>>>>>>>>> > > > > >>>>>>>>> 4.16 > > > > >>>> > > > > >>>>> and > > > > >>>>>> > > > > >>>>>>> everything is working as expected. In the docs > > site(Changes > > > > >>>>>>>>>> > > > > >>>>>>>>> in > > > > >>> > > > > >>>> 4.16.0.0 > > > > >>>>>>> > > > > >>>>>>>> since 4.15) I have seen that dynamic Scaling with > > KVM now > > > > >>>>>>>>>> > > > > >>>>>>>>> works > > > > >>> > > > > >>>> with > > > > >>>>>> > > > > >>>>>>> Cloudstack 4.16(github #4878 Support vm dynamic > > scaling with > > > > >>>>>>>>>> > > > > >>>>>>>>> kvm). > > > > >>>>> > > > > >>>>>> Is > > > > >>>>>> > > > > >>>>>>> this > > > > >>>>>>>>> > > > > >>>>>>>>>> true? I have tried to test this but was > > unsuccessful. Changed > > > > >>>>>>>>>> global setting enable dynamic scaling to true, > > created > > > > >>>>>>>>>> > > > > >>>>>>>>> template > > > > >>> > > > > >>>> with > > > > >>>>>> > > > > >>>>>>> dynamic scaling support, created service offering > that > > > > >>>>>>>>>> > > > > >>>>>>>>> supports > > > > >>> > > > > >>>> dynamic > > > > >>>>>>> > > > > >>>>>>>> Scaling. > > > > >>>>>>>>>> I only see the following error: > > > > >>>>>>>>>> ERROR [c.c.a.ApiAsyncJobDispatcher] > > > > >>>>>>>>>> > > > > >>>>>>>>> (API-Job-Executor-12:ctx-bb24d685 > > > > >>>>>> > > > > >>>>>>> job-2304) (logid:394001c9) Unexpected exception while > > > > >>>>>>>>>> > > > > >>>>>>>>> executing > > > > >>> > > > > >>>> > > org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin > > > > >>>>>>>>>> > > com.cloud.utils.exception.CloudRuntimeException: Unable to > > > > >>>>>>>>>> > > > > >>>>>>>>> start > > > > >>>> > > > > >>>>> a > > > > >>>>> > > > > >>>>>> VM > > > > >>>>>> > > > > >>>>>>> due > > > > >>>>>>>> > > > > >>>>>>>>> to insufficient capacity > > > > >>>>>>>>>> > > > > >>>>>>>>>> If it's not still supported please discard this > > email. > > > > >>>>>>>>>> > > > > >>>>>>>>>> Thank You. > > > > >>>>>>>>>> > > > > >>>>>>>>>> > > > > > > > > >