Hot-plugging a nonpersistent network interface
The following figure shows how to hot-plug a nonpersistent network interface into a vRouter and connect the interface to the net100 network.
- Log in to the host VM.
- Change the directory to /home/Vyatta/.
- Create the r1.xml file and set its contents to the following:
<interface type='network'> <mac address='52:54:00:11:11:11'/> <source network='net100'/> <model type='virtio'/> </interface>
- Save the r1.xml file in the /home/Vyatta/ directory.
- Hot-plug the interface into the R1 router by entering the following command:
# virsh attach-device R1 ./r1.xml
The router hot-plugs the interface into the next available PCI slot with the higher number.Note: In this instance, which is the default case, the interface is nonpersistent. This means that the interface is automatically detached during the shutdown sequence of the guest VM.
# virsh detach-device R1 ./r1.xml