Sergio A. Kessler
2011-Sep-26 16:42 UTC
[libvirt-users] changue bridge name, libvirt refuses to take new name
hi all, (this events ocurred before my previous mail about the uuid incident) so, I installed a vm host: rhel6 guest: centos6 network: bridge (br0, eth1 as slave) but then, I changed the name of the bridge from br0 to br1 (because br1<->eth1 seems pretty than br0<->eth1) so: - mv /etc/sysconfig/network-scripts/ifcfg-br0 /etc/sysconfig/network-scripts/ifcfg-br1 - edited /etc/sysconfig/network-scripts/ifcfg-br1 change DEVICE=br0 by DEVICE=br1 - edited /etc/sysconfig/network-scripts/ifcfg-eth1 and changed the line BRIDGE=br0 to BRIDGE=br1 - edited /etc/libvirt/qemu/rmdev2.xml and changed the line <source bridge='br0'/> to <source bridge='br1'/> - service network restart <aside note> boom! lost connection to the server I had to go to server location (a few miles) by car because the network restart didn't stop br0 because thera was no script br0 and when br1 started produced a collision </aside note> - service libvirtd restart # brctl show bridge name bridge id STP enabled interfaces br1 8000.e41f13ba6e1a no eth1 virbr0 8000.5254003a3124 yes virbr0-nic # virsh -c qemu:///system start rmdev2 error: Failed to start domain rmdev2 error: Failed to add tap interface to bridge 'br0': No such device there *nothing* 'br0' in /etc in the system (I grepped it), why is looking for br0 instead of br1 ? I ended up undefining rmdev2, installing a new guest called rmdev2 using br1, and that was when I got the error: operation failed: cannot restore domain 'rmdev2' uuid 9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d yes, I was ready to fire the house and leaving for better places... thanks, /sergio
Eric Blake
2011-Sep-26 18:37 UTC
[libvirt-users] changue bridge name, libvirt refuses to take new name
On 09/26/2011 10:42 AM, Sergio A. Kessler wrote:> - edited /etc/libvirt/qemu/rmdev2.xml and changed the line<source > bridge='br0'/> to<source bridge='br1'/>Wrong. You should not be directly editing anything under /etc/libvirt, but instead should be using 'virsh edit rmdev2' to make those changes. It may be because you went behind libvirt's back that your edits were not recognized, and that you had to end up undefining and re-creating a new guest before you got this to work the way you wanted.> # brctl show > bridge name bridge id STP enabled interfaces > br1 8000.e41f13ba6e1a no eth1 > virbr0 8000.5254003a3124 yes virbr0-nic > > # virsh -c qemu:///system start rmdev2 > error: Failed to start domain rmdev2 > error: Failed to add tap interface to bridge 'br0': No such device > > there *nothing* 'br0' in /etc in the system (I grepped it), > why is looking for br0 instead of br1 ?One other thing to check, although I'm not sure it matters in your case (since you said that creating a new domain worked): when modifying network information, you may also need to modify libvirt's notion of the network, via such commands as 'virsh net-list' and 'virsh net-edit'. -- Eric Blake eblake at redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org