lib/host: add method to get system uuid#499
Merged
Merged
Conversation
glehmann
reviewed
Apr 24, 2026
Comment on lines
+472
to
+475
| ssh_result = self.ssh_with_result("dmidecode -s system-uuid") | ||
| system_uuid = str(ssh_result.stdout) | ||
|
|
||
| return system_uuid.lower().rstrip('\n') |
Member
There was a problem hiding this comment.
Suggested change
| ssh_result = self.ssh_with_result("dmidecode -s system-uuid") | |
| system_uuid = str(ssh_result.stdout) | |
| return system_uuid.lower().rstrip('\n') | |
| return self.ssh("dmidecode -s system-uuid").lower().strip() |
Or do you want the dmidecode to silently fail?
c5a18ea to
76e5037
Compare
glehmann
approved these changes
Apr 27, 2026
rzr
reviewed
Apr 27, 2026
|
|
||
| ref: `dmidecode(8) <https://man.archlinux.org/man/dmidecode.8.en#s>__` | ||
| """ | ||
| return self.ssh("dmidecode -s system-uuid").lower().strip() |
Contributor
There was a problem hiding this comment.
Suggested change
| return self.ssh("dmidecode -s system-uuid").lower().strip() | |
| return self.ssh("dmidecode -s system-serial-number").lower().strip() |
I've found a bug while testing it, using SN is aligned to XE uuid (sys uuid has first bytes flipped)
- good (system-serial-number) : 4d8820d1-b103-839e-e3ea-04bfad19e77c
- bad (system-uuid) : d120884d-03b1-9e83-e3ea-04bfad19e77c
cc: @ydirson
Member
There was a problem hiding this comment.
@olivierh-pro I thought we tested it manually, didn't we?
Contributor
There was a problem hiding this comment.
Forget my suggestion, I think uuid is correct semantically speaking, I think the bug is elsewhere, I am narrowing the problem since I have a reproducer
rzr
requested changes
Apr 27, 2026
rzr
approved these changes
Apr 28, 2026
System uuid is the uuid of the host scoped into its physical parent host. It is used in a context of nested hosts. Signed-off-by: Olivier Hoareau <olivier.hoareau@vates.tech>
76e5037 to
a620686
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System uuid is the uuid of the host scoped into its physical parent host. It is used in a context of nested hosts.
If the current host is a nested host, snapshot creation must be done through its physical parent host (because the "nested host" is actually a VM).
This PR add a new method in host class to get the system uuid (using
dmidecode -s system-uuid).With this uuid, we can then perform a snapshot of the
VMnested host.This work is a preliminiary work for future code changes (#468)