abh1sar opened a new pull request, #10844:
URL: https://github.com/apache/cloudstack/pull/10844

   
   ### Description
   
   #### Issues:
   1. Restore backed-up volume on live instances attaches the qcow2 volume as a 
Raw image, which causes the instance to not
   be able to read it.
   2. In the cloudstack db the format of the restored volume is kept as Raw 
(for both live and stopped VMs). Although it doesn't cause any immediate 
effects, but it might cause some issue with other subsystems like volume 
migration.
   
   #### Fix:
   1.  `virsh attach-disk` command which is used to attach the restored volume 
to the live instance should include `--subdriver qcow2` argument.
   2. NAS backup always convert the disk into Qcow2 format while backing up, so 
it's safe to set the disk format of the restored volume always to Qcow2 in the 
db.
     
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
******************************************************************************* 
-->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
******************************************************************************* 
-->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [x] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   1. Create a VM with a data vol
   2. Install ext4 fs on the data vol, mount it and create a file
   3. Take NAS backup
   4. Create another instance and restore the data vol from the backup to the 
new instance
   5. Try to mount the data vol
   Before fix it throws the following error:
   ![Screenshot from 2025-05-09 
22-18-23](https://github.com/user-attachments/assets/337d11a7-b06b-45cb-b0da-dbe6f49c737a)
       and domainxml shows the disk as raw
   ```
          <disk type='file' device='disk'>                                      
                                                                                
                                                                                
                                                                              
         <driver name='qemu' type='raw' cache='none'/>                          
                       
   ```
   After fix these issues are resolved.
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to