Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Users

Manually setting IP address in domain config file

 

 

Xen users RSS feed   Index | Next | Previous | View Threaded


musson at clusterresources

Jun 7, 2005, 9:54 AM

Post #1 of 6 (232 views)
Permalink
Manually setting IP address in domain config file

Hello all,

I'm attempting to manually set my domain eth0 address in the domain
config file instead of using DHCP. Here's the config file:

kernel ="/boot/vmlinuz-2.6.11-1.1369_FC4xenU"
memory = 64
name = "D1"
dhcp = "off"
nics = 1
disk = ['file:/root/xen/d1/d1.img,sda1,w']
root = "/dev/sda1 ro"
nics = 1
vif = ['mac=AA:00:00:18:98:FB']
netmask = "255.255.255.0"
ip = "10.10.10.11"
gateway = "10.10.10.99"

The dmesg output is:

<snip>
Kernel command line:
ip=10.10.10.11:1.2.3.4:10.10.10.99:255.255.255.0::eth0:off
root=/dev/sda1 ro
<snip>

Then, eth0 can be brought with "ifconfig eth0 up", but it doesn't have
an IP address assigned. Is there something I'm missing out on?

Best,
Michael

[.Fedora Core 4 test 3,
kernel-xen0.i686 2.6.11-1.1369_FC4,
kernel-xenU.i686 2.6.11-1.1369_FC4,
xen.i386 2-20050530,
debian domain filesystem ]




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


webmaster at proteus2

Jun 7, 2005, 10:52 AM

Post #2 of 6 (227 views)
Permalink
Re: Manually setting IP address in domain config file [In reply to]

Have you created an /etc/sysconfig/network-scripts/ifcfg-eth0 on the xenU?
The guest system probably just needs to know to activate it on boot. Just
a thought :)

John Fairbairn


> Hello all,
>
> I'm attempting to manually set my domain eth0 address in the domain
> config file instead of using DHCP. Here's the config file:
>
> kernel ="/boot/vmlinuz-2.6.11-1.1369_FC4xenU"
> memory = 64
> name = "D1"
> dhcp = "off"
> nics = 1
> disk = ['file:/root/xen/d1/d1.img,sda1,w']
> root = "/dev/sda1 ro"
> nics = 1
> vif = ['mac=AA:00:00:18:98:FB']
> netmask = "255.255.255.0"
> ip = "10.10.10.11"
> gateway = "10.10.10.99"
>
> The dmesg output is:
>
> <snip>
> Kernel command line:
> ip=10.10.10.11:1.2.3.4:10.10.10.99:255.255.255.0::eth0:off
> root=/dev/sda1 ro
> <snip>
>
> Then, eth0 can be brought with "ifconfig eth0 up", but it doesn't have
> an IP address assigned. Is there something I'm missing out on?
>
> Best,
> Michael
>
> [.Fedora Core 4 test 3,
> kernel-xen0.i686 2.6.11-1.1369_FC4,
> kernel-xenU.i686 2.6.11-1.1369_FC4,
> xen.i386 2-20050530,
> debian domain filesystem ]
>
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users [at] lists
> http://lists.xensource.com/xen-users
>


--
In the game of life it takes a root prompt to really foul up.


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


musson at clusterresources

Jun 7, 2005, 12:23 PM

Post #3 of 6 (228 views)
Permalink
Re: Manually setting IP address in domain config file [In reply to]

Good idea, but I would like to be able to manually set the IP address
without hard coding it into the filesystem somewhere. I've been looking
around and it looks like the functionality is supposed to be there with
setting ipaddr="xxx.xxx.xxx.xxx" in the domain config file, but it
doesnt seem to be working.

Michael

On Tue, 2005-06-07 at 12:52 -0500, John Fairbairn wrote:
> Have you created an /etc/sysconfig/network-scripts/ifcfg-eth0 on the xenU?
> The guest system probably just needs to know to activate it on boot. Just
> a thought :)
>
> John Fairbairn
>
>
> > Hello all,
> >
> > I'm attempting to manually set my domain eth0 address in the domain
> > config file instead of using DHCP. Here's the config file:
> >
> > kernel ="/boot/vmlinuz-2.6.11-1.1369_FC4xenU"
> > memory = 64
> > name = "D1"
> > dhcp = "off"
> > nics = 1
> > disk = ['file:/root/xen/d1/d1.img,sda1,w']
> > root = "/dev/sda1 ro"
> > nics = 1
> > vif = ['mac=AA:00:00:18:98:FB']
> > netmask = "255.255.255.0"
> > ip = "10.10.10.11"
> > gateway = "10.10.10.99"
> >
> > The dmesg output is:
> >
> > <snip>
> > Kernel command line:
> > ip=10.10.10.11:1.2.3.4:10.10.10.99:255.255.255.0::eth0:off
> > root=/dev/sda1 ro
> > <snip>
> >
> > Then, eth0 can be brought with "ifconfig eth0 up", but it doesn't have
> > an IP address assigned. Is there something I'm missing out on?
> >
> > Best,
> > Michael
> >
> > [.Fedora Core 4 test 3,
> > kernel-xen0.i686 2.6.11-1.1369_FC4,
> > kernel-xenU.i686 2.6.11-1.1369_FC4,
> > xen.i386 2-20050530,
> > debian domain filesystem ]
> >
> >
> >
> >
> > _______________________________________________
> > Xen-users mailing list
> > Xen-users [at] lists
> > http://lists.xensource.com/xen-users
> >
>
>


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


jebc at c4solutions

Jun 7, 2005, 12:54 PM

Post #4 of 6 (228 views)
Permalink
Re: Manually setting IP address in domain config file [In reply to]

Michael Musson wrote:
> Good idea, but I would like to be able to manually set the IP address
> without hard coding it into the filesystem somewhere. I've been looking
> around and it looks like the functionality is supposed to be there with
> setting ipaddr="xxx.xxx.xxx.xxx" in the domain config file, but it
> doesnt seem to be working.

It seems that your init scripts would have to support that kernel
parameter (no idea if that debian dom does).

For an example, I think that the ttylinux doms do support it.

Either way, not that hard to hack in.

Jeb

--
Jeb Campbell
jebc [at] c4solutions

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


james at xensource

Jun 8, 2005, 6:17 AM

Post #5 of 6 (230 views)
Permalink
Re: Manually setting IP address in domain config file [In reply to]

Use of the ip= kernel argument (used by the ipaddr xend config variable)
requires the kernel to be built with CONFIG_IP_PNP set. I note that
earlier FC4 xenU kernels do not have this. Please can you check the
version you have:

grep CONFIG_IP_PNP /boot/config-2.6.11-1.1369_FC4xenU

James

On Tue, 2005-06-07 at 17:54, Michael Musson wrote:
> Hello all,
>
> I'm attempting to manually set my domain eth0 address in the domain
> config file instead of using DHCP. Here's the config file:
>
> kernel ="/boot/vmlinuz-2.6.11-1.1369_FC4xenU"
> memory = 64
> name = "D1"
> dhcp = "off"
> nics = 1
> disk = ['file:/root/xen/d1/d1.img,sda1,w']
> root = "/dev/sda1 ro"
> nics = 1
> vif = ['mac=AA:00:00:18:98:FB']
> netmask = "255.255.255.0"
> ip = "10.10.10.11"
> gateway = "10.10.10.99"
>
> The dmesg output is:
>
> <snip>
> Kernel command line:
> ip=10.10.10.11:1.2.3.4:10.10.10.99:255.255.255.0::eth0:off
> root=/dev/sda1 ro
> <snip>
>
> Then, eth0 can be brought with "ifconfig eth0 up", but it doesn't have
> an IP address assigned. Is there something I'm missing out on?
>
> Best,
> Michael
>
> [.Fedora Core 4 test 3,
> kernel-xen0.i686 2.6.11-1.1369_FC4,
> kernel-xenU.i686 2.6.11-1.1369_FC4,
> xen.i386 2-20050530,
> debian domain filesystem ]
>
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users [at] lists
> http://lists.xensource.com/xen-users


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


musson at clusterresources

Jun 8, 2005, 11:27 AM

Post #6 of 6 (228 views)
Permalink
Re: Manually setting IP address in domain config file [In reply to]

All those interested,

Here's how I solved this (kind of dirty, but it worked).

1. I hacked site-packages/xen/xm/create.py and added a couple of new
options that can be specified in the domain config file (IP, gateway
etc).

2. Those options were passed to the kernel as parameters and then I
grabbed those parameters (they're set to environment variables) in
the /etc/init.d/rcS init file and created a
custom /etc/network/interfaces with them.

Let me know if you have questions about how I did this or any better
suggestions.

Michael

On Tue, 2005-06-07 at 10:54 -0600, Michael Musson wrote:
> Hello all,
>
> I'm attempting to manually set my domain eth0 address in the domain
> config file instead of using DHCP. Here's the config file:
>
> kernel ="/boot/vmlinuz-2.6.11-1.1369_FC4xenU"
> memory = 64
> name = "D1"
> dhcp = "off"
> nics = 1
> disk = ['file:/root/xen/d1/d1.img,sda1,w']
> root = "/dev/sda1 ro"
> nics = 1
> vif = ['mac=AA:00:00:18:98:FB']
> netmask = "255.255.255.0"
> ip = "10.10.10.11"
> gateway = "10.10.10.99"
>
> The dmesg output is:
>
> <snip>
> Kernel command line:
> ip=10.10.10.11:1.2.3.4:10.10.10.99:255.255.255.0::eth0:off
> root=/dev/sda1 ro
> <snip>
>
> Then, eth0 can be brought with "ifconfig eth0 up", but it doesn't have
> an IP address assigned. Is there something I'm missing out on?
>
> Best,
> Michael
>
> [.Fedora Core 4 test 3,
> kernel-xen0.i686 2.6.11-1.1369_FC4,
> kernel-xenU.i686 2.6.11-1.1369_FC4,
> xen.i386 2-20050530,
> debian domain filesystem ]
>
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users [at] lists
> http://lists.xensource.com/xen-users


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

Xen users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.