Skip to content

Conversation

@viddya673
Copy link
Contributor

Description

This PR adds multi-architecture support for IBM Z (s390x) to Apache CloudStack. The updates enable key CloudStack components to be built and run on both x86_64 (Intel/AMD) and s390x.

The implementation has been tested using s390x KVM hosts with full cross-architecture interoperability:
x86_64 Management Server <=> s390x Agent

Compatibility and functionality have been validated across the following distributions:
• RHEL
• SLES
• Ubuntu

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • 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
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Screenshot 2025-12-09 at 2 48 47 PM Screenshot 2025-12-09 at 2 58 04 PM Screenshot 2025-12-09 at 3 00 43 PM Screenshot 2025-12-09 at 3 02 20 PM Screenshot 2025-12-09 at 3 05 20 PM Screenshot 2025-12-09 at 3 10 08 PM Screenshot 2025-12-09 at 3 15 17 PM Screenshot 2025-12-09 at 3 20 05 PM Screenshot 2025-12-09 at 3 26 56 PM

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 9, 2025

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 17.46%. Comparing base (3c64847) to head (1dcf314).
⚠️ Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
...om/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main   #12214       +/-   ##
============================================
+ Coverage     3.58%   17.46%   +13.88%     
- Complexity       0    15528    +15528     
============================================
  Files          445     5913     +5468     
  Lines        37552   529410   +491858     
  Branches      6914    64685    +57771     
============================================
+ Hits          1347    92475    +91128     
- Misses       36039   426513   +390474     
- Partials       166    10422    +10256     
Flag Coverage Δ
uitests 3.58% <ø> (-0.01%) ⬇️
unittests 18.52% <75.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a 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 adds multi-architecture support for IBM Z (s390x) to Apache CloudStack, enabling key components to be built and run on both x86_64 and s390x architectures. The implementation enables cross-architecture interoperability between x86_64 management servers and s390x agents.

Key Changes:

  • Added s390x as a supported CPU architecture alongside existing x86_64 and aarch64 support
  • Updated UI components to include s390x in architecture selection dropdowns
  • Modified KVM hypervisor code to handle s390x-specific requirements (ACPI/SMBIOS exclusions)

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/src/views/infra/zone/ZoneWizardAddResources.vue Adds s390x architecture option to zone wizard
ui/src/views/infra/ClusterUpdate.vue Adds s390x architecture option to cluster update UI
ui/src/utils/plugins.js Adds s390x to global CPU architecture types utility
ui/src/components/view/DeployVMFromBackup.vue Adds s390x architecture option to VM deployment
plugins/integrations/kubernetes-service/.../ListKubernetesSupportedVersionsCmd.java Updates API documentation to include s390x
plugins/integrations/kubernetes-service/.../AddKubernetesSupportedVersionCmd.java Updates API documentation to include s390x
plugins/hypervisors/kvm/src/test/java/.../LibvirtComputingResourceTest.java Adds conditional test logic for s390x ACPI feature
plugins/hypervisors/kvm/src/main/java/.../LibvirtVMDef.java Excludes SMBIOS mode for s390x architecture
api/src/test/java/com/cloud/cpu/CPUTest.java Adds test coverage for s390x CPU architecture
api/src/main/java/.../template/RegisterTemplateCmd.java Updates API documentation to include s390x
api/src/main/java/.../template/ListTemplatesCmd.java Updates API documentation to include s390x
api/src/main/java/.../template/GetUploadParamsForTemplateCmd.java Updates API documentation to include s390x
api/src/main/java/.../template/CreateTemplateCmd.java Updates API documentation to include s390x
api/src/main/java/.../iso/RegisterIsoCmd.java Updates API documentation to include s390x
api/src/main/java/.../iso/ListIsosCmd.java Updates API documentation to include s390x
api/src/main/java/.../cluster/UpdateClusterCmd.java Updates API documentation to include s390x
api/src/main/java/.../cluster/AddClusterCmd.java Updates API documentation to include s390x
api/src/main/java/.../BaseUpdateTemplateOrIsoCmd.java Updates API documentation to include s390x
api/src/main/java/com/cloud/cpu/CPU.java Adds s390x to CPUArch enum

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good. Some suggestions. Copilot comments on UI consistency make sense

@blueorangutan package

}
}
guestDef.append("<smbios mode='sysinfo'/>\n");
if (!(_arch != null && _arch.equals("s390x"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_arch != null && _arch.equals("s390x"))) {
if (!CPU.CPUArch.s390x.getType().equalsIgnoreCase(_arch)) {

assertNodeExists(domainDoc, "/domain/features/pae");
assertNodeExists(domainDoc, "/domain/features/apic");
assertNodeExists(domainDoc, "/domain/features/acpi");
if (!"s390x".equals(System.getProperty("os.arch"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!"s390x".equals(System.getProperty("os.arch"))) {
if (!CPU.CPUArch.s390x.getType().equalsIgnoreCase(System.getProperty("os.arch"))) {

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15974

@viddya673 viddya673 force-pushed the feature_s390x_multiarch_support branch from 279c6a6 to 6fd6f8e Compare December 15, 2025 17:12
Signed-off-by: Niyam Siwach <[email protected]>
Signed-off-by: Viddya K <[email protected]>
@viddya673 viddya673 force-pushed the feature_s390x_multiarch_support branch from 6fd6f8e to 1dcf314 Compare December 16, 2025 05:21
@rohityadavcloud rohityadavcloud added this to the 4.23 milestone Dec 18, 2025
@rohityadavcloud
Copy link
Member

LGTM, great to see support for a new architecture @viddya673

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-15025)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 47541 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12214-t15025-kvm-ol8.zip
Smoke tests completed. 149 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_browser_migrate_template Error 65.64 test_image_store_object_migration.py

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@DaanHoogland DaanHoogland merged commit 558232e into apache:main Dec 19, 2025
28 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 19, 2025

Awesome work, congrats on your first merged pull request!

@DaanHoogland
Copy link
Contributor

@viddya673, will you be maintaining a regression suite on a s390 to make sure no regression creeps in from other code?

@niyamsw
Copy link
Contributor

niyamsw commented Dec 19, 2025

Yes — we’re working on adding GitHub Actions CI for s390x, now that it’s supported. This is currently a work in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants