SaschaS Valued Contributor.
Valued Contributor.
435 views

Operations Orchestration - VMware - Get Details of NIC

Hello, all.

I have some trouble to use the "Get Details of NIC" operation from the Content Pack "Virtualization [1.12.0]". The operation is located in:

/Virtualization [1.12.0]/Library/Integrations/VMware/VMware Virtual Infrastructure and vSphere/Virtual Machines/Configuration/Network Adapters/Get Details of NIC

I call the operation with the following parameters:

Parameter Value host <vmware vcenter hostname> user <user> password <password> port 443 protocol https closeSession true vmIdentifierType Name virtualMachine myTestVM vmDatacenter   deviceNumber 1

 

I get the follwoing error with this configuration:

com.vmware.vim25.ManagedObjectNotFound

See screenshot:

get_vm_nic_error.jpg

The VM exists and the user given has the appropriate rights.

I have no problems with using the operations "Get Virtual Machine" from the same content pack with nearly the same parameters. This works well.

I have also tried different "vmIdentifierType" values such as "UUID" or "VMid" and the corresponding value. This is also not working.

Iterestingly I get a different error message if I enter a non existing VM Name. The error message is then:

VM specified as "NAME:Foo:" not found

That indicates to me, that the VM is found but the NIC could not read correctly.

If I enter as "deviceNumber" the value 0 I get the following error message:

No NIC numbered "0" found on VM

It seems to me that all input is correct but somehow the strange error "MangedObjectNotFound" occurs.

Does anyone has similar issues?

Can someone successfully execute this operation against a VM?

Any information and help would be appreciated.

Many thanks.

Best Regards

   Sascha

0 Likes
6 Replies
SaschaS Valued Contributor.
Valued Contributor.

Re: Operations Orchestration - VMware - Get Details of NIC

Additional information: with REST (via Postman) the query works like a charm:

https://vcenter.company.com/rest/vcenter/vm/vm-123/hardware/ethernet/4000

Result:

{
  "value": {
    "start_connected": true,
    "backing": {
      "connection_cookie": 1688948856,
      "distributed_switch_uuid": "f1 fe 17 50 a1 c0 24 c0-30 21 6a a7 de 19 f7 c1",
      "distributed_port": "1772",
      "type": "DISTRIBUTED_PORTGROUP",
      "network": "dvportgroup-2192"
    },
    "mac_address": "00:50:56:97:03:7d",
    "mac_type": "ASSIGNED",
    "allow_guest_control": true,
    "wake_on_lan_enabled": true,
    "label": "Network adapter 1",
    "state": "CONNECTED",
    "type": "VMXNET3",
    "upt_compatibility_enabled": true
  }
}

I'm using the same credentials as with the OO operation.

0 Likes
Outstanding Contributor.. csaunderson Outstanding Contributor..
Outstanding Contributor..

Re: Operations Orchestration - VMware - Get Details of NIC

Not sure if it helps or not, but I was able to successfully return the network interface details from this operation.  I used the Hostname of the VM, and then the Network Adapter # inside VMware passed as the input to deviceNumber.

 

I am using the 1.9 virtualization CP, however i tested with 1.13.1 and it was also successful.

 

--Chris

0 Likes
SaschaS Valued Contributor.
Valued Contributor.

Re: Operations Orchestration - VMware - Get Details of NIC

Hi, Chris.

Thanks for sharing this information.

Maybe you could provide the information of the vCenter Version. In my case the version is 6.5

Could you also provide the values for the following input parameters of the operation "Get Details of NIC":

- vmIdentifierType

- vmDatacenter

- deviceNumber

Thank you very much 🙂

Cheers

   Sascha

0 Likes
Outstanding Contributor.. csaunderson Outstanding Contributor..
Outstanding Contributor..

Re: Operations Orchestration - VMware - Get Details of NIC

VCSA 6.7, though I'm pretty sure I could replicate it on a VCSA 6.5 platform.

 

vmIdentifierType HOSTNAME

vmDatacenter (null)

deviceNumber 1

 

--Chris

0 Likes
SaschaS Valued Contributor.
Valued Contributor.

Re: Operations Orchestration - VMware - Get Details of NIC

Hi, Chris.

Thanks for the additional information. But it doesn't work for me. I get the error message:

{returnResult=VM specified as "HOSTNAME:u999abcd001t:" not found;Result=;}

 

And this VM exists in the vCenter and I could query it with the operation "Get Virtual Machine".

But this is not so urgent any more because I built an operation which call the REST API of the vCenter and do the job 😉

Cheers
   Sascha

0 Likes
Outstanding Contributor.. csaunderson Outstanding Contributor..
Outstanding Contributor..

Re: Operations Orchestration - VMware - Get Details of NIC

I could replicate that exact error when I used a VM hostname that wasn't in my VCSA, or when I passed a shortname when the name inside VCSA was FQDN (and vice-versa).

C'est la VM, I suppose. Hitting the VCenter REST API is just as valid as an OO operation. Glad you got it working!

 

--Chris

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.