From: sde 9000 Subject: Passing IP Parameters in 3.0 Date: Tue, 3 Jan 2006 20:14:34 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0094260035==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0094260035== Content-Type: multipart/alternative; boundary="----=_Part_12113_5849187.1136315674381" ------=_Part_12113_5849187.1136315674381 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline After having tried XenOS 4.2, Fedora Core 4, Fedora Core 5T1 as hosts and same sample plus fc3 and suse as guests it appears that passing the IP parameters from the domU configs idoes not want to work (dom0 and domU dump= s attached). The only parm getting passed is the mac address, which shows up on the guest nicely. Any attempt at getting a VM's IP configured through the below wouldn't do: ip =3D "10.0.0.2" netmask =3D "255.255.192.0" gateway =3D "10.0.0.1" hostname =3D"vm010000000002" vif =3D ['mac=3Daa:00:00:11:00:11, bridge=3Dxenbr0'] disk =3D ['file:/mnt/root/xen/centos-full.img,sda1,w'] root =3D "/dev/sda1 ro" #console =3D "10002" DHCP works. Manually configuring the IP parms in the guest after boot (plus putting the bridge device into the same subnet) leads to being able to ping both hosts in any direction, but ssh to the guest along with apparently domain sockets within the guest failing. Also, changing cat xend-config.sxp to nat through bridivif-nat and network-nat seems not work at all - with no xenbr0 being created in this case. So how do you get 3.0 to pass the ip config to the guests? How do you enabl= e nat-work around eventual issues there? - A full dump of the xen, ip config on host and guest ist attached. Any help would be appreciated - thanks in advance. [root@localhost ~]# ifconfig eth0 Link encap:Ethernet HWaddr AA:00:00:11:00:11 inet6 addr: fe80::a800:ff:fe11:11/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:221 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23015 (22.4 KiB) TX bytes:378 (378.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 [root@abt-wi-025 network-scripts]# cat ifcfg-eth0 DEVICE=3Deth0 BOOTPROTO=3Dstatic ONBOOT=3DYES TYPE=3DEthernet #BOOTPROTO=3Dstatic #ONBOOT=3Dyes #TYPE=3DEthernet #BROADCAST=3D10.0.0.63 #IPADDR=3D10.0.0.2 #NETMASK=3D255.255.192.0 #NETWORK=3D10.0.0.0 [root@ixi xen]# ifconfig eth0 Link encap:Ethernet HWaddr 00:02:1E:F4:58:96 inet addr: Bcast:137.208.224.255 Mask:255.255.255.0 inet6 addr: fe80::202:1eff:fef4:5896/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:559551 errors:0 dropped:0 overruns:0 frame:0 TX packets:239898 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:410638449 (391.6 MiB) TX bytes:86102575 (82.1 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:124693 errors:0 dropped:0 overruns:0 frame:0 TX packets:124693 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6244240 (5.9 MiB) TX bytes:6244240 (5.9 MiB) peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:559979 errors:0 dropped:0 overruns:100 frame:0 TX packets:240079 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:410688242 (391.6 MiB) TX bytes:86129808 (82.1 MiB) Interrupt:22 Base address:0xdc00 vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:239906 errors:0 dropped:0 overruns:0 frame:0 TX packets:559558 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:86103871 (82.1 MiB) TX bytes:410638919 (391.6 MiB) vif3.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:104 errors:0 dropped:0 overruns:0 frame:0 TX packets:778 errors:0 dropped:17792 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9181 (8.9 KiB) TX bytes:66132 (64.5 KiB) xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:228033 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:15008970 (14.3 MiB) TX bytes:168 (168.0 b) [root@ixi xen]# [root@ixi xen]# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no peth0 vif0.0 vif3.0 [root@ixi xen]# [root@ixi xen]# cat centos.full kernel =3D "/mnt/root/xen/boot/vmlinuz-2.6.12.6-xen" ramdisk =3D "/mnt/root/xen/boot/initrd-2.6.12.6-xen.img" vcpus =3D 1 memory =3D 128 name =3D "centos-full" nics =3D 1 #dhcp =3D"off" #dhcp =3D'DHCP' ip =3D "10.0.0.2" netmask =3D "255.255.192.0" gateway =3D "10.0.0.1" hostname =3D"vm010000000002" vif =3D ['mac=3Daa:00:00:11:00:11, bridge=3Dxenbr0'] disk =3D ['file:/mnt/root/xen/centos-full.img,sda1,w'] root =3D "/dev/sda1 ro" #console =3D "10002" [root@ixi xen]# cat xend-config.sxp # -*- sh -*- # # Xend configuration file. # # This example configuration is appropriate for an installation that trusts # only localhost connections, and is otherwise fully functional, with a # bridged network configuration. # Commented out entries show the default for that entry, unless otherwise # specified. #(logfile /var/log/xend.log) #(loglevel DEBUG) #(xend-http-server no) (xend-http-server yes) #(xend-unix-server yes) #(xend-relocation-server no) (xend-relocation-server yes) #(xend-unix-path /var/lib/xend/xend-socket) # Port xend should use for the HTTP interface, if xend-http-server is set. #(xend-port 8000) # Port xend should use for the relocation interface, if xend-relocation-server # is set. #(xend-relocation-port 8002) # Address xend should listen on for HTTP connections, if xend-http-server i= s # set. # Specifying 'localhost' prevents remote connections. # Specifying the empty string '' (the default) allows all connections. #(xend-address '') (xend-address localhost) # Address xend should listen on for relocation-socket connections, if # xend-relocation-server is set. # Meaning and default as for xend-address above. #(xend-relocation-address '') (xend-relocation-address localhost) # The limit (in kilobytes) on the size of the console buffer #(console-limit 1024) ## # To bridge network traffic, like this: # # dom0: fake eth0 -> vif0.0 -+ # | # bridge -> real eth0 -> the network # | # domU: fake eth0 -> vifN.0 -+ # # use # # (network-script network-bridge) # # Your eth0 is used as the outgoing interface, by default. To use a different # one (e.g. eth1) use # # (network-script 'network-bridge netdev=3Deth1') # # The bridge is named xenbr0, by default. To rename the bridge, use # # (network-script 'network-bridge bridge=3D') # # It is possible to use the network-bridge script in more complicated # scenarios, such as having two outgoing interfaces, with two bridges, and # two fake interfaces per guest domain. To do things like this, write # yourself a wrapper script, and call network-bridge from it, as appropriate. # (network-script network-bridge) # The script used to control virtual interfaces. This can be overridden on a # per-vif basis when creating a domain or a configuring a new vif. The # vif-bridge script is designed for use with the network-bridge script, or # similar configurations. # # If you have overridden the bridge name using # (network-script 'network-bridge bridge=3D') then you may wish to do the # same here. The bridge name can also be set when creating a domain or # configuring a new vif, but a value specified here would act as a default. # # If you are using only one bridge, the vif-bridge script will discover that, # so there is no need to specify it explicitly. # (vif-script vif-bridge) ## Use the following if network traffic is routed, as an alternative to the # settings for bridged networking given above. #(network-script network-route) #(vif-script vif-route) ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. #(network-script network-nat) #(vif-script vif-nat) # Dom0 will balloon out when needed to free memory for domU. # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to. # If dom0-min-mem=3D0, dom0 will never balloon out. (dom0-min-mem 196) # In SMP system, dom0 will use dom0-cpus # of CPUS # If dom0-cpus =3D 0, dom0 will take all cpus available (dom0-cpus 0) # Whether to enable core-dumps when domains crash. #(enable-dump no) // sde ------=_Part_12113_5849187.1136315674381 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
After having tried XenOS 4.2, Fedora Core 4, Fedora Core 5T1 as hosts a= nd same sample plus fc3 and suse as guests it appears that passing the IP p= arameters from the domU configs idoes not want to work (dom0 and domU dumps= attached). The only parm getting passed is the mac address, which shows up= on the guest nicely.=20

Any attempt at getting a VM's IP configured through the below would= n't do:

ip =3D "10.0.0.2"<= br>netmask =3D "255.255.192.0&quo= t;
gateway =3D "10.0.0.1"
hostnam= e =3D"vm010000000002"
vif =3D ['mac=3Daa:00:00:11:00:11, bridg= e=3Dxenbr0']
disk =3D ['file:/mnt/root/xen/centos-full.img,sda1,w']
r= oot =3D "/dev/sda1 ro"
#console =3D "10002"


DHCP works. Manually configur= ing the IP parms in the guest after boot (plus putting the bridge device in= to the same subnet) leads to being able to ping both hosts in any direction= , but ssh to the guest along with apparently domain sockets within the gues= t failing.=20

Also, changing cat xend-config.sxp to nat through bridivif-nat and = network-nat seems not work at all - with no xenbr0 being created in this ca= se.

So how do you get 3.0 to pass the ip config to the guests? How = do you enable nat-work around eventual issues there? -  A full dump of= the xen, ip config on host and guest ist attached. Any help would be appre= ciated - thanks in advance.=20



[root@localhost ~]# ifconfig
eth0    = ;  Link encap:Ethernet  HWaddr AA:00:00:11:00:11
  &= nbsp;       inet6 addr: fe80::a800:ff:fe11:11= /64 Scope:Link
          UP= BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:221 e= rrors:0 dropped:0 overruns:0 frame:0
      = ;    TX packets:5 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueu= elen:1000
          RX byte= s:23015 (22.4 KiB)  TX bytes:378 ( 378.0 b)

lo        Link encap:Loc= al Loopback
          inet = addr:127.0.0.1  Mask:255.0.0.0
       &nb= sp;  inet6 addr: ::1/128 Scope:Host
     &= nbsp;    UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 err= ors:0 dropped:0 overruns:0 frame:0
      &= nbsp;   TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
&= nbsp;         collisions:0 txqueuel= en:0


[root@abt-wi-025 network-scripts]# cat ifcfg-eth0
DEVICE=3Deth0
BOOTPROTO=3Dstatic
ONBOOT=3DYES
TYPE=3DEthernet<= br>#BOOTPROTO=3Dstatic
#ONBOOT=3Dyes
#TYPE=3DEthernet
#BROADCAST= =3D10.0.0.63
#IPADDR=3D10.0.0.2
#NETMASK=3D255.255.192.0
#N= ETWORK=3D10.0.0.0





[r= oot@ixi xen]# ifconfig
eth0      Link encap:Eth= ernet  HWaddr 00:02:1E:F4:58:96
          inet addr:<va= lid IP>  Bcast:137.208.224.255  Mask:255.255.255.0
 &= nbsp;        inet6 addr: fe80::202:1eff:= fef4:5896/64 Scope:Link
          UP BROADCAST RUNNING= MULTICAST  MTU:1500  Metric:1
     &= nbsp;    RX packets:559551 errors:0 dropped:0 overruns:0 fra= me:0
          TX packets:2= 39898 errors:0 dropped:0 overruns:0 carrier:0
    &n= bsp;     collisions:0 txqueuelen:0
          RX bytes:4106384= 49 (391.6 MiB)  TX bytes:86102575 (82.1 MiB)

lo  &nbs= p;     Link encap:Local Loopback
   &= nbsp;      inet addr:= 127.0.0.1  Mask:255.0.0.0
          inet6 addr: = ::1/128 Scope:Host
         = ; UP LOOPBACK RUNNING  MTU:16436  Metric:1
   &= nbsp;      RX packets:124693 errors:0 dropped:0 ov= erruns:0 frame:0
          = TX packets:124693 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txq= ueuelen:0
          RX byte= s:6244240 (5.9 MiB)  TX bytes:6244240 (5.9 MiB)

peth0 &nbs= p;   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
 =          inet6 addr: fe80::fcff:fff= f:feff:ffff/64 Scope:Link
          UP BROADCAST RUN= NING NOARP MULTICAST  MTU:1500  Metric:1
   &nb= sp;      RX packets:559979 errors:0 dropped:0 over= runs:100 frame:0
          = TX packets:240079 errors:0 dropped:0 overruns:0 carrier:0
  &n= bsp;       collisions:0 txqueuelen:1000
          RX bytes:4106882= 42 (391.6 MiB)  TX bytes:86129808 (82.1 MiB)
   &nbs= p;      Interrupt:22 Base address:0xdc00

vi= f0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF          inet6 addr: fe80::= fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUN= NING MULTICAST  MTU:1500  Metric:1
    &nb= sp;     RX packets:239906 errors:0 dropped:0 overruns:0= frame:0
          TX packe= ts:559558 errors:0 dropped:0 overruns:0 carrier:0
   &nbs= p;      collisions:0 txqueuelen:0
          RX bytes:8610387= 1 (82.1 MiB)  TX bytes:410638919 (391.6 MiB)

vif3.0  =   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
  &n= bsp;       inet6 addr: fe80::fcff:ffff:feff:f= fff/64 Scope:Link
         = UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:104 e= rrors:0 dropped:0 overruns:0 frame:0
      = ;    TX packets:778 errors:0 dropped:17792 overruns:0 carrie= r:0
          collisions:0 = txqueuelen:0
          RX b= ytes:9181 (8.9 KiB)  TX bytes:66132 ( 64.5 KiB)

xenbr0    Link encap:Ethernet  HWaddr = FE:FF:FF:FF:FF:FF
         = inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
    &= nbsp;     UP BROADCAST RUNNING MULTICAST  MTU:1500=   Metric:1
          R= X packets:228033 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 err= ors:0 dropped:0 overruns:0 carrier:0
      = ;    collisions:0 txqueuelen:0
    &n= bsp;     RX bytes:15008970 (14.3 MiB)  TX bytes:16= 8 (168.0 b)

[root@ixi xen]#

[root@ixi xen]# brctl show
bridge name     bridge id    &n= bsp;          STP enabled = ;    interfaces
xenbr0      = ;    8000.feffffffffff       n= o            &n= bsp; peth0
          &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;        vif0.0
   &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; =20 vif3.0
[root@ixi xen]#

[root@ixi xen]# cat centos.full

ker= nel  =3D "/mnt/root/xen/boot/vmlinuz-2.6.12.6-xen"
ramdis= k =3D "/mnt/root/xen/boot/initrd-2.6.12.6-xen.img"


vcp= us =3D 1
memory =3D 128
name =3D "centos-full"
nics =3D 1
#dh= cp =3D"off"
#dhcp =3D'DHCP'

ip =3D "10.0.0.2"
netmask =3D "255.255.192.0 "
gateway =3D "10.0.0.1&qu= ot;
hostname =3D"vm010000000002"
vif =3D ['mac=3Daa:00:00:1= 1:00:11, bridge=3Dxenbr0']
disk =3D ['file:/mnt/root/xen/centos-full.img= ,sda1,w']
root =3D "/dev/sda1 ro"
#console =3D "10002"

=


[root@ixi xen]# cat xend-config.sxp
# -*- sh -*-

## Xend configuration file.
#

# This example configuration is app= ropriate for an installation that trusts
# only localhost connections, and is otherwise fully functional, with a=
# bridged network configuration.

# Commented out entries show th= e default for that entry, unless otherwise
# specified.

#(logfile= /var/log/xend.log)
#(loglevel DEBUG)

#(xend-http-server no)
(xend-http-server ye= s)
#(xend-unix-server yes)
#(xend-relocation-server no)
(xend-relo= cation-server yes)

#(xend-unix-path /var/lib/xend/xend-socket)

# Port xend should use for the HTTP interface, if xend-http-server is s= et.
#(xend-port         &nb= sp;  8000)

# Port xend should use for the relocation interface,= if xend-relocation-server
# is set.
#(xend-relocation-port 8002)

# Address xend should listen on for HTTP connections, if xend-http-= server is
# set.
# Specifying 'localhost' prevents remote connections= .
# Specifying the empty string '' (the default) allows all connections.
#(xend-address '')
(xend-address localhost)

# Address xend sh= ould listen on for relocation-socket connections, if
# xend-relocation-s= erver is set.
# Meaning and default as for xend-address above.
#(xend= -relocation-address '')
(xend-relocation-address localhost)

# The limit (in kilobytes) o= n the size of the console buffer
#(console-limit 1024)

##
# To= bridge network traffic, like this:
#
# dom0: fake eth0 -> vif0.0 -+
#           &= nbsp;           &nbs= p;    |
#        =             &nb= sp;     bridge -> real eth0 -> the network
#&n= bsp;            = ;            &n= bsp;  |
# domU: fake eth0 -> vifN.0 -+
#
# use
#
# (= network-script network-bridge)
#
# Your eth0 is used as the outgoing interface, by default.  T= o use a different
# one (e.g. eth1) use
#
# (network-script 'netwo= rk-bridge netdev=3Deth1')
#
# The bridge is named xenbr0, by default.=   To rename the bridge, use
#
# (network-script 'network-bridge bridge=3D<name>')
#
= # It is possible to use the network-bridge script in more complicated
# = scenarios, such as having two outgoing interfaces, with two bridges, and # two fake interfaces per guest domain.  To do things like this, write=
# yourself a wrapper script, and call network-bridge from it, as approp= riate.
#
(network-script network-bridge)

# The script used to = control virtual interfaces.  This can be overridden on a
# per-vif basis when creating a domain or a configuring a new vif. = ; The
# vif-bridge script is designed for use with the network-bridge sc= ript, or
# similar configurations.
#
# If you have overridden the = bridge name using
# (network-script 'network-bridge bridge=3D<name>') then you may = wish to do the
# same here.  The bridge name can also be set when c= reating a domain or
# configuring a new vif, but a value specified here = would act as a default.
#
# If you are using only one bridge, the vif-bridge script will dis= cover that,
# so there is no need to specify it explicitly.
#
(vif= -script vif-bridge)


## Use the following if network traffic is r= outed, as an alternative to the
# settings for bridged networking given above.
#(network-script netw= ork-route)
#(vif-script     vif-route)


##= Use the following if network traffic is routed with NAT, as an alternative=
# to the settings for bridged networking given above.
#(network-script network-nat)
#(vif-script     v= if-nat)


# Dom0 will balloon out when needed to free memory for d= omU.
# dom0-min-mem is the lowest memory level (in MB) dom0 will get dow= n to.
# If dom0-min-mem=3D0, dom0 will never balloon out.
(dom0-min-mem 196)

# In SMP system, dom0 will use dom0-cpus # of= CPUS
# If dom0-cpus =3D 0, dom0 will take all cpus available
(dom0-c= pus 0)

# Whether to enable core-dumps when domains crash.
#(enabl= e-dump no)


// sde
------=_Part_12113_5849187.1136315674381-- --===============0094260035== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0094260035==--