1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B OpenNebula/one#6349: Fix VM template NIC (#2795)

This commit is contained in:
vichansson 2023-10-27 15:55:01 +03:00 committed by GitHub
parent 00b7ac4a3e
commit 93a039bd8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -151,6 +151,10 @@ const Steps = createSteps([General, ExtraConfiguration, CustomVariables], {
extraTemplate.CPU_MODEL.FEATURES.join(', ')
}
;['NIC', 'NIC_ALIAS'].forEach((nicKey) =>
extraTemplate?.[nicKey]?.forEach((NIC) => delete NIC?.NAME)
)
return jsonToXml({
...customVariables,
...extraTemplate,

View File

@ -62,6 +62,9 @@ const Steps = createSteps(
...vmTemplate?.TEMPLATE?.OS,
...extraTemplate?.OS,
})
;['NIC', 'NIC_ALIAS'].forEach((nicKey) =>
extraTemplate?.[nicKey]?.forEach((NIC) => delete NIC?.NAME)
)
// merge with template disks to get TYPE attribute
const templateXML = jsonToXml({