Update Virtual NIC operation


The Update Virtual NIC operation updates the virtual network interface card (NIC) on a host network.

The following table describes the elements for this request:

Adapter request elements for the Update Virtual NIC operation 

Element

Definition

Required

<operation-type>

Specifies the type of the operation: Host

No

<operation-name>

Specifies the name of the operation: Update_Virtual_NIC

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Note: If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Note: If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware VirtualCenter in the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center application

If you do not specify a user name, the request is executed with the user name that you specify in the adapter configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<host-system>

Specifies the domain name server (DNS) name of the host on the network in which the virtual NIC is to be updated

Valid value: Any valid DNS name

Yes

<device>

Specifies the name of the NIC to update

Yes

<nic>

Contains the specification for the host virtual NIC

For more information, see the child elements of the <nic> element.

Yes

The following code sample shows a sample adapter request for the Update Virtual NIC operation:

Sample adapter request for the Update Virtual NIC operation

<vmware-infrastructure-request>
   <operation-type>Host</operation-type>
   <operation-name>Update_Virtual_NIC</operation-name>
   <parameters>
     <host-system>10.128.249.70</host-system>
     <device>vmk2</device>
     <nic>
       <ip>
         <dhcp>false</dhcp>
         <ip-address>10.128.249.91</ip-address>
         <subnet-mask>255.255.254.0</subnet-mask>
       </ip>
       <mac />
       <portgroup>VMkernelTest</portgroup>
       <mtu>1300</mtu>
     </nic>
   </parameters>
 </vmware-infrastructure-request>

The following code sample shows the response for the sample Update Virtual NIC operation:

Sample adapter response for the Update Virtual NIC operation

<adapter-response>
 <execution-duration>3034</execution-duration>
 <status>success</status>
 <messageBase64></messageBase64>
 <data>
   <vmware-infrastructure-response>
     <metadata>
       <status>success</status>
     </metadata>
     <UpdateVirtualNicResponse>
     </UpdateVirtualNicResponse>
   </vmware-infrastructure-response>
 </data>
</adapter-response>
Sample adapter response for the Update Virtual NIC operation
<vmware-infrastructure-response>
 <metadata>
   <status>error</status>
 </metadata>
 <Fault>
   <faultcode>ServerFaultCode</faultcode>
   <faultstring>The object has already been deleted or has not been completely created</faultstring>
   <detail>
     <ManagedObjectNotFound>
       <HostSystem>10.128.249.4</HostSystem>
     </ManagedObjectNotFound>
   </detail>
 </Fault>
</vmware-infrastructure-response>
Sample adapter response for the Update Virtual NIC operation when you specify an invalid value for the <dhcp> element, which is required
<vmware-infrastructure-response>
<metadata>
<status>error</status>
</metadata>
<Fault>
<faultcode>ServerFaultCode</faultcode>
<faultstring>
Required property dhcp is missing from data object of type HostIpConfig
while parsing serialized DataObject of type vim.host.IpConfig
at line 8, column 8 while parsing property "ip" of static type HostIpConfig
while parsing serialized DataObject of type vim.host.VirtualNic.Specification
at line 7, column 6 while parsing call information for method UpdateVirtualNic
at line 4, column 4 while parsing SOAP body at line 3, column 2
while parsing SOAP envelope at line 1, column 38
while parsing HTTP request for method updateVirtualNic
on object of type vim.host.NetworkSystem
at line 1, column 0</faultstring>
<detail>
<InvalidRequest></InvalidRequest>
</detail>
</Fault>
</vmware-infrastructure-response>
Sample adapter response for the Update Virtual NIC operation when you do specify a value for the <ip-address> element
<vmware-infrastructure-response>
 <metadata>
   <status>error</status>
 </metadata>
 <Fault>
   <faultcode>ServerFaultCode</faultcode>
   <faultstring>A specified parameter was not correct.
Vim.Host.VirtualNic.Specification.Ip</faultstring>
   <detail>
     <InvalidArgument>
       <invalidProperty>Vim.Host.VirtualNic.Specification.Ip</invalidProperty>
     </InvalidArgument>
   </detail>
 </Fault>
</vmware-infrastructure-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Atrium Orchestrator Content 20.15.02