Hi Wei ZHOU I have opened an issue and look forward to your update.
https://github.com/apache/cloudstack/issues/3482 发件人: Wei ZHOU<mailto:[email protected]> 发送时间: 2019年7月10日 20:21 收件人: [email protected]<mailto:[email protected]> 主题: Re: Unable to release computing resources By design, the resource count of domain/account counts all vms (except vrs), no matter what the states are. 'update resource count' on UI or via api will get the same results. We have some changes to take running vms into consideration. If you are interested, please file a feature request. I might work on it in August. -Wei li jerry <[email protected]> 于2019年7月10日周三 下午2:13写道: > Hi Andrija > > Why is it necessary to delete the VM before releasing the computing > resources? The stopped VM has no consumption of computing resources, it > should not be counted. > > Is there any way to automatically release resources after the virtual > machine stops? > > 发件人: Andrija Panic<mailto:[email protected]> > 发送时间: 2019年7月10日 19:45 > 收件人: users<mailto:[email protected]> > 抄送: dev<mailto:[email protected]> > 主题: Re: Unable to release computing resources > > Afaik, those resource limits are not released (i.e. number of CPUs ) when > you stop a VM - it is permanent accounted against an account until VM is > removed. Buy I might be wrong - on the specific Account page/tab in UI, > there is something like " update resource count" button, which should give > you the up-to-date numbers of different resources used. > > Best, > Andrija > > On Wed, Jul 10, 2019, 17:11 li jerry <[email protected]> wrote: > > > Hi Rohit > > Sorry, I didn’t make it clear. > > > > Account Info: > > Name: "ITDept", > > Accounttype: 2, > > Roletype: "DomainAdmin", > > Rolename: "Domain Admin", > > Cpulimit: "12", > > Cputotal: "12", > > Vmlimit: "4", > > Vmtotal: 2 > > > > Create 2 VMs under this account: > > Vm1 > > Name=vm1,vcpu=8,ram=16g,status=Stopped > > Vm1 > > Name=vm2,vcpu=4,ram=16g,status=Stopped > > > > > > Now I need to create and run a new VM on this account, I get an error. > > Maximum amount of resources of Type = 'cpu' for Account Name = ITDept in > > Domain Id = 4 is exceeded: Account Resource Limit = 12, Current Account > > Resource Amount = 12, Requested Resource Amount = 2. > > > > > > VM1, VM2 is already Stopped, it no longer occupies any computing > > resources, why can't I continue to create new VMs? > > > > > > 发件人: Rohit Yadav<mailto:[email protected]> > > 发送时间: 2019年7月10日 16:11 > > 收件人: [email protected]<mailto:[email protected]>; > > [email protected]<mailto:[email protected]> > > 主题: Re: Unable to release computing resources > > > > Jerry, > > > > > > The flag you've mentioned is an internal CloudStack flag, please don't > > change that (starting 4.13+ we'll limit showing such flags at least to > > users). What you want is to decrease the time CloudStack does capacity > > checks for which you can tune capacity.check.period, lowering which will > > cause CloudStack to aggressively recalculate host capacities. You may > also > > try to fetch latest statistics which will force recalculation (via > > cloudmonkey for example: list capacity fetchlatest=true). > > > > > > > > Regards, > > > > Rohit Yadav > > > > Software Architect, ShapeBlue > > > > https://www.shapeblue.com > > > > ________________________________ > > From: li jerry <[email protected]> > > Sent: Tuesday, July 9, 2019 8:02:38 PM > > To: [email protected]; [email protected] > > Subject: Unable to release computing resources > > > > Hi ALL > > > > I want VM to automatically release computing resources (CPU and RAM) > after > > shutdown. I try to change the Message.ReservedCapacityFreed.Flag > parameter > > of VM to false. When VM is turned off, the CPU and memory in > resource_count > > are not released. > > Excuse me, is there anything I haven't corrected? > > > > Cloudstack 4.11.2/4.11.3 has this problem. > > > > [email protected] > > www.shapeblue.com<http://www.shapeblue.com> > > Amadeus House, Floral Street, London WC2E 9DPUK > > @shapeblue > > > > > > > > > >
