[Linux] Dynamically set expected guest id and full name for checking guest info #655
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.
Since more new guest ids were added in newer VMware Tools, which will be unmapped on older ESXi version servers. This fix dynamically looked for an exactly matched guest id or a closest guest id for the guest OS distribution.
If it doesn't find an exactly matched or closest guest if from ESXi supported guest ids list, then looking for a proper other Linux guest id according to its kernel version.
match_guest_id.yml
will match an expected guest id based on guest short-name value in tools.conf or OS release info.map_guest_id_to_fullname.yml
will retrieve the guest full name in ESXi guest config options by guest id.However, it still could have unmapped guest ids when a guest can be identified by newer VMware Tools but not recognized on an old ESXi server. In such case, this case will take it as expected. Expected unmapped guest ids are checked in
check_unmapped_guest_id.yml