Skip to content

Don't allow NAS backup for vm with encrypted volumes #13197

Description

@kiranchavala

problem

Don't allow backup for vm with encrypted volumes

versions

ACS 4.22

The steps to reproduce the bug

  1. Configure the backup.framework.provider.plugin to nas
  2. Launch a vm and assign a backup offering
  3. Take a backup of the encrypted vm
  4. Try to create an instance from the backup
Image
  1. Exception observed
2026-05-20 05:46:29,634 WARN  [resource.wrapper.LibvirtStartCommandWrapper] (AgentRequest-Handler-5:[]) (logid:ae054c8c) LibvirtException org.libvirt.LibvirtException: internal error: qemu unexpectedly closed the monitor: 2026-05-20T05:46:29.444365Z qemu-kvm: -blockdev {"node-name":"libvirt-3-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","encrypt":{"format":"luks","key-secret":"libvirt-3-format-encryption-secret0"},"file":"libvirt-3-storage","backing":null}: No encryption in image header, but options specified format 'luks'
	at org.libvirt.ErrorHandler.processError(Unknown Source)
	at org.libvirt.ErrorHandler.processError(Unknown Source)
	at org.libvirt.Connect.domainCreateXML(Unknown Source)
	at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:2241)
	at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:2210)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:91)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:52)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
	at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:2280)
	at com.cloud.agent.Agent.processRequest(Agent.java:813)
	at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1295)
	at com.cloud.utils.nio.Task.call(Task.java:83)
	at com.cloud.utils.nio.Task.call(Task.java:29)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

Image
  1. Stop the vm

  2. Restore the vm to backup > Exception observed

  3. Vm is unable to start due to insufficent capacity even , not sure why this error comes when there is enough capacity

2026-05-20 06:19:16,470 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) DeploymentPlan [DataCenterDeployment] has specified host [1] without HA flag. Choosing this host to deploy VM [VM instance {"id":24,"instanceName":"i-2-24-VM","state":"Starting","type":"User","uuid":"e2ae52ce-4249-4772-b789-26f566cbe52f"}].
2026-05-20 06:19:16,470 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) Cannot deploy VM [VM instance {"id":24,"instanceName":"i-2-24-VM","state":"Starting","type":"User","uuid":"e2ae52ce-4249-4772-b789-26f566cbe52f"}] to host [Host {"id":1,"name":"ref-trl-11676-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"71c97b41-2f20-4576-9e1f-110cdf73fbb4"}] because this host is in the avoid set.
2026-05-20 06:19:16,484 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) VM instance {"id":24,"instanceName":"i-2-24-VM","state":"Stopped","type":"User","uuid":"e2ae52ce-4249-4772-b789-26f566cbe52f"} state transited from [Starting] to [Stopped] with event [OperationFailed]. VM's original host: Host {"id":2,"name":"ref-trl-11676-k-Mol8-kiran-chavala-kvm2","type":"Routing","uuid":"4c8f5777-b8fb-4bf9-ab31-461c2474dd36"}, new host: null, host before state transition: Host {"id":1,"name":"ref-trl-11676-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"71c97b41-2f20-4576-9e1f-110cdf73fbb4"}
2026-05-20 06:19:16,488 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) Hosts's actual total CPU: 6000 and CPU after applying overprovisioning: 12000
2026-05-20 06:19:16,488 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) Hosts's actual total RAM: (6.76 GB) 7259152384 and RAM after applying overprovisioning: (6.76 GB) 7259152384
2026-05-20 06:19:16,488 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) release cpu from host: Host {"id":1,"name":"ref-trl-11676-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"71c97b41-2f20-4576-9e1f-110cdf73fbb4"}, old used: 2500, reserved: 0, actual total: 6000, total with overprovisioning: 12000; new used: 500,reserved:0; movedfromreserved: false,moveToReservered: false
2026-05-20 06:19:16,488 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) release mem from host: Host {"id":1,"name":"ref-trl-11676-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"71c97b41-2f20-4576-9e1f-110cdf73fbb4"}, old used: (2.50 GB) 2684354560, reserved: (0 bytes) 0, total: (6.76 GB) 7259152384; new used: (512.00 MB) 536870912, reserved: (0 bytes) 0; movedfromreserved: false, moveToReservered: false
2026-05-20 06:19:16,498 ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) Invocation exception, caused by: com.cloud.exception.InsufficientServerCapacityException: Unable to create a deployment for VM instance {"id":24,"instanceName":"i-2-24-VM","state":"Starting","type":"User","uuid":"e2ae52ce-4249-4772-b789-26f566cbe52f"}Scope=interface com.cloud.dc.DataCenter; id=1
2026-05-20 06:19:16,498 INFO  [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331, ctx-8fad60d0]) (logid:d156b428) Rethrow exception com.cloud.exception.InsufficientServerCapacityException: Unable to create a deployment for VM instance {"id":24,"instanceName":"i-2-24-VM","state":"Starting","type":"User","uuid":"e2ae52ce-4249-4772-b789-26f566cbe52f"}Scope=interface com.cloud.dc.DataCenter; id=1
2026-05-20 06:19:16,498 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-136:[ctx-b060718b, job-330/job-331]) (logid:d156b428) Done with run of VM work job: com.cloud.vm.VmWorkStart for VM 24, job origin: 330

Image

What to do about it?

Validate if the vm disk are encrypted , and don't allow assigning a backup offering to the vm

Activity

  1. added theissue type on May 20, 2026
  2. added this to the 4.22.2 milestone on May 20, 2026
  3. moved this from Todo to ready for Review in Apache CloudStack BugFest - Issueson May 25, 2026
  4. modified the milestones: 4.22.2, 4.23.0 on Jun 24, 2026
  5. github-actions commented on Oct 25, 2026

    @github-actions

    This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions