Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

How to detect virtual machine (VM)?

Hi,

TLDR

I am looking for information about a way to detect the virtual machines that are installed on hosts that run an agent (linux and windows).

Context

I have a few hosts (Windows and Linux) where I have installed OCS agent. All my hosts runs virtual machine (Windows and/or Linux) on a hypervisor (VirtualBox for linux and some Windows host, Hyper-V for windows host).

All my hosts are able to report to my OCS server, but there is a problem. They do not report about the fact that they host virtual machine.

Question

I am wandering if there is a way to discover virtual machine. If so, how to discover virtual machines?

Search

I've found in the source code of agents (windows and linux) that there is a module that scan for VMs. I haven't found the way to run that module. Maybe it is always launch?


Thanks

in OCS Inventory NG agent for Unix by (120 points)
edited by

5 Answers

0 votes
Hi,

Which version of ocs server and agent are you running?

Regards

Frank
by (90.4k points)
+1 vote

Same Problem here with OCS-NG_WINDOWS_AGENT_v2.6.0.0

All my hosts are able to report to my OCS server  they don't report informations about the virtual machines on it.

by (180 points)
0 votes
hi, maybe this helps to get an idea how it should look

Ocs server version : 2.3.1

https://github.com/OCSInventory-NG/OCSInventory-Server/issues/56

for older ocs-inventory versions

https://www.neteye-blog.com/2013/12/virtual-machine-inventory/

Kind regards
by (24.5k points)
0 votes
Hi,

OCS Windows agent don't inventory natively virtual machines hosted by hyper-v. A plugin is planed for that.

Regards

Frank
by (90.4k points)
0 votes
perhaps this helps to develop a plugin which maches the vm and the host.

The host name of a virtual machine is stored in the registry key

hkey_local_machine\Software\Microsoft\Virtual Machine\Guest\Parameters\PhysicalHostName

(you need to have the ocs-agent on every VM to geht this information)

i use this information via ocs-inventory registry query to detect on which host a virtual machine is running. yes i know you want to get the information from the hyper-v host.
by (24.5k points)
 
Powered by Question2Answer
...