3.12. Create Virtual Machine NIC

The following example creates a virtual network interface to connect the example virtual machine to the rhevm network.

Example 3.14. Create a virtual machine NIC

POST /api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/nics HTTP/1.1
Accept: application/xml
Content-type: application/xml

<nic>
  <interface>virtio</interface>
  <name>nic1</name>
  <network>
    <name>rhevm</name>
  </network>
</nic>
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] -d "<nic><name>nic1</name><network><name>rhevm</name></network></nic>" https://[RHEVM Host]:8443/api/vms/6efc0cfa-8495-4a96-93e5-ee490328cf48/nics