sureshanaparti commented on PR #11754:
URL: https://github.com/apache/cloudstack/pull/11754#issuecomment-3400396189

   Manually verified the below tests. LGTM 
   
   - Created instance from backup (with it’s source template deleted) and not 
selected any template - Failed with “Unable to find template associated with 
the backup. Please specify another valid Template/ISO for creating the 
instance.” 
   - Created instance from backup (with it’s source template deleted) and 
selected another available template of same OS type - Pass
   - Created instance from backup (with it’s source template deleted) and 
selected another available template of different OS type - Pass (Warning is 
shown on the UI for different OS type template)
   <img width="1455" height="753" alt="InstanceFromBackupOnDiffZone" 
src="https://github.com/user-attachments/assets/2a24c9be-9cb8-4f5f-bd51-0a1876b65082";
 />
   
   - Created Instance from Backup on another Zone using normal user account, 
with backup on backup repository with Cross Zone enabled - showing Zone options 
in UI and able to create instance on another Zone - Pass
   - Create Instance from Backup on another Zone using normal user account, 
with backup on backup repository without Cross Zone enabled - not showing Zone 
options in UI. With API, Failed with “Internal error executing command, please 
contact your system administrator” for user admin, and “Create Instance from 
Backup on another Zone is not supported by this provider or the Backup 
Repository.” for admin account
   - Created Instance from Backup after expunging the backup instance, and 
reused IP Address - Pass
   
   **API:**
   
   - _crosszoneinstancecreation_ in response parameter in list 
backupproviderofferings call.
   ```
   (localcloud) 🐱 > list backupproviderofferings 
zoneid=222431f6-8ece-47fa-897d-0b36ce188069 
   {
     "backupoffering": [
       {
         "allowuserdrivenbackups": true,
         "crosszoneinstancecreation": true,
         "description": "NAS Backup Offering (Repository)",
         "externalid": "3515ee41-0f66-4c2b-84ab-8c298d8f648a",
         "id": "3515ee41-0f66-4c2b-84ab-8c298d8f648a",
         "name": "backuprepo1",
         "provider": "nas"
       },
       {
         "allowuserdrivenbackups": true,
         "description": "NAS Backup Offering (Repository)",
         "externalid": "0157bad3-424f-4caf-8cd9-82c8ded9296a",
         "id": "0157bad3-424f-4caf-8cd9-82c8ded9296a",
         "name": "backuprepo2notcrosszone",
         "provider": "nas"
       }
     ],
     "count": 2
   }
   ```
   - _isbackupvmexpunged_ response parameter in list backups call.
   ```
   (localcloud) 🐱 > list backups
   {
     "backup": [
       {
         "account": "admin",
         "accountid": "4622c1dd-a4f2-11f0-91dc-1e00e6000357",
         "backupofferingid": "8ccf2e57-e715-419d-9aac-875101adad88",
         "backupofferingname": "backuprepo1",
         "created": "2025-10-14T04:42:15+0000",
         "description": "testvm02-backup01",
         "domain": "ROOT",
         "domainid": "f10c1afc-a4f1-11f0-91dc-1e00e6000357",
         "externalid": "i-2-6-VM/2025.10.14.04.41.49",
         "id": "8101fa92-da07-44f8-b477-d759a41d4d47",
         "intervaltype": "MANUAL",
         "isbackupvmexpunged": true,
         "name": "testvm02-backup01",
         "size": 2093685408,
         "status": "BackedUp",
         "type": "FULL",
         "virtualmachineid": "76682b15-78d1-41df-9714-6d15072610a1",
         "virtualmachinename": "testvm02",
         "virtualsize": 13958643712,
         "vmbackupofferingremoved": true,
         "volumes": 
"[{\"uuid\":\"d32478d5-84d7-4567-9695-21f6ed2ef110\",\"type\":\"ROOT\",\"size\":8589934592,\"path\":\"d32478d5-84d7-4567-9695-21f6ed2ef110\",\"deviceId\":0,\"diskOfferingId\":\"566ae458-25aa-48af-9761-a1fd0172b1f6\"},{\"uuid\":\"07f8f6f8-6e89-42c0-922f-d1efc71fbbb5\",\"type\":\"DATADISK\",\"size\":5368709120,\"path\":\"07f8f6f8-6e89-42c0-922f-d1efc71fbbb5\",\"deviceId\":1,\"diskOfferingId\":\"b94e3254-5e5a-49d8-ac2f-d05eb6521af7\"}]",
         "zone": "pr11754-t14599-kvm-ol8",
         "zoneid": "222431f6-8ece-47fa-897d-0b36ce188069"
       }
     ],
     "count": 1
   }
   ```
   
   **DB:**
   
   - Details persisted in cloud.backup_details table.
   ```
   mysql> SELECT * FROM cloud.backup_details;
   
+----+-----------+-------------------+-----------------------------------------------------------------------------------------------------------------+---------+
   | id | backup_id | name              | value                                 
                                                                          | 
display |
   
+----+-----------+-------------------+-----------------------------------------------------------------------------------------------------------------+---------+
   |  7 |         1 | nics              | 
[{"ipaddress":"10.1.1.7","networkid":"0305496f-da01-472c-a7be-1ceab6c29f26","macaddress":"02:01:00:cc:00:03"}]
  |       1 |
   |  8 |         1 | vmsettings        | 
{"cpuOvercommitRatio":"2.0","rootDiskController":"osdefault"}                   
                                |       1 |
   |  9 |         1 | templateid        | c214afa2-e649-45f2-9a93-41a2ec020ead  
                                                                          |     
  1 |
   | 10 |         1 | serviceofferingid | 10ad2900-9174-4dbf-a8f4-b6f4d6423da5  
                                                                          |     
  1 |
   | 11 |         1 | osname            | CentOS 5.5 (64-bit)                   
                                                                          |     
  1 |
   | 12 |         1 | ostypeid          | f1416dd0-a4f1-11f0-91dc-1e00e6000357  
                                                                          |     
  1 |
   | 19 |         2 | nics              | 
[{"ipaddress":"10.1.1.93","networkid":"b9e7d331-2e29-4259-8c8a-49cacf5b1337","macaddress":"02:01:00:d1:00:01"}]
 |       1 |
   | 20 |         2 | vmsettings        | {"cpuOvercommitRatio":"2.0"}          
                                                                          |     
  1 |
   | 21 |         2 | templateid        | f1142d10-a4f1-11f0-91dc-1e00e6000357  
                                                                          |     
  1 |
   | 22 |         2 | serviceofferingid | 10ad2900-9174-4dbf-a8f4-b6f4d6423da5  
                                                                          |     
  1 |
   | 23 |         2 | osname            | CentOS 5.5 (64-bit)                   
                                                                          |     
  1 |
   | 24 |         2 | ostypeid          | f1416dd0-a4f1-11f0-91dc-1e00e6000357  
                                                                          |     
  1 |
   | 31 |         3 | nics              | 
[{"ipaddress":"10.1.1.54","networkid":"b9e7d331-2e29-4259-8c8a-49cacf5b1337","macaddress":"02:01:00:d1:00:03"}]
 |       1 |
   | 32 |         3 | vmsettings        | {"cpuOvercommitRatio":"2.0"}          
                                                                          |     
  1 |
   | 33 |         3 | templateid        | f1142d10-a4f1-11f0-91dc-1e00e6000357  
                                                                          |     
  1 |
   | 34 |         3 | serviceofferingid | 10ad2900-9174-4dbf-a8f4-b6f4d6423da5  
                                                                          |     
  1 |
   | 35 |         3 | osname            | CentOS 5.5 (64-bit)                   
                                                                          |     
  1 |
   | 36 |         3 | ostypeid          | f1416dd0-a4f1-11f0-91dc-1e00e6000357  
                                                                          |     
  1 |
   
+----+-----------+-------------------+-----------------------------------------------------------------------------------------------------------------+---------+
   18 rows in set (0.00 sec)
   ```


-- 
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