Este conteúdo não está disponível no idioma selecionado.
10.5. Dynamically Changing a Host Physical Machine or a Network Bridge that is Attached to a Virtual NIC
This section demonstrates how to move the vNIC of a guest virtual machine from one bridge to another while the guest virtual machine is running without compromising the guest virtual machine
- Prepare guest virtual machine with a configuration similar to the following:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Prepare an XML file for interface update:
cat br1.xml
# cat br1.xml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the guest virtual machine, confirm the guest virtual machine's network functionality, and check that the guest virtual machine's vnetX is connected to the bridge you indicated.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the guest virtual machine's network with the new interface parameters with the following command:
virsh update-device test1 br1.xml
# virsh update-device test1 br1.xml Device updated successfully
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On the guest virtual machine, run
service network restart
. The guest virtual machine gets a new IP address for virbr1. Check the guest virtual machine's vnet0 is connected to the new bridge(virbr1)brctl show
# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.5254007da9f2 yes virbr0-nic virbr1 8000.525400682996 yes virbr1-nic vnet0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow