Closed lexcorp closed 4 months ago
Hi @lexcorp
indeed, this is probably the first time I see the agent reporting an array of one string where we expect directly a string. I can only guess something is wrong in the reported dmidecode output.
Can you report the dmidecode command output running from the glpi-agent folder:
C:\Program Files\GLPI-Agent>cd perl\bin
C:\Program Files\GLPI-Agent\perl\bin>dmidecode
Can you also report the output of the following command ?
wmic path Win32_Bios get /format:list
As far I know, Bochs is related to a virtualized system, so "vmsystem": "Physical",
is also probably wrong. Can you describe the used system as I'm not aware of such context ? And so, we may also need to update this support.
C:\Program Files\GLPI-Agent>cd perl\bin
C:\Program Files\GLPI-Agent\perl\bin>dmidecode
# dmidecode 3.5
wmic path Win32_Bios get /format:list
BiosCharacteristics=
BIOSVersion={"BOCHS - 1"}
BuildNumber=
Caption=Default System BIOS
CodeSet=
CurrentLanguage=
Description=Default System BIOS
EmbeddedControllerMajorVersion=
EmbeddedControllerMinorVersion=
IdentificationCode=
InstallableLanguages=
InstallDate=
LanguageEdition=
ListOfLanguages=
Manufacturer=
Name=Default System BIOS
OtherTargetOS=
PrimaryBIOS=TRUE
ReleaseDate=20140401000000.000000+000
SerialNumber=
SMBIOSBIOSVersion=
SMBIOSMajorVersion=
SMBIOSMinorVersion=
SMBIOSPresent=FALSE
SoftwareElementID=Default System BIOS
SoftwareElementState=3
Status=OK
SystemBiosMajorVersion=
SystemBiosMinorVersion=
TargetOperatingSystem=0
Version=BOCHS - 1
I´m using Proxmox Community Edition to virtualize windows 10
Okay, interesting to know you're using Proxmox Community Edition.
About dmidecode output, do you really have only the one line dmidecode version as output or were there troubles during copy/paste ?
If dmidecode output is empty, this can explain why the agent reports an array as it will take BIOSVersion
from WMI which seems weirdly reported as an array of string.
In your context, maybe you can check Proxmox community forums or know issues for a known problem with dmidecode on windows. Maybe you have an option to enable on VM. I see WMI reports SMBIOSPresent
is false
.
As it seems dmidecode is not use, can you share also the output for the following commands ?
wmic path Win32_ComputerSystem get /format:list
wmic path Win32_SystemEnclosure get /format:list
wmic path Win32_BaseBoard get /format:list
I will anyway add a check to avoid having a string array after parsing wmi output.
You still can eventually test if the following patch fixes your issue:
diff --git a/lib/GLPI/Agent/Task/Inventory/Win32/Bios.pm b/lib/GLPI/Agent/Task/Inventory/Win32/Bios.pm
index 7cf0ecd57..0bd5ba8f2 100644
--- a/lib/GLPI/Agent/Task/Inventory/Win32/Bios.pm
+++ b/lib/GLPI/Agent/Task/Inventory/Win32/Bios.pm
@@ -105,6 +105,7 @@ sub doInventory {
}
foreach (keys %$bios) {
+ $bios->{$_} = shift @{$bios->{$_}} if ref($bios->{$_}) eq 'ARRAY';
$bios->{$_} =~ s/\s+$// if $bios->{$_};
delete $bios->{$_} if isInvalidBiosValue($bios->{$_});
}
Hi @g-bougard apply the patch fixes this issue, thank you very much!!!
Hi @lexcorp I just pushed the fix in fa2d4e7
Bug reporting acknowledgment
Yes, I read it
Professional support
None
Describe the bug
GLPI Server version 10.0.11 I have Glpi Agent 1.7.1 version installed on Virtual Machine with Windows 10 Operating System:
When I run Task Inventory:
After a few seconds, I get this error message:
And task inventory do not execute succesfully.
To reproduce
Expected behavior
Task inventory execute succesfully and inventory the PC virtual machine
Operating system
Windows, Linux
GLPI Agent version
1.7
GLPI version
10.0.11
GLPIInventory plugin or FusionInventory for GLPI plugin version
GLPI Inventory v1.3.4
Additional context
I test glpi-inventory from cmd: