apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2k stars 1.09k forks source link

kvm: Present the UUID of the VM as serial through smbios information #9236

Closed wido closed 3 weeks ago

wido commented 3 months ago

Description

This PR makes sure a KVM VM gets the UUID of the VM as a static serialnumber through smbios.

Some applications on primarily Windows servers require a stable serial number for licensing purposes. By providing this serial number we can make sure these applications can have a license configured.

More information: https://libvirt.org/formatdomain.html#smbios-system-information

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 15.32%. Comparing base (6fe835e) to head (4c91ade). Report is 263 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9236 +/- ## ========================================== Coverage 15.32% 15.32% - Complexity 11669 11671 +2 ========================================== Files 5456 5456 Lines 476839 476840 +1 Branches 58067 58630 +563 ========================================== + Hits 73080 73085 +5 + Misses 395684 395678 -6 - Partials 8075 8077 +2 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9236/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9236/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.19% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9236/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `16.08% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

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

wido commented 3 months ago

@wido code lgtm

I am curious what the serial number would be . Same as uuid or other string ?

It will be the UUID presented as the serialnumber

wido commented 3 months ago

clgtm, @wido can you add some more explenation of the intended use case (for testers and other users that might be interested)

Done! Just updated the start.