Scot P. Floess
2009-Nov-06 15:26 UTC
[CentOS-virt] Question - Xen host, DHCPD and guest VMs
I have a question about a Xen host that runs dhcpd and installing guest/running guest VMs on that host (that use DHCP)... On other hosts or hosts running VMs, they are absolutely able to get DHCP addresses no trouble... However, the fun begins when the machine I run dhcpd on is also hosting VMs. I can see in /var/log/messages the request and ack from dhcpd but the guest VMs never hear it. If I should bounce dhcpd prior to a guest install or start a guest VM - everything works just fine. I'm guessing, perhaps, there is some iptables rule I need to set up? Based on the init scripts, dhcpd definitely starts before xend and xendomains and ultimately the xen bridge... Anybody know what I need to do :) I've been bouncing dhcpd in /etc/rc.local and starting any VMs there. Although annoying, I'd rather do it "right" so I can auto start my Xen guests... Thanks ahead of time! Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-890-8117 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros
Neil Aggarwal
2009-Nov-06 15:32 UTC
[CentOS-virt] Question - Xen host, DHCPD and guest VMs
Scot:> I have a question about a Xen host that runs dhcpd and installing > guest/running guest VMs on that host (that use DHCP)...I just thought of something: Do you have logs enabled at the bottom of your iptables rules? If something is hitting the firewall, you will see it in the log. Neil -- Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU 1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime
Christopher G. Stach II
2009-Nov-06 16:46 UTC
[CentOS-virt] Question - Xen host, DHCPD and guest VMs
----- "Scot P. Floess" <sfloess at nc.rr.com> wrote:> Anybody know what I need to do :) I've been bouncing dhcpd in > /etc/rc.local and starting any VMs there. Although annoying, I'd > rather > do it "right" so I can auto start my Xen guests...If you want to do it correctly, don't run dhcpd in domain 0. :) You're exposing your host to traffic that it doesn't need to deal with, which can be bad for performance and is bad for security. You're also putting one extra service there that isn't solely related to keeping the ground beneath the guests, the only thing domain 0 should be doing. Start a guest to run dhcpd in auto and name the sym link in auto something like "00-guestname" so it runs before the other guests. If you have two or more physical hosts and you run ISC dhcpd, run another one of these guests as a dhcp failover peer on another host. -- Christopher G. Stach II