-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update System VM template Guest OS version #11291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Update System VM template Guest OS version #11291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the System VM template Guest OS version from older Debian/Linux versions to Debian GNU/Linux 12 (64-bit) across all hypervisor types. This is a bug fix to ensure system VMs use the correct and updated guest OS configuration.
Key Changes:
- Updated guest OS ID mapping for all hypervisors to use Debian 12 (LINUX_12_ID = 363)
- Added dynamic guest OS lookup functionality to resolve the actual guest OS ID at runtime
- Replaced hardcoded legacy Linux IDs with the new Debian 12 configuration
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Outdated
Show resolved
Hide resolved
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Show resolved
Hide resolved
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Outdated
Show resolved
Hide resolved
31185a5
to
f6b506b
Compare
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11291 +/- ##
============================================
- Coverage 16.16% 16.16% -0.01%
Complexity 13278 13278
============================================
Files 5656 5656
Lines 497880 497907 +27
Branches 60378 60381 +3
============================================
Hits 80463 80463
- Misses 408463 408489 +26
- Partials 8954 8955 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14357 |
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Outdated
Show resolved
Hide resolved
f6b506b
to
4be98d5
Compare
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14424 |
@@ -731,6 +748,7 @@ public void registerTemplateForNonExistingEntries(Hypervisor.HypervisorType hype | |||
Long templateId = null; | |||
try { | |||
MetadataTemplateDetails templateDetails = getMetadataTemplateDetails(hypervisor, arch); | |||
updateSystemVmTemplateGuestOsId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @sureshanaparti , could you please explain the reason for this? Wouldn't https://github.com/apache/cloudstack/pull/11291/files#diff-a9c9a38684718059c060de404bf9529de96e502f1e81b30793e6a32f725042a9R339 already handle it? I'm probably missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guest os id for debian 5 is hardcoded to 15 (very old entries), later user is allowed to add guest os and there are no hardcoded ids. if there are no user guest os added, the default id for debian 12 would be 363. this call will update the guest os id before registering the non existing systemvm templates. Moved this call to updateSystemVmTemplates().
update `cloud`.`guest_os` set display_name = 'Debian GNU/Linux 5.0 (32-bit)' where id=15; |
cloudstack/engine/schema/src/main/resources/META-INF/db/schema-21to22.sql
Lines 962 to 963 in 4aed972
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type) | |
VALUES (3, 'routing-3', 'SystemVM Template (KVM)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloudstack.org/releases/2.2.0/systemvm.qcow2.bz2', 'ec463e677054f280f152fcc264255d2f', 0, 'SystemVM Template (KVM)', 'QCOW2', 15, 0, 1, 'KVM'); |
mysql> SELECT * FROM cloud.guest_os WHERE display_name = 'Debian GNU/Linux 12 (64-bit)';
+-----+-------------+------+--------------------------------------+------------------------------+---------------------+---------+-----------------+---------+
| id | category_id | name | uuid | display_name | created | removed | is_user_defined | display |
+-----+-------------+------+--------------------------------------+------------------------------+---------------------+---------+-----------------+---------+
| 363 | 2 | NULL | 565d58aa-ade8-468d-a829-036e73f11961 | Debian GNU/Linux 12 (64-bit) | 2025-07-28 15:13:07 | NULL | 0 | 1 |
+-----+-------------+------+--------------------------------------+------------------------------+---------------------+---------+-----------------+---------+
1 row in set (0.00 sec)
@blueorangutan test matrix |
@Pearl1594 a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests |
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14426 |
7d61ee9
to
9e9c44c
Compare
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14431 |
[SF] Trillian test result (tid-13949)
|
[SF] Trillian test result (tid-13950)
|
[SF] Trillian test result (tid-13951)
|
@blueorangutan test matrix |
@DaanHoogland a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests |
[SF] Trillian Build Failed (tid-13957) |
[SF] Trillian test result (tid-13952)
|
[SF] Trillian Build Failed (tid-13959) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
[SF] Trillian test result (tid-13958)
|
[SF] Trillian test result (tid-13960)
|
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14486 |
@blueorangutan test |
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
This PR updates System VM template Guest OS version, to Debian GNU/Linux 12 (64-bit). A new guestos field added to metadata.ini file for systemvm templates.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Verified in fresh deployment.
MS log, updating systemvm templates:
metadata.ini file:
DB:
How did you try to break this feature and the system with this change?