@@ -94,7 +94,8 @@ export default {
9494 async created () {
9595 await Promise .all [(
9696 this .fetchServiceOffering (),
97- this .fetchBackupOffering ()
97+ this .fetchBackupOffering (),
98+ this .fetchTemplateArch ()
9899 )]
99100 this .loading = false
100101 },
@@ -118,6 +119,18 @@ export default {
118119 this .backupOffering = backupOfferings[0 ]
119120 })
120121 },
122+ fetchTemplateArch () {
123+ return getAPI (' listTemplates' , {
124+ id: this .resource .vmdetails .templateid ,
125+ listall: true ,
126+ templatefilter: ' all'
127+ }).then (response => {
128+ const templates = response .listtemplatesresponse .template || []
129+ this .templateArch = templates[0 ]? .arch || ' x86_64'
130+ }).catch (() => {
131+ this .templateArch = ' x86_64'
132+ })
133+ },
121134 populatePreFillData () {
122135 this .vmdetails = this .resource .vmdetails
123136 this .dataPreFill .zoneid = this .resource .zoneid
@@ -128,6 +141,7 @@ export default {
128141 this .dataPreFill .backupid = this .resource .id
129142 this .dataPreFill .computeofferingid = this .vmdetails .serviceofferingid
130143 this .dataPreFill .templateid = this .vmdetails .templateid
144+ this .dataPreFill .templateArch = this .templateArch
131145 this .dataPreFill .allowtemplateisoselection = true
132146 this .dataPreFill .isoid = this .vmdetails .templateid
133147 this .dataPreFill .allowIpAddressesFetch = this .resource .isbackupvmexpunged
0 commit comments