Skip to content

Commit

Permalink
fix: Try to different logic for smbiosVersion 2.7
Browse files Browse the repository at this point in the history
* Card ID: CCT-606
* Added more debug prints
* Changed the logic a little bit
* TODO: squash this and previous commit, when it will work
  as expected
  • Loading branch information
jirihnidek committed Jan 23, 2025
1 parent ff160c1 commit 0e4b19e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions virtwho/virt/esx/esx.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,15 @@ def getVmUuid(self, vm):
elif item.value == "FALSE":
smbios_version_27 = False

if 'config.version' not in vm:
return s
version = int(vm['config.version'].split('-')[1])
self.logger.debug(f"ESX acpi.smbiosVersion2.7: {smbios_version_27}")

version = 0
if 'config.version' in vm:
version = int(vm['config.version'].split('-')[1])
self.logger.debug(f"ESX config.version: {version} ({vm['config.version']})")
else:
self.logger.debug("ESX config.version not present")

if version >= 13 or smbios_version_27 is False:
return s[6:8] + s[4:6] + s[2:4] + s[0:2] + "-" + s[11:13] + s[9:11] + "-" + s[16:18] + s[14:16] + s[18:]
else:
Expand Down

0 comments on commit 0e4b19e

Please sign in to comment.