%BOOK_ENTITIES; ]>
Reconfiguring Physical Networks in VMs &PRODUCT; provides you the ability to move VMs between networks and reconfigure a VM's network. You can remove a VM from a physical network and add to a new physical network. You can also change the default physical network of a virtual machine. With this functionality, hybrid or traditional server loads can be accommodated with ease. This feature is supported on XenServer and KVM hypervisors. The following APIs have been added to support this feature. These API calls can function only while the VM is in running or stopped state.
addNicToVirtualMachine The addNicToVirtualMachine API adds a new NIC to the specified VM on a selected network. parameter description Value virtualmachineid The unique ID of the VM to which the NIC is to be added. true networkid The unique ID of the network the NIC that you add should apply to. true ipaddress The IP address of the VM on the network. false The network and VM must reside in the same zone. Two VMs with the same name cannot reside in the same network. Therefore, adding a second VM that duplicates a name on a network will fail.
removeNicFromVirtualMachine The removeNicFromVirtualMachine API removes a NIC from the specified VM on a selected network. parameter description Value virtualmachineid The unique ID of the VM from which the NIC is to be removed. true nicid The unique ID of the NIC that you want to remove. true Removing the default NIC is not allowed.
updateDefaultNicForVirtualMachine The updateDefaultNicForVirtualMachine API updates the specified NIC to be the default one for a selected VM. The NIC is only updated in the database. You must manually update the default NIC on the VM. You get an alert to manually update the NIC. parameter description Value virtualmachineid The unique ID of the VM for which you want to specify the default NIC. true nicid The unique ID of the NIC that you want to set as the default one. true