CentOS 5.2 and Xen Networking Problems
Posted by Stuart Herbert @ 12:55 PM, Mon 29 Sep 08
Filed under: CentOS, Networking
No Comments
I use CentOS rather than Gentoo as the host operating system for Xen boxes. After a recent upgrade to CentOS 5.2, I rebooted to find that my Xen virtual machines could no longer communicate with my LAN.
This is caused by two problems:
- libvirtd (/etc/init.d/libvirtd) sets up its own network bridge device, assigns the IP address range 192.168.122.* to this device, and kicks off its own copy of dnsmasq to provide DHCP services to your virtual machines. Use chkconfig to switch off libvirtd and reboot CentOS to clear this problem.
- If you don’t specify a MAC address in your XenU’s config file, each XenU gets a randomly generated MAC address. An upstream change in udev (which Gentoo uses) ensures that each ethernet interface with a different MAC address is assigned a new eth* number, which will screw up your networking start scripts. Edit /etc/udev/rules.d/70-persistent-net.rules file and rename the ethernet devices in there, and then make sure you specify the same fixed MAC address in your XenU’s config file too.
I hope this saves time for other people.
Be the first to leave a comment »