* Dom1 always does DHCP requests and vmid increasing
@ 2004-07-27 9:50 Mike Brady
2004-07-27 10:17 ` Ian Pratt
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Mike Brady @ 2004-07-27 9:50 UTC (permalink / raw)
To: xen-devel
I've been lurking on the list for a while, but I haven't tried Xen out until a
few days ago. I have things working in general, but can't figure out a
couple of things.
Firstly, domains other than domain 0 always do a DHCP request, no mater what
is configured. If I have a static address configured in the OS rc scripts
the DHCP address is assigned as the primary and the static address is the
secondary.
Secondly the vmid always +1 what ever the last vmid was no matter what the
vmid is set to for the xm create command.
The configuration for domain is below. I have used RH9 for the OS and Xen is
up to date from bitkeeper (as of 27 July 0800 UTC).
(domain
(id 1)
(name enterprise1)
(memory 63)
(state -b---)
(cpu 0)
(cpu_time 10.135407179)
(up_time 263.418766022)
(start_time 1090921172.3)
(console
(status connected)
(id 12)
(domain 1)
(local_port 12)
(remote_port 1)
(console_port 9601)
(connected 127.0.0.1 1033)
)
(config
(vm
(name enterprise1)
(memory 64)
(cpu -1)
(image
(linux
(kernel /boot/vmlinuz-2.4.26-xenU)
(ip :1.2.3.4::::eth0:off)
(root '/dev/sda2 ro')
)
)
(device (vbd (uname phy:hde5) (dev sda1) (mode w)))
(device (vbd (uname phy:hde6) (dev sda2) (mode w)))
(device (vif (mac aa:00:00:00:00:11) (bridge xen-br0)))
)
)
)
Any pointers on either of these would appreciated.
Regards
Mike Brady
Auckland
New Zealand
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 9:50 Dom1 always does DHCP requests and vmid increasing Mike Brady
@ 2004-07-27 10:17 ` Ian Pratt
2004-07-27 18:58 ` Mike Brady
2004-07-27 11:14 ` Mark Williamson
2004-07-27 19:21 ` Barry Rountree
2 siblings, 1 reply; 11+ messages in thread
From: Ian Pratt @ 2004-07-27 10:17 UTC (permalink / raw)
To: Mike Brady; +Cc: xen-devel, Ian.Pratt
> I've been lurking on the list for a while, but I haven't tried Xen out until a
> few days ago. I have things working in general, but can't figure out a
> couple of things.
>
> Firstly, domains other than domain 0 always do a DHCP request, no mater what
> is configured. If I have a static address configured in the OS rc scripts
> the DHCP address is assigned as the primary and the static address is the
> secondary.
There's nothing in your config file below to cause the kernel to
do a DHCP. Are you sure that your rc scripts aren't doing it?
> Secondly the vmid always +1 what ever the last vmid was no matter what the
> vmid is set to for the xm create command.
Ah -- this is a common confusion: 'vmid' != 'domid'.
The xmdefaults example configuration script is a slightly complex
example that takes a parameter ('vmid') and hence enables you to
use the same config file to start multiple domains, assuming
you're assigning them consecutively numbered ip addresses and
partitions.
When a domain starts, it's given a 'domid' which is a handle that
xend uses to refer to the domain when talking to Xen (It's kind
of like a PID in Unix). The very latest version of the tools
hides domid's from users to avoid this confusion. (A VM's domid
will change when it reboots or migrates, so it's a bad handle for
users to use when talking about a domain).
The way most people user the tools is to write a separate config
file for each domain they want to start, hence removing the part
at the top of the script that expects a parameter to be set.
Ian
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 10:17 ` Ian Pratt
@ 2004-07-27 18:58 ` Mike Brady
2004-07-27 20:00 ` Ian Pratt
0 siblings, 1 reply; 11+ messages in thread
From: Mike Brady @ 2004-07-27 18:58 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt
On Tue, 27 Jul 2004 22:17, Ian Pratt wrote:
> > I've been lurking on the list for a while, but I haven't tried Xen out
> > until a few days ago. I have things working in general, but can't figure
> > out a couple of things.
> >
> > Firstly, domains other than domain 0 always do a DHCP request, no mater
> > what is configured. If I have a static address configured in the OS rc
> > scripts the DHCP address is assigned as the primary and the static
> > address is the secondary.
>
> There's nothing in your config file below to cause the kernel to
> do a DHCP. Are you sure that your rc scripts aren't doing it?
>
THe DHCP request that I am seeing requests ip adddress 1.2.3.4. The only
place that I can find that address mentioned is in the domain configuration,
so I don't believe that it is the rc scripts, but I will have another look
later in the day. Syslog entries also indicate that it is a kernel DHCP
request as opposed to a dhcpcd request.
> > Secondly the vmid always +1 what ever the last vmid was no matter what
> > the vmid is set to for the xm create command.
>
> Ah -- this is a common confusion: 'vmid' != 'domid'.
>
> The xmdefaults example configuration script is a slightly complex
> example that takes a parameter ('vmid') and hence enables you to
> use the same config file to start multiple domains, assuming
> you're assigning them consecutively numbered ip addresses and
> partitions.
>
> When a domain starts, it's given a 'domid' which is a handle that
> xend uses to refer to the domain when talking to Xen (It's kind
> of like a PID in Unix). The very latest version of the tools
> hides domid's from users to avoid this confusion. (A VM's domid
> will change when it reboots or migrates, so it's a bad handle for
> users to use when talking about a domain).
>
> The way most people user the tools is to write a separate config
> file for each domain they want to start, hence removing the part
> at the top of the script that expects a parameter to be set.
>
I think I understand that. I will have a look it again tonight.
Thanks for the help.
> Ian
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 18:58 ` Mike Brady
@ 2004-07-27 20:00 ` Ian Pratt
2004-07-28 8:27 ` Xen in a "new" distribution suggestion Rune Johan Andresen
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Ian Pratt @ 2004-07-27 20:00 UTC (permalink / raw)
To: Mike Brady; +Cc: xen-devel, Ian Pratt
> > There's nothing in your config file below to cause the kernel to
> > do a DHCP. Are you sure that your rc scripts aren't doing it?
>
> THe DHCP request that I am seeing requests ip adddress 1.2.3.4. The only
> place that I can find that address mentioned is in the domain configuration,
> so I don't believe that it is the rc scripts, but I will have another look
> later in the day. Syslog entries also indicate that it is a kernel DHCP
> request as opposed to a dhcpcd request.
I might expect to see an ARP request for 1.2.3.4, but not a DHCP
request. The 1.2.3.4 is just there to workaround a linux 2.6 bug,
so could be removed altogether if you're booting 2.4.
Can you post the first few packets of output from:
tcpdump -i vifX.Y -s 2048 -vvxe
Ian
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Xen in a "new" distribution suggestion
2004-07-27 20:00 ` Ian Pratt
@ 2004-07-28 8:27 ` Rune Johan Andresen
2004-07-28 9:17 ` Dom1 always does DHCP requests and vmid increasing Mike Brady
2004-07-29 9:12 ` Mike Brady
2 siblings, 0 replies; 11+ messages in thread
From: Rune Johan Andresen @ 2004-07-28 8:27 UTC (permalink / raw)
To: xen-devel
Hi, I and another student here at CERN consider a project where we
implement Xen in a "new" distribution for easy install and
with useful preinstalled packages etc. focus to use in a cluster. (A
kind of Xen meets Knoppix idea, with grid apps). The project will
be for academic purposes.
Do you think this sounds like a good idea? Which tools and libraries do
you think could be useful? Are there any benefits in using Xen in a
grid or cluster environment?
cheers,
Haavard & Rune
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 20:00 ` Ian Pratt
2004-07-28 8:27 ` Xen in a "new" distribution suggestion Rune Johan Andresen
@ 2004-07-28 9:17 ` Mike Brady
2004-07-30 8:14 ` Mike Wray
2004-07-29 9:12 ` Mike Brady
2 siblings, 1 reply; 11+ messages in thread
From: Mike Brady @ 2004-07-28 9:17 UTC (permalink / raw)
To: Ian Pratt; +Cc: xen-devel
I don't have tcpdump installed at the moment, but will do so shortly.
In the mean time I have been playing around a bit and have found the
following.
1) Putting an ip=192.168.42.36 on the config file stops the DHCP request, but
the domain still has two addresses - the 192.168.42.36 and 192.168.42.35
(this is what is on the ifcfg-eth0 file).
2) In looking at the create.py script (after a crash course in Python :-) I
noticed that the 1.2.3.4 address is actually assigned as the nfsserver
address, not the IP address. To test this I set the nfs_server variable to
'169.254.1.0' and now this address shows up in the DHCP server log. The log
entry is below.
Jul 28 20:49:22 spitfire dhcpd: DHCPREQUEST for 255.255.255.255 (169.254.1.0)
from aa:00:00:00:00:11 via eth0: wrong network.
Jul 28 20:49:22 spitfire dhcpd: DHCPNAK on 255.255.255.255 to
aa:00:00:00:00:11 via eth0
Jul 28 20:49:24 spitfire dhcpd: DHCPDISCOVER from aa:00:00:00:00:11 via eth0
Jul 28 20:49:25 spitfire dhcpd: DHCPOFFER on 192.168.42.96 to
aa:00:00:00:00:11 via eth0
Jul 28 20:49:25 spitfire dhcpd: DHCPREQUEST for 192.168.42.96 (192.168.42.51)
from aa:00:00:00:00:11 via eth0
Jul 28 20:49:25 spitfire dhcpd: DHCPACK on 192.168.42.96 to aa:00:00:00:00:11
via eth0
I am still looking at the xm code to try and understand it.
Thanks
Mike
On Wed, 28 Jul 2004 08:00, Ian Pratt wrote:
> > > There's nothing in your config file below to cause the kernel to
> > > do a DHCP. Are you sure that your rc scripts aren't doing it?
> >
> > THe DHCP request that I am seeing requests ip adddress 1.2.3.4. The only
> > place that I can find that address mentioned is in the domain
> > configuration, so I don't believe that it is the rc scripts, but I will
> > have another look later in the day. Syslog entries also indicate that it
> > is a kernel DHCP request as opposed to a dhcpcd request.
>
> I might expect to see an ARP request for 1.2.3.4, but not a DHCP
> request. The 1.2.3.4 is just there to workaround a linux 2.6 bug,
> so could be removed altogether if you're booting 2.4.
>
> Can you post the first few packets of output from:
> tcpdump -i vifX.Y -s 2048 -vvxe
>
> Ian
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-28 9:17 ` Dom1 always does DHCP requests and vmid increasing Mike Brady
@ 2004-07-30 8:14 ` Mike Wray
0 siblings, 0 replies; 11+ messages in thread
From: Mike Wray @ 2004-07-30 8:14 UTC (permalink / raw)
To: Mike Brady; +Cc: Ian Pratt, xen-devel
Mike Brady wrote:
> I don't have tcpdump installed at the moment, but will do so shortly.
>
> In the mean time I have been playing around a bit and have found the
> following.
>
> 1) Putting an ip=192.168.42.36 on the config file stops the DHCP request, but
> the domain still has two addresses - the 192.168.42.36 and 192.168.42.35
> (this is what is on the ifcfg-eth0 file).
>
> 2) In looking at the create.py script (after a crash course in Python :-) I
> noticed that the 1.2.3.4 address is actually assigned as the nfsserver
> address, not the IP address. To test this I set the nfs_server variable to
> '169.254.1.0' and now this address shows up in the DHCP server log. The log
> entry is below.
>
> Jul 28 20:49:22 spitfire dhcpd: DHCPREQUEST for 255.255.255.255 (169.254.1.0)
> from aa:00:00:00:00:11 via eth0: wrong network.
> Jul 28 20:49:22 spitfire dhcpd: DHCPNAK on 255.255.255.255 to
> aa:00:00:00:00:11 via eth0
> Jul 28 20:49:24 spitfire dhcpd: DHCPDISCOVER from aa:00:00:00:00:11 via eth0
> Jul 28 20:49:25 spitfire dhcpd: DHCPOFFER on 192.168.42.96 to
> aa:00:00:00:00:11 via eth0
> Jul 28 20:49:25 spitfire dhcpd: DHCPREQUEST for 192.168.42.96 (192.168.42.51)
> from aa:00:00:00:00:11 via eth0
> Jul 28 20:49:25 spitfire dhcpd: DHCPACK on 192.168.42.96 to aa:00:00:00:00:11
> via eth0
>
> I am still looking at the xm code to try and understand it.
>
xm just assembles the components of the ip= parameter to the kernel.
If you use 'xm create -n' it will print out the resulting configuration
and you will be able to see the kernel ip parameter it will use.
The ip= param to the kernel has the format
ip=ipaddr:nfsserver:gateway:hostname:interface:dhcpmode
and xm defaults it to
ip=:1.2.3.4:::eth0:off
which has DHCP off. So it's a double puzzle, why does the kernel
use dhcp when it's set off, and why is it using dhcp for the
nfs server address anyway?
If the DHCP requests are a problem for you I could add a
parameter to xm create to tell it not to set the ip= param
at all.
Mike
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 20:00 ` Ian Pratt
2004-07-28 8:27 ` Xen in a "new" distribution suggestion Rune Johan Andresen
2004-07-28 9:17 ` Dom1 always does DHCP requests and vmid increasing Mike Brady
@ 2004-07-29 9:12 ` Mike Brady
2004-07-29 10:17 ` Ian Pratt
2 siblings, 1 reply; 11+ messages in thread
From: Mike Brady @ 2004-07-29 9:12 UTC (permalink / raw)
To: Ian Pratt; +Cc: xen-devel
I have resolved my problem or at least treated the symptom.
The xenU kernel has
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
set in the default kernel configuration. I didn't do extensive tests, but it
would seem that with CONFIG_IP_PNP_DHCP=y the kernel will do DHCP requests if
an IP address is not supplied on the commandline irrespective other settings
it passed. Disabling this and rebuilding the kernel stops the behavour that
I was seeing. This allows the Linux DHCP client to do its thing which is
what I was after. I have a DHCP server setup with all the network settings,
DDNS, etc and the kernel DNS client doesn't pick everything up properly.
Thanks for the help
Mike
On Wed, 28 Jul 2004 08:00, Ian Pratt wrote:
> > > There's nothing in your config file below to cause the kernel to
> > > do a DHCP. Are you sure that your rc scripts aren't doing it?
> >
> > THe DHCP request that I am seeing requests ip adddress 1.2.3.4. The only
> > place that I can find that address mentioned is in the domain
> > configuration, so I don't believe that it is the rc scripts, but I will
> > have another look later in the day. Syslog entries also indicate that it
> > is a kernel DHCP request as opposed to a dhcpcd request.
>
> I might expect to see an ARP request for 1.2.3.4, but not a DHCP
> request. The 1.2.3.4 is just there to workaround a linux 2.6 bug,
> so could be removed altogether if you're booting 2.4.
>
> Can you post the first few packets of output from:
> tcpdump -i vifX.Y -s 2048 -vvxe
>
> Ian
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-29 9:12 ` Mike Brady
@ 2004-07-29 10:17 ` Ian Pratt
0 siblings, 0 replies; 11+ messages in thread
From: Ian Pratt @ 2004-07-29 10:17 UTC (permalink / raw)
To: Mike Brady; +Cc: Ian Pratt, xen-devel
> I have resolved my problem or at least treated the symptom.
>
> The xenU kernel has
> CONFIG_IP_PNP=y
> CONFIG_IP_PNP_DHCP=y
> set in the default kernel configuration. I didn't do extensive tests, but it
> would seem that with CONFIG_IP_PNP_DHCP=y the kernel will do DHCP requests if
> an IP address is not supplied on the commandline irrespective other settings
> it passed. Disabling this and rebuilding the kernel stops the behavour that
> I was seeing. This allows the Linux DHCP client to do its thing which is
> what I was after. I have a DHCP server setup with all the network settings,
> DDNS, etc and the kernel DNS client doesn't pick everything up properly.
This is weird -- I wouldn't expect to see Linux dhcp for an
address unless it had an ip= line of the form:
ip=:::::eth0:dhcp (or just ip=dhcp)
I certainly wouldn't expect to see it issuing a DHCP request for
its "NFS server", which you thought was happening.
I'd like to get to the bottom of this. Have others got experience
using Xen in DHCP setups? How does it work for you?
Cheers,
Ian
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 9:50 Dom1 always does DHCP requests and vmid increasing Mike Brady
2004-07-27 10:17 ` Ian Pratt
@ 2004-07-27 11:14 ` Mark Williamson
2004-07-27 19:21 ` Barry Rountree
2 siblings, 0 replies; 11+ messages in thread
From: Mark Williamson @ 2004-07-27 11:14 UTC (permalink / raw)
To: Mike Brady; +Cc: xen-devel, Mark.Williamson
> Firstly, domains other than domain 0 always do a DHCP request, no mater what
> is configured.
The xmdefaults script includes settings for IP and DHCP. Since these set the
kernel boot parameters they might be taking precedence over your init scripts.
Commenting out the dhcp="dhcp" line or changing it to dhcp="no".
Alternatively, you could put dhcp=no on the end of your xm command line.
As Ian said, you could just write a config file for each virtual machine
(based on /etc/xen/xmdefaults) and specify the config to use using the -f flag
to xm create.
There'll be more documentation on this stuff in due course.
HTH,
Mark
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Dom1 always does DHCP requests and vmid increasing
2004-07-27 9:50 Dom1 always does DHCP requests and vmid increasing Mike Brady
2004-07-27 10:17 ` Ian Pratt
2004-07-27 11:14 ` Mark Williamson
@ 2004-07-27 19:21 ` Barry Rountree
2 siblings, 0 replies; 11+ messages in thread
From: Barry Rountree @ 2004-07-27 19:21 UTC (permalink / raw)
To: xen-devel
On Tuesday 27 July 2004 05:50 am, Mike Brady wrote:
> Firstly, domains other than domain 0 always do a DHCP request, no mater
> what is configured.
I noticed this when using ipaddr=w.x.y.z in my script; using ip=w.x.y.z
assigns a static address and doesn't cause dhcp to kick in.
Barry
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-07-30 8:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 9:50 Dom1 always does DHCP requests and vmid increasing Mike Brady
2004-07-27 10:17 ` Ian Pratt
2004-07-27 18:58 ` Mike Brady
2004-07-27 20:00 ` Ian Pratt
2004-07-28 8:27 ` Xen in a "new" distribution suggestion Rune Johan Andresen
2004-07-28 9:17 ` Dom1 always does DHCP requests and vmid increasing Mike Brady
2004-07-30 8:14 ` Mike Wray
2004-07-29 9:12 ` Mike Brady
2004-07-29 10:17 ` Ian Pratt
2004-07-27 11:14 ` Mark Williamson
2004-07-27 19:21 ` Barry Rountree
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.