I created my first Xen VM that didn't use a static IP address. It grabs an IP from the 198.168.122.0 subnet (from I don't know where). I would rather want it to use my DHCP server. How can I achieve this? Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Kai Schaetzl wrote:> > I created my first Xen VM that didn't use a static IP address. It grabs an > IP from the 198.168.122.0 subnet (from I don't know where). I would rather > want it to use my DHCP server. How can I achieve this?Configure the Xen VM to use the xen managed network xenbr0 instead of the libvirt managed network virbr0. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
Assuming you have a DHCP server on the local net, maybe ip tables in the dom0 is blocking the dhcp traffic? Did you configure xend to do bridged or nat'd? Default is bridged. -Ross ----- Original Message ----- From: centos-virt-bounces at centos.org <centos-virt-bounces at centos.org> To: centos-virt at centos.org <centos-virt at centos.org> Sent: Sun Mar 23 18:31:15 2008 Subject: Re: [CentOS-virt] DHCP for Xen VMs Ross S. W. Walker wrote on Thu, 20 Mar 2008 11:59:17 -0400:> Configure the Xen VM to use the xen managed network xenbr0 instead of the > libvirt managed network virbr0.Unfortunately, doesn't work for me. If I change to xenbr0 the VM doesn't get an IP address. And as I'm having problems with the keymap I can't even look at the logs at the moment. If I set an IP address in the same subnet manually it works, but dhclient doesn't set one. Any ideas? Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ CentOS-virt mailing list CentOS-virt at centos.org http://lists.centos.org/mailman/listinfo/centos-virt ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20080323/694a1a1b/attachment-0002.html>
Ross S. W. Walker wrote on Sun, 23 Mar 2008 19:29:47 -0400:> Assuming you have a DHCP server on the local net, maybe ip tables in the dom0is blocking the dhcp traffic?> > Did you configure xend to do bridged or nat'd? Default is bridged.Well, networking *does* work if I set an IP address manually and as I can reach it then from other machines it must be bridged. The problem is that I don't get an IP address when using dhcp :-( I wasn't aware that iptables is on and preconfigured in a domU that got setup with CentOS 5.1 virt-manager. Unfortunately, shutting it off doesn't solve the problem. Logging shows that the server gets a request from that MAC address and offers an IP address, but the client doesn't receive it. There's no firewall between the two, but the offer doesn't get back to the client somehow. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
You might want to check iptables in the dom0. I believe iptables gets set on eth0 before it 'pivots' to peth0 and I doubt it flushes it and retargets it to the new bridged eth0 afterwards, so the dhcp traffic may appear as unsolicited and dropped on dom0 as it enters the bridge. If that turns out to be the case you will need to have iptables stopped right before the creation of peth0 and restarted afterwards (and maybe file a bug report too). -Ross ----- Original Message ----- From: centos-virt-bounces at centos.org <centos-virt-bounces at centos.org> To: centos-virt at centos.org <centos-virt at centos.org> Sent: Mon Mar 24 09:41:42 2008 Subject: Re: [CentOS-virt] DHCP for Xen VMs Ross S. W. Walker wrote on Sun, 23 Mar 2008 19:29:47 -0400:> Assuming you have a DHCP server on the local net, maybe ip tables in the dom0is blocking the dhcp traffic?> > Did you configure xend to do bridged or nat'd? Default is bridged.Well, networking *does* work if I set an IP address manually and as I can reach it then from other machines it must be bridged. The problem is that I don't get an IP address when using dhcp :-( I wasn't aware that iptables is on and preconfigured in a domU that got setup with CentOS 5.1 virt-manager. Unfortunately, shutting it off doesn't solve the problem. Logging shows that the server gets a request from that MAC address and offers an IP address, but the client doesn't receive it. There's no firewall between the two, but the offer doesn't get back to the client somehow. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ CentOS-virt mailing list CentOS-virt at centos.org http://lists.centos.org/mailman/listinfo/centos-virt ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20080324/455bd9f4/attachment-0002.html>
Ross S. W. Walker wrote on Mon, 24 Mar 2008 09:57:06 -0400:> You might want to check iptables in the dom0.That was off, anyway. No firewalls in the way. I now know why I had firewalling on my guests. These installs were not done with kickstart and there's no way to disable the firewall in anaconda anymore. And when the VM gets started I never see the firstboot screen as I usually attach to the console much later. But the firewall apparently wasn't the problem.> > I believe iptables gets set on eth0 before it 'pivots' to peth0 and I doubt it flushes itand retargets it to the new bridged eth0 afterwards, so the dhcp traffic may appear as unsolicited and dropped on dom0 as it enters the bridge. Thanks for pointing my attention to peth0, I've found http://wiki.xensource.com/xenwiki/XenNetworking this way.> If that turns out to be the case you will need to have iptables stopped right before thecreation of peth0 and restarted afterwards (and maybe file a bug report too). I restarted the network on the host and this did the trick, now this and all other VMs I convert from virbr to xenbr and DHCP get their IP number. I assume that during all the tests the necessary vif interface might have gotten lost or so. Interesting observation: virt-manager doesn't want to run VMs that configure a bridge, but have no MAC address. No problem to start them with xm. As it seems one can also disable libvirtd if you use xenbr. I disabled it and haven't seen a problem so far. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com