cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

add The name of the Qemu binary to look for.

Open a1768623020 opened this issue 1 year ago • 6 comments
trafficstars

Description

This PR adds the qemu'binary option for building SystemVM and provides an option for building Arm64 architecture By default, Packer only looks for programs with a binary name of qemu-system-x86_64, while on arm64, the name is qemu-kvm. Running the script directly on arm64 will result in a build failure

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [x] Trivial

Screenshots (if appropriate):

Before adding options PixPin_2024-04-01_11-01-21

After adding options PixPin_2024-04-01_11-00-21

How Has This Been Tested?

An error occurred when using the build script to build. Upon checking the template file, it was found that the system virtual machine image file points to the x86_64 download address. After changing the download address and checksum, the build script was run again and it was found that it still cannot be built normally. When checking the build configuration of the packer, it was found that by default, the qemu component of the packer looks for the qemu-system-x86_64 binary program, which does not exist on the arm64 server. After adding this option and modifying it to qemu-kvm, the script can be built normally

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

Ignore this section

a1768623020 avatar Apr 01 '24 03:04 a1768623020

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:

  • In case of a new feature add useful documentation (raise doc PR at https://github.com/apache/cloudstack-documentation)
  • Be patient and persistent. It might take some time to get a review or get the final approval from the committers.
  • Pay attention to the quality of your code, ensure tests are passing and your PR doesn't have conflicts.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Issues, Mailing list and Slack.
  • Be sure to read the CloudStack Coding Conventions. Apache CloudStack is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: Mailing List: [email protected] (https://cloudstack.apache.org/mailing-lists.html) Slack: https://apachecloudstack.slack.com/

boring-cyborg[bot] avatar Apr 01 '24 03:04 boring-cyborg[bot]

@a1768623020 will it break the systemvm templates build on rocky/rhel/alma host ?

the hosts do not have file qemu-system-x86_64, but /usr/libexec/qemu-kvm

weizhouapache avatar Apr 02 '24 12:04 weizhouapache

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 30.93%. Comparing base (88d2504) to head (abdd113). :warning: Report is 1414 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8855      +/-   ##
============================================
- Coverage     31.12%   30.93%   -0.19%     
+ Complexity    34000    33780     -220     
============================================
  Files          5404     5404              
  Lines        380309   380309              
  Branches      55507    55507              
============================================
- Hits         118372   117656     -716     
- Misses       246252   247040     +788     
+ Partials      15685    15613      -72     
Flag Coverage Δ
simulator-marvin-tests 24.57% <ø> (-0.30%) :arrow_down:
uitests 4.34% <ø> (ø)
unit-tests 16.88% <ø> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Apr 02 '24 15:04 codecov-commenter

@a1768623020 will it break the systemvm templates build on rocky/rhel/alma host ?

the hosts do not have file qemu-system-x86_64, but /usr/libexec/qemu-kvm

no,The default value is qemu-system-x86_64 If I don't add this option, he will also look for it. Adding this option is only for compiling other architectures https://developer.hashicorp.com/packer/integrations/hashicorp/qemu/latest/components/builder/qemu#optional:

a1768623020 avatar Apr 08 '24 06:04 a1768623020

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

github-actions[bot] avatar Jul 26 '24 14:07 github-actions[bot]

@a1768623020 can you check the conflicts?

DaanHoogland avatar Aug 12 '24 11:08 DaanHoogland