fusioninventory-agent icon indicating copy to clipboard operation
fusioninventory-agent copied to clipboard

No virtualization detected with Proxmox/Debian 10

Open redfish8 opened this issue 3 years ago • 6 comments

Hi, I have a Proxmox environment running under Debian 10, when the inventory runs the debug shows :

... [debug] Running FusionInventory::Agent::Task::Inventory::Provider [debug] Running FusionInventory::Agent::Task::Inventory::Virtualization::Lxc [debug] Running FusionInventory::Agent::Task::Inventory::Virtualization::Qemu [debug] [http client] Using Compress::Zlib for compression...

But no vms are found, I think the issue is that on that hypervisor the command to list the vms is qm and not qemu|kvm|qemu-kvm|qemu-system as I found in FusionInventory::Agent::Task::Inventory::Virtualization::Qemu.

Any idea how to make it work ?

Thanks

redfish8 avatar Jan 20 '22 11:01 redfish8

You have try to add qm in the list in FusionInventory::Agent::Task::Inventory::Virtualization::Qemu to see if it works ?

ddurieux avatar Jan 20 '22 11:01 ddurieux

I added the qm command in lib/FusionInventory/Agent/Task/Inventory/Virtualization.pm 20 : canRun('qm') || 80 : next if $process->{CMD} !~ /(qm|qemu|kvm|qemu-kvm|qemu-system\S+) .*\S/x;

I have now two vms shown in the glpi Virtualization tab which is correct for this host, but the other data are wrong :

List of virtualized environments Name | Comment | Automatic Inventory | Virtualization System | Virtualization Model | State | UUID | Processors Number | Memory (MB) | Machine N/A | | Yes | qemu | qemu | running | | 1 | 0 N/A | | Yes | qemu | qemu | running | | 1 | 0

The correct output is qm list VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID
727 debian10 stopped 4096 2.00 0
147217984 rdb stopped 16384 2.00 0

I guess more work has to be done on Qemu.pm to get and parse correctly the qm output, I'm not a programmer but I will try.

Thank you for your fast reply

redfish8 avatar Jan 20 '22 12:01 redfish8

ok, so qm is qemu or other?

ddurieux avatar Jan 20 '22 13:01 ddurieux

qm is a proxmox command as it's written here it is kvm specific. In the graphical interface the vms are showed as type "QEMU". I'm a bit new to that environment, I apologize if my feedback is not clear enough.

redfish8 avatar Jan 20 '22 13:01 redfish8

I never use it, that's why I ask :D I will read the documentation

ddurieux avatar Jan 20 '22 13:01 ddurieux

Thanks a lot, I'm available for testing in case.

redfish8 avatar Jan 20 '22 13:01 redfish8