make kvm service script use dhclient config
PATCH 1/1 make kvm service script use dhclient config
Hi list,
in order to make the kvm service script work with DHCP on FC6 I had to apply the following patch. Hope it's useful :-)
Ferry
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 renamed from kvm 2007-06-07 17:13:47.000000000 +0200 +1 -1
@@ -132,7 +132,7 @@ pgrep dhclient >/dev/null 2>&1 || i=4 sleep 1 done - dhclient ${dst} >/dev/null 2>&1 + dhclient -cf /etc/dhclient-${pif}.conf ${dst} >/dev/null 2>&1 else get_ip_info ${src} ifconfig ${src} 0.0.0.0
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 renamed from kvm 2007-06-07 17:13:47.000000000 +0200 +1 -1
@@ -132,7 +132,7 @@ pgrep dhclient >/dev/null 2>&1 || i=4 sleep 1 done - dhclient ${dst} >/dev/null 2>&1 + dhclient -cf /etc/dhclient-${pif}.conf ${dst} >/dev/null 2>&1 else get_ip_info ${src} ifconfig ${src} 0.0.0.0
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines
Hi list,
in order to make the kvm service script work with DHCP on FC6 I had to apply the following patch. Hope it's useful :-)
Ferry
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 line 138
Quoted 8 lines
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 renamed from kvm 2007-06-07 17:13:47.000000000 +0200 +1
-1@@ -132,7 +132,7 @@ pgrep dhclient >/dev/null 2>&1 || i=4 sleep 1 done - dhclient ${dst} >/dev/null 2>&1 + dhclient -cf /etc/dhclient-${pif}.conf ${dst} >/dev/null 2>&1 else get_ip_info ${src} ifconfig ${src} 0.0.0.0
I didn't see any /etc/dhclient-* files in my FC6.
What the problem are you solving?
I know there is a problem (don't rememeber the distribution) that when you run dhclient,
it runs both on the bridge and on the physical interface. It that it?
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
A message that is not in the archive (sent off-list or not yet received): 64F9B87B6B770947A9F8391472E032160C99EAD2-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/[email protected]
Quoted 20 lines · Dor Laor
Quoted 20 lines
Hi list,
in order to make the kvm service script work with DHCP on FC6 I had to apply the following patch. Hope it's useful :-)
Ferry
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 renamed from kvm 2007-06-07 17:13:47.000000000 +0200 +1
-1@@ -132,7 +132,7 @@ pgrep dhclient >/dev/null 2>&1 || i=4 sleep 1 done - dhclient ${dst} >/dev/null 2>&1 + dhclient -cf /etc/dhclient-${pif}.conf ${dst} >/dev/null 2>&1 else get_ip_info ${src}
Quoted 10 lines
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 line 138
Quoted 2 lines
etc/init.d/kvm 2007-07-05 21:06:43.000000000 +0200 renamed from kvm 2007-06-07 17:13:47.000000000 +0200 +0
-0ifconfig ${src} 0.0.0.0I didn't see any
/etc/dhclient-*files in my FC6.
What the problem are you solving?
I know there is a problem (don't rememeber the distribution) that when you run dhclient,
it runs both on the bridge and on the physical interface. It that it?
in my setup the dhcp client would run only on the kvm bridge and the hostname as I set up for the original network interface would not get sent to the dhcp server and would thus not land in my dns server. maybe this is a bit of a shortcut but the bridge must in some way use the same dhcp configuration as for the 'pif' it is replacing I think.
as far as i now, the /etc/dhclient-* files are generated when you have the DHCP_HOSTNAME variable set in /etc/sysconfig/network-script/ifcfg-*, so maybe I should first check for presence of the file before using it.... but it work for me :-)
about running the dhcp client twice...
I think I've seen this happen but am not really sure. at the time I thought that the dhcp client didn't get properly shutdown/killed by the kvm script. the script needs to find the correct dhcp client (the one that is running of the 'pif') and shutdown that client. maybe this fails?
hope this clarifies things
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/