kiranchavala opened a new issue, #11260:
URL: https://github.com/apache/cloudstack/issues/11260

   ### problem
   
   Validate Qcow2 for a backing file during vm import 
   
   
   Currently, CloudStack checks if a QCOW2 file has a backing file during the 
following operations and throws the following exception (Volume with backing 
file cannot be imported or unmanaged)
   
   https://prnt.sc/odMIHijU1pJ3
   
   
   1. Register Template (Normal and Direct Download)
    
   https://cloudstack.apache.org/api/apidocs-4.20/apis/registerTemplate.html
   
   2. Upload Volume 
   
   https://cloudstack.apache.org/api/apidocs-4.20/apis/uploadVolume.html
   
   3. Import Volume 
   
   https://cloudstack.apache.org/api/apidocs-4.20/apis/importVolume.html
   
   
   The agent for the kvm host checks for backing for not and throws the 
exception
   
   ```
   2025-07-18 05:35:53,182 DEBUG [utils.script.Script] 
(AgentRequest-Handler-3:[]) (logid:) Executing command [qemu-img info -U 
/var/lib/libvirt/images/test-backing-file-sdb.qcow2 ].
   2025-07-18 05:35:53,190 DEBUG [utils.script.Script] 
(AgentRequest-Handler-3:[]) (logid:) Successfully executed process [28240] for 
command [qemu-img info -U /var/lib/libvirt/images/test-backing-file-sdb.qcow2 ].
   ```
   
   
   
   
   ### versions
   
   ACS 4.20.1 , ACS 4.19.x
   
   ### The steps to reproduce the bug
   
   
   
   1. Create a backing file using qcow2 on a local storage or a shared storage
   
   qemu-img create -f qcow2 -b /dev/sdb -F raw test-backing-file-sdb.qcow2 5G
   
   2. As a Admin user Navigate to Tools> Import-Export Instances > Kvm 
   
   3. Import Qcow2 image from Local Storage 
   
   https://prnt.sc/NPU9hV6s6v_k
   
   4. Import Qcow2 image from Shared Storage 
   
   https://prnt.sc/uRmuv2j49KZW
   
   5. The qcow2 file is imported successfully 
   
   
   ### What to do about it?
   
   Expected behaviour 
   
   Ideally, CloudStack should check if the volume has a backing file and  throw 
the same exception during import vm
   
   https://cloudstack.apache.org/api/apidocs-4.20/apis/importVm.html
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to