Dom1 always does DHCP requests and vmid increasing
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
Quoted 8 lines
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?
Quoted 2 lines
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
Quoted 2 lines
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
Quoted 4 lines · Ian Pratt
Quoted 4 lines
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.
Quoted 8 lines
Quoted 4 lines
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.
Quoted 18 lines
Quoted 2 lines
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).
Quoted 4 lines
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.
Quoted 4 lines
Ian
Quoted 9 lines
-------------------------------------------------------
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 [email protected]
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
Quoted 2 lines · Mike Brady
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
Quoted 8 lines
Quoted 2 lines
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
Xen in a "new" distribution suggestion
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
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
Quoted 9 lines · Ian Pratt
Quoted 8 lines
Quoted 2 lines
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.
Quoted 8 lines
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 -vvxeIan
-------------------------------------------------------
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
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
Quoted 9 lines · Ian Pratt
Quoted 8 lines
Quoted 2 lines
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.
Quoted 8 lines
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 -vvxeIan
-------------------------------------------------------
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
Quoted 12 lines
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 withCONFIG_IP_PNP_DHCP=ythe 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
Quoted 8 lines · Mike Brady
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.pyscript (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 thenfs_servervariable to '169.254.1.0' and now this address shows up in the DHCP server log. The log entry is below.
Quoted 9 lines
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 eth0I 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