Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing VM network information using fusioninventory-esx #867

Open
jeromedrouet opened this issue Dec 3, 2020 · 3 comments
Open

Missing VM network information using fusioninventory-esx #867

jeromedrouet opened this issue Dec 3, 2020 · 3 comments

Comments

@jeromedrouet
Copy link

Hi,

VM network information (mac address, description) is missing from when importing .ocs inventory file generated by fusioninventory-esx (and using create_vm parameter to import them as usual computer using glpi plugin)

seems like .ocs inventory file provides only one "MAC" text field whereas fusioninventory plugin for glpi expects several NETWORKS->MACADDRESS/DESCRIPTION entries

related to fusioninventory/fusioninventory-for-glpi#2779

regards,

@jeromedrouet
Copy link
Author

adding patch to fix this issue
add_vm_macaddress.patch.txt

@g-bougard
Copy link
Contributor

Hi @jeromedrouet

thank you for your submission.

By the way, your patch is changing inventory specs and you're not showing any example of what this will change. So we can't really see the added value.
Also as the spec is changed, this means the server won't support this and you won't see the change in GLPI.

@jeromedrouet
Copy link
Author

jeromedrouet commented Dec 3, 2020

"old" fashion inventory gives this as a virtualmachine :

    <VIRTUALMACHINES>
      <COMMENT></COMMENT>
      <MAC>00:50:56:xx:yy:zz</MAC>
      <MEMORY>4096</MEMORY>
      <NAME>Template_W2k16</NAME>
      <STATUS>off</STATUS>
      <UUID>4222e3a0-408d-4639-e036-xsxsxssxxsxssx</UUID>
      <VCPU>1</VCPU>
      <VMTYPE>VMware</VMTYPE>
    </VIRTUALMACHINES>

with the attached patch we get this :

    <VIRTUALMACHINES>
      <COMMENT></COMMENT>
      <MEMORY>4096</MEMORY>
      <NAME>TPL_W2k16</NAME>
      <NETWORKS>
        <DESCRIPTION>Network adapter 1</DESCRIPTION>
        <MACADDR>00:50:56:xx:yy:zz</MACADDR>
      </NETWORKS>
      <NETWORKS>
        <DESCRIPTION>Network adapter 2</DESCRIPTION>
        <MACADDR>00:50:56:aa:bb:cc</MACADDR>
      </NETWORKS>
      <STATUS>off</STATUS>
      <UUID>4222e3a0-408d-4639-e036-xsxsxssxxsxssx</UUID>>
      <VCPU>1</VCPU>
      <VMTYPE>VMware</VMTYPE>
    </VIRTUALMACHINES>

which is what is expected by the fusioninventory glpi plugin ( file inc/formatconvert.class.php, the section dealing with the create_vm option (line 1374 on version 9.4+2.4 of FusionInventory GLPI plugin)

with the patch using create_vm option set to true we do have "computer" creation from VM using fusioninventory-esx and they have the mac address of their NIC (they dont have any NICs without this patch)

this fix may be close to the "missing drives" issue linked above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants