domU static IP

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

domU static IP

Viswanath Durbha-2
Hi,

I'm trying to setup xen on a server with bridge networking. I have RedHat as my dom0. I have two Ubuntu instances and one CentOS instance as domU's. All of them (dom0 and domU) use static ip addresses.

The configuration files for domU's specify in the vif line what ip address to be assigned to that particular domU. It works fine for my ubuntu domU's. But it does not work for my CentOS domU.

Can someone help me figure out what's going on? Also, what is the  best way to configure domU with static ip?

Thanks,
Viswanath


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.



_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Grant McWilliams


On Thu, Sep 3, 2009 at 7:36 AM, Viswanath Durbha <[hidden email]> wrote:
Hi,

I'm trying to setup xen on a server with bridge networking. I have RedHat as my dom0. I have two Ubuntu instances and one CentOS instance as domU's. All of them (dom0 and domU) use static ip addresses.

The configuration files for domU's specify in the vif line what ip address to be assigned to that particular domU. It works fine for my ubuntu domU's. But it does not work for my CentOS domU.

Can someone help me figure out what's going on? Also, what is the  best way to configure domU with static ip?

Thanks,
Viswanath


I had the same problem. Your CentOS kernel needs to be recompiled...
 
An update on the website about this:
http://runningxen.com/changes/

"The kernel has to be compiled with CONFIG_IP_PNP to enable the
automatic network settings.

Then IP, Netmask, Gateway, … will set from config-file (as long, there
is no extra setting in domU's /etc/network/interfaces for eth0)

grep IP_PNP /boot/config-2.6.-xen" shows you if it is set." - xen mailing list


Related (old) bug report:
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=471


Grant McWilliams

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Fajar A. Nugraha-3
In reply to this post by Viswanath Durbha-2
On Thu, Sep 3, 2009 at 9:36 PM, Viswanath
Durbha<[hidden email]> wrote:
> The configuration files for domU's specify in the vif line what ip address
> to be assigned to that particular domU. It works fine for my ubuntu domU's.
> But it does not work for my CentOS domU.
>
> Can someone help me figure out what's going on? Also, what is the  best way
> to configure domU with static ip?

You should use the normal method of whatever OS in domU to configure
IP address. For Centos it would be
/etc/sysconfig/networ-scripts/ifcfg-eth0.

--
Fajar

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Viswanath Durbha-2
I was able to assign the IP address to domU by modifying the ifcfg-eth0 file. But I was just wondering what is this the best practice? How about environments where servers are frequently brought up and down to scale an application? Isn't it better to write down IP addresses in the configuration once and then not worry about editing ifcfg-eth0 everytime?

Please share your thoughts.

Thanks,
Viswanath


On Fri, 2009-09-04 at 05:12 +0700, Fajar A. Nugraha wrote:
On Thu, Sep 3, 2009 at 9:36 PM, Viswanath
Durbha<[hidden email]> wrote:
> The configuration files for domU's specify in the vif line what ip address
> to be assigned to that particular domU. It works fine for my ubuntu domU's.
> But it does not work for my CentOS domU.
>
> Can someone help me figure out what's going on? Also, what is the  best way
> to configure domU with static ip?

You should use the normal method of whatever OS in domU to configure
IP address. For Centos it would be
/etc/sysconfig/networ-scripts/ifcfg-eth0.



This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.



_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Fajar A. Nugraha-3
On Fri, Sep 4, 2009 at 10:10 AM, Viswanath
Durbha<[hidden email]> wrote:
> I was able to assign the IP address to domU by modifying the ifcfg-eth0
> file. But I was just wondering what is this the best practice? How about
> environments where servers are frequently brought up and down to scale an
> application? Isn't it better to write down IP addresses in the configuration
> once and then not worry about editing ifcfg-eth0 everytime?
>
> Please share your thoughts.

IMHO in most scenarios it's best to treat domUs like any other machine
on your network.

For your particular type of need I'd be using dhcp, possibly with
persistent allocation. That way I can manage IPs from a centralized
location (the dhcp server) and it works for both virtual and physical
machines.

--
Fajar

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Viswanath Durbha-2
In reply to this post by Grant McWilliams
Hi,

Thanks for a very quick response.

I know my way around Linux a little bit but never compiled my own kernel :-(. Is there any place where I can get a xen domU pre-compiled kernel with that flag enabled and use it in my CentOS?

Thanks,
Viswanath

On Thu, 2009-09-03 at 08:32 -0700, Grant McWilliams wrote:


On Thu, Sep 3, 2009 at 7:36 AM, Viswanath Durbha <[hidden email]> wrote:
Hi,

I'm trying to setup xen on a server with bridge networking. I have RedHat as my dom0. I have two Ubuntu instances and one CentOS instance as domU's. All of them (dom0 and domU) use static ip addresses.

The configuration files for domU's specify in the vif line what ip address to be assigned to that particular domU. It works fine for my ubuntu domU's. But it does not work for my CentOS domU.

Can someone help me figure out what's going on? Also, what is the  best way to configure domU with static ip?

Thanks,
Viswanath



I had the same problem. Your CentOS kernel needs to be recompiled...
 
An update on the website about this:
http://runningxen.com/changes/

"The kernel has to be compiled with CONFIG_IP_PNP to enable the
automatic network settings.

Then IP, Netmask, Gateway, … will set from config-file (as long, there
is no extra setting in domU's /etc/network/interfaces for eth0)

grep IP_PNP /boot/config-2.6.-xen" shows you if it is set." - xen mailing list


Related (old) bug report:
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=471


Grant McWilliams


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.



_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: domU static IP

Viswanath Durbha-2
In reply to this post by Grant McWilliams
Hi,

The problem seems to have been resolved by following the instructions given in comment#3 of the bugzilla discussion below:

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=471#c3

Basically, I modified the ifcfg-eth0 file to add a function that reads /proc/cmdline and sets the parameters to eth0 interface. This is fantastic!! Thanks for everyone who responded to my question.

Thanks,
Vishi

On Thu, 2009-09-03 at 08:32 -0700, Grant McWilliams wrote:


On Thu, Sep 3, 2009 at 7:36 AM, Viswanath Durbha <[hidden email]> wrote:
Hi,

I'm trying to setup xen on a server with bridge networking. I have RedHat as my dom0. I have two Ubuntu instances and one CentOS instance as domU's. All of them (dom0 and domU) use static ip addresses.

The configuration files for domU's specify in the vif line what ip address to be assigned to that particular domU. It works fine for my ubuntu domU's. But it does not work for my CentOS domU.

Can someone help me figure out what's going on? Also, what is the  best way to configure domU with static ip?

Thanks,
Viswanath



I had the same problem. Your CentOS kernel needs to be recompiled...
 
An update on the website about this:
http://runningxen.com/changes/

"The kernel has to be compiled with CONFIG_IP_PNP to enable the
automatic network settings.

Then IP, Netmask, Gateway, … will set from config-file (as long, there
is no extra setting in domU's /etc/network/interfaces for eth0)

grep IP_PNP /boot/config-2.6.-xen" shows you if it is set." - xen mailing list


Related (old) bug report:
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=471


Grant McWilliams


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.



_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users