But, I personally prefer libvirt for managing network bridges, not changing network configuration as stated in the official website. So, I install libvirt:
sudo apt-get install libvirt0Then type
virsh net-list --allIt shows nothing!!? That is because on Ubuntu. You need to add user to libvirtd
adduser `id -un` libvirtdDon't use "adduser $user libvirtd". I tried this one first but it did not work.
Then, load default bridge setting by
sudo virsh net-define /var/lib/libvirt/network/default.xmlNote: the path is not the same as /usr/share/libvirt/networks/default.xml, which is demonstrated on libvirt wiki.
Next, start bridging and make it auto start:
virsh net-autostart default
virsh net-start default
This Ubuntu is running Xen inside Virtual Box. So, sub-network is a problem. You may see
error: internal error Network is already in use by interface eth0Then, if you type "virsh net-list --all" to show again, it indicates the device is inactive.
That is because 192.168.122.xxx is the default. But, the host machine is already using 192.168.122.xxx. So, the bridge can not be setup.
Solution:
I change the subnet to 192.168.1.xxx. in /var/lib/libvirt/network/default.xmlNow, type "ifconfig" and you should see virbr0 is there.
References
http://ubuntuforums.org/showthread.php?t=1789126
http://wiki.libvirt.org/page/Networking
Ending picture today:
Capital hill and its Christmas tree [courtesy of my dear wife - Claire Huang]
No comments:
Post a Comment