Re: Unable to resize down data disk: libvirt exception - invalid argument: can't shrink capacity below existing allocation
Hi Simon, Thanks for your reply. We are using Ubuntu OS on the hypervisor level. We compiled libvirtd from source (downloaded from libvirt website) and do not use the one from Ubuntu apt package. Currently using below version: # libvirtd --version libvirtd (libvirt) 1.2.3 Any clue what could be the problem? Do you think upgrading the libvirt will help? Looking foward to your reply, thank you. Cheers. On Wed, Sep 19, 2018 at 8:07 PM Simon Weller wrote: > This looks like a libvirt limitation/bug. What OS are you using? > > > > From: Cloud List > Sent: Tuesday, September 18, 2018 11:34 PM > To: users@cloudstack.apache.org > Subject: Re: Unable to resize down data disk: libvirt exception - invalid > argument: can't shrink capacity below existing allocation > > Hi, > > Anyone can advise on below? Or is it confirmed that resizing down > (shrinking) the data-disk is no longer supported on CloudStack with KVM, > libvirt and Ceph RBD storage? > > Looking forward to your reply, thank you. > > Cheers. > > > > On Thu, Aug 16, 2018 at 6:07 PM, Cloud List wrote: > > > Hi, > > > > We are using CloudStack 4.8.1.1 with QEMU/KVM hypervisor, libvirt and > Ceph > > RBD storage. > > > > We just realised that we are not able to resize down any of our > > data-disks, and we are sure that we were able to do that before. Not too > > sure since when the problem started to happen. > > > > When we tried to resize a data disk of a VM on CloudStack admin panel by > > stopping the VM and then go to Instance > VM hostname > View Volumes > > > DATA- > Resize volume > Select a disk offering with lower storage > size > > > Tick on "Shrink OK" > click OK, we get this error messages as a pop-up > on > > the CloudStack admin panel: > > > > > > org.libvirt.LibvirtException: invalid argument: can't shrink capacity > > below existing allocation > > > > > > On management server logs: > > > > > > 2018-08-16 17:52:31,541 ERROR [c.c.a.ApiAsyncJobDispatcher] > > (API-Job-Executor-99:ctx-1392adbe job-69196) (logid:2f71074c) Unexpected > > exception while executing org.apache.cloudstack.api.command.admin.volume. > > ResizeVolumeCmdByAdmin > > com.cloud.utils.exception.CloudRuntimeException: > > org.libvirt.LibvirtException: invalid argument: can't shrink capacity > below > > existing allocation > > at > com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > > VolumeApiServiceImpl.java:1213) > > at > com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > > VolumeApiServiceImpl.java:2920) > > at sun.reflect.GeneratedMethodAccessor1400.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob( > > VmWorkJobHandlerProxy.java:107) > > at com.cloud.storage.VolumeApiServiceImpl.handleVmWorkJob( > > VolumeApiServiceImpl.java:2944) > > at sun.reflect.GeneratedMethodAccessor1396.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at org.springframework.aop.support.AopUtils. > > invokeJoinpointUsingReflection(AopUtils.java:317) > > at org.springframework.aop.framework.ReflectiveMethodInvocation. > > invokeJoinpoint(ReflectiveMethodInvocation.java:183) > > at org.springframework.aop.framework.ReflectiveMethodInvocation. > > proceed(ReflectiveMethodInvocation.java:150) > > at org.springframework.aop.interceptor. > > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) > > at org.springframework.aop.framework.ReflectiveMethodInvocation. > > proceed(ReflectiveMethodInvocation.java:172) > > at org.springframework.aop.framework.JdkDynamicAopProxy. > > invoke(JdkDynamicAopProxy.java:204) > > at com.sun.proxy.$Proxy194.handleVmWorkJob(Unknown Source) > > at com.cloud.vm.VmWorkJobDispatcher.runJob( > > VmWorkJobDispatcher.java:102) > > at org.apache.cloudstack.framework.jobs.impl. > > AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:554) > > at org.apache.cloudstack.managed.context. > > ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > > at org.apache.cloudstack.manage
Re: Unable to resize down data disk: libvirt exception - invalid argument: can't shrink capacity below existing allocation
This looks like a libvirt limitation/bug. What OS are you using? From: Cloud List Sent: Tuesday, September 18, 2018 11:34 PM To: users@cloudstack.apache.org Subject: Re: Unable to resize down data disk: libvirt exception - invalid argument: can't shrink capacity below existing allocation Hi, Anyone can advise on below? Or is it confirmed that resizing down (shrinking) the data-disk is no longer supported on CloudStack with KVM, libvirt and Ceph RBD storage? Looking forward to your reply, thank you. Cheers. On Thu, Aug 16, 2018 at 6:07 PM, Cloud List wrote: > Hi, > > We are using CloudStack 4.8.1.1 with QEMU/KVM hypervisor, libvirt and Ceph > RBD storage. > > We just realised that we are not able to resize down any of our > data-disks, and we are sure that we were able to do that before. Not too > sure since when the problem started to happen. > > When we tried to resize a data disk of a VM on CloudStack admin panel by > stopping the VM and then go to Instance > VM hostname > View Volumes > > DATA- > Resize volume > Select a disk offering with lower storage size > > Tick on "Shrink OK" > click OK, we get this error messages as a pop-up on > the CloudStack admin panel: > > > org.libvirt.LibvirtException: invalid argument: can't shrink capacity > below existing allocation > > > On management server logs: > > > 2018-08-16 17:52:31,541 ERROR [c.c.a.ApiAsyncJobDispatcher] > (API-Job-Executor-99:ctx-1392adbe job-69196) (logid:2f71074c) Unexpected > exception while executing org.apache.cloudstack.api.command.admin.volume. > ResizeVolumeCmdByAdmin > com.cloud.utils.exception.CloudRuntimeException: > org.libvirt.LibvirtException: invalid argument: can't shrink capacity below > existing allocation > at com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > VolumeApiServiceImpl.java:1213) > at com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > VolumeApiServiceImpl.java:2920) > at sun.reflect.GeneratedMethodAccessor1400.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob( > VmWorkJobHandlerProxy.java:107) > at com.cloud.storage.VolumeApiServiceImpl.handleVmWorkJob( > VolumeApiServiceImpl.java:2944) > at sun.reflect.GeneratedMethodAccessor1396.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.springframework.aop.support.AopUtils. > invokeJoinpointUsingReflection(AopUtils.java:317) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > invokeJoinpoint(ReflectiveMethodInvocation.java:183) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > proceed(ReflectiveMethodInvocation.java:150) > at org.springframework.aop.interceptor. > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > proceed(ReflectiveMethodInvocation.java:172) > at org.springframework.aop.framework.JdkDynamicAopProxy. > invoke(JdkDynamicAopProxy.java:204) > at com.sun.proxy.$Proxy194.handleVmWorkJob(Unknown Source) > at com.cloud.vm.VmWorkJobDispatcher.runJob( > VmWorkJobDispatcher.java:102) > at org.apache.cloudstack.framework.jobs.impl. > AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:554) > at org.apache.cloudstack.managed.context. > ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext$1.call(DefaultManagedContext.java:56) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) > at org.apache.cloudstack.managed.context. > ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at org.apache.cloudstack.framework.jobs.impl. > AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:502) > at java.util.concurrent.Executors$RunnableAdapter. > call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at java.util.concurrent.ThreadPoolExecutor.runWorker( > ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run( > Thr
Re: Unable to resize down data disk: libvirt exception - invalid argument: can't shrink capacity below existing allocation
Hi, Anyone can advise on below? Or is it confirmed that resizing down (shrinking) the data-disk is no longer supported on CloudStack with KVM, libvirt and Ceph RBD storage? Looking forward to your reply, thank you. Cheers. On Thu, Aug 16, 2018 at 6:07 PM, Cloud List wrote: > Hi, > > We are using CloudStack 4.8.1.1 with QEMU/KVM hypervisor, libvirt and Ceph > RBD storage. > > We just realised that we are not able to resize down any of our > data-disks, and we are sure that we were able to do that before. Not too > sure since when the problem started to happen. > > When we tried to resize a data disk of a VM on CloudStack admin panel by > stopping the VM and then go to Instance > VM hostname > View Volumes > > DATA- > Resize volume > Select a disk offering with lower storage size > > Tick on "Shrink OK" > click OK, we get this error messages as a pop-up on > the CloudStack admin panel: > > > org.libvirt.LibvirtException: invalid argument: can't shrink capacity > below existing allocation > > > On management server logs: > > > 2018-08-16 17:52:31,541 ERROR [c.c.a.ApiAsyncJobDispatcher] > (API-Job-Executor-99:ctx-1392adbe job-69196) (logid:2f71074c) Unexpected > exception while executing org.apache.cloudstack.api.command.admin.volume. > ResizeVolumeCmdByAdmin > com.cloud.utils.exception.CloudRuntimeException: > org.libvirt.LibvirtException: invalid argument: can't shrink capacity below > existing allocation > at com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > VolumeApiServiceImpl.java:1213) > at com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume( > VolumeApiServiceImpl.java:2920) > at sun.reflect.GeneratedMethodAccessor1400.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob( > VmWorkJobHandlerProxy.java:107) > at com.cloud.storage.VolumeApiServiceImpl.handleVmWorkJob( > VolumeApiServiceImpl.java:2944) > at sun.reflect.GeneratedMethodAccessor1396.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.springframework.aop.support.AopUtils. > invokeJoinpointUsingReflection(AopUtils.java:317) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > invokeJoinpoint(ReflectiveMethodInvocation.java:183) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > proceed(ReflectiveMethodInvocation.java:150) > at org.springframework.aop.interceptor. > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) > at org.springframework.aop.framework.ReflectiveMethodInvocation. > proceed(ReflectiveMethodInvocation.java:172) > at org.springframework.aop.framework.JdkDynamicAopProxy. > invoke(JdkDynamicAopProxy.java:204) > at com.sun.proxy.$Proxy194.handleVmWorkJob(Unknown Source) > at com.cloud.vm.VmWorkJobDispatcher.runJob( > VmWorkJobDispatcher.java:102) > at org.apache.cloudstack.framework.jobs.impl. > AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:554) > at org.apache.cloudstack.managed.context. > ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext$1.call(DefaultManagedContext.java:56) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) > at org.apache.cloudstack.managed.context.impl. > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) > at org.apache.cloudstack.managed.context. > ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at org.apache.cloudstack.framework.jobs.impl. > AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:502) > at java.util.concurrent.Executors$RunnableAdapter. > call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at java.util.concurrent.ThreadPoolExecutor.runWorker( > ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > 2018-08-16 17:52:31,543 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-99:ctx-1392adbe job-69196) (logid:2f71074c) Complete > async job-69196, jobStatus: FAILED, resultCode: 530, result: > org.apache.cloudstack.api.response.Except > ionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"org.libvirt.LibvirtException: > invalid argument: can\u0027t shrink capacity below existing allocation"} > > > On the hypervisor host's CloudStack agent log: > > > 2018-08-16 17:52:29,790 DEBUG [cloud.agent.Agent] >