Guest OS rules by BryanMLima · Pull Request #10098 · apache/cloudstack · GitHub
Skip to content

Guest OS rules#10098

Merged
winterhazel merged 7 commits into
apache:mainfrom
scclouds:guest-os-rules
Jun 15, 2026
Merged

Guest OS rules#10098
winterhazel merged 7 commits into
apache:mainfrom
scclouds:guest-os-rules

Conversation

@BryanMLima

@BryanMLima BryanMLima commented Dec 12, 2024

Copy link
Copy Markdown
Contributor

Description

Currently, ACS provides a feature that enables a guest OS preference for a specific host, prioritizing VMs based on its OS. However, this functionality allows VMs with different OSes to be deployed in a host with a Guest OS defined, as expected as it is only a preference configuration; this is not always desired. For example, keeping proprietary OS in the same host could reduce licensing costs.

This PR tackles this scenario, allowing JavaScript rules, using the JS interpreter introduced in #5909, to direct VMs to specific hosts based on their OS. Different from the guest OS preference, these guest OS rules will be strict. This new feature added a new field, Guest OS as JS rule in the host edit view to allow users the creation of these rules.

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

Screenshots (if appropriate):

image

How Has This Been Tested?

In a local lab with two hosts (host-1 and host-2) I created the guest OS rule vmGuestOs.toLowerCase().indexOf("debian") != -1 for host-2, and deployed multiple VMs using templates and ISOs.

  • I deployed VMs with Ubuntu and CentOS and verify that host-2 was filtered during the deployment.
  • I tried to migrate these VMs to host-2 and verified that it was not possible.
  • I deployed a Debian VM and verified that both hosts were considered in the deployment process.
  • I managed to migrate this VM from host-1 to host-2 and vice versa.

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

I tried to deploy VMs in the same lab without the guest OS rules defined and validated that the deployment of VMs were being done as expected.

@codecov

codecov Bot commented Dec 12, 2024

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jan 8, 2025

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@github-actions

github-actions Bot commented Feb 1, 2025

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13624

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13720

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13731

@DaanHoogland

Copy link
Copy Markdown
Contributor

@BryanMLima can you look at the conflicts?

@BryanMLima

Copy link
Copy Markdown
Contributor Author

@BryanMLima can you look at the conflicts?

I will take a look this week, apologies for disappearing 😅 .

@github-actions

github-actions Bot commented Jul 3, 2025

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@winterhazel

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@hsato03 hsato03 self-requested a review June 8, 2026 12:54
Comment thread server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java Outdated
Comment thread ui/public/locales/pt_BR.json
@winterhazel

Copy link
Copy Markdown
Member

@blueorangutan package

@hsato03 hsato03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CLGTM

@winterhazel

Copy link
Copy Markdown
Member

@DaanHoogland @weizhouapache @sureshanaparti can we run the CI here one last time?

@winterhazel

Copy link
Copy Markdown
Member

@Pearl1594 can we run the CI here? Thanks.

@Pearl1594

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@winterhazel winterhazel merged commit 2081ac4 into apache:main Jun 15, 2026
25 of 27 checks passed
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.

10 participants