Create vCloud Network Interface

To create a network interface, use the following request:

1
2
POST /virtual_machines/:virtual_server_id/network_interfaces.xml
POST /virtual_machines/:virtual_server_id/network_interfaces.json

XML Request Example

1
curl -i -X POST http://onapp.test/virtual_machines/12/network_interfaces.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<network_interface><connected>1</connected><network_join_id>9</network_join_id><adapter_type>VMXNET3</adapter_type></network_interface>'

JSON Request Example

1
curl -i -X POST http://onapp.test/virtual_machines/12/network_interfaces.json -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"network_interface":{"connected":"1","network_join_id":"9","adapter_type":"VMXNET3"}}'

Where:

connected - indicate whether the network interface is connected to a VS

network_join_id - choose a network join

adapter_type - the network adapter type provided for the VS that can be one of the following values:

  • Vlance

  • E1000

  • E1000E

  • VMXNET

  • VMXNET2

  • VMXNET3

  • FLEXIBLE