xen-users
[Xen-users] Re: Bridge Setup problem in domU and Static IP Issues!
Hi,
Attached are my conf files for the image (domU) I created and /etc/network/interface file; I note that when I use this file (/etc/network/interface),the NFS daemon complains and stucks for longer and throws error mesg "Starting NFS common utilities: statd (failed)" and also in the /var/log/syslog I get the message "Failed to bring up br0".
Howevere, if I use the interface-org file, things work fine without NFS error. On using the modified interface file; the systen boot process get slower and I can't ping from dom0 or my Proxy Server cannot be connected and hence the overall network connections fail.
The used 5 files are attached as
follows:-
Regards
-Jan -------------------------------------------------------------------------------------------- 1. /etc/network/interface
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
# The loopback network interface # auto lo # iface lo inet loopback
auto eth0 iface eth0 inet manual
auto br0 iface br0 inet static address xxx.xxx.xxx.xxx (My Static IP as assigned by Sys admin) network xxx.xxx.xxx.x (network address) netmask 255.255.255.0 gateway 130.209.58.1 bridge_ports eth0 ================================================== /etc/network/interface-org (Orginal File)
# This file describes the network interfaces available on your system # and how to activate them. For more
information, see interfaces(5).
# The loopback network interface auto lo iface lo inet loopback
# The primary network interface allow-hotplug eth0 iface eth0 inet static address xxx.xxx.xxx.xxx (Static IP) netmask 255.255.255.0 gateway 130.209.58.1
auto eth0 ==================================================== 3. /etc/xen/debiantest2 (my created Image--domU)
# Configuration file for the Xen instance debiantest2, created # by xen-tools 3.9 on Mon Feb 15 12:19:50 2010. #
# # Kernel + memory size # kernel = '/boot/vmlinuz-2.6.26-1-xen-686' ramdisk = '/boot/initrd.img-2.6.26-1-xen-686' memory = '512'
# # Disk device(s). # root = '/dev/sda2
ro' disk = [ 'file:/home/xen/domains/debiantest2/swap.img,sda1,w', 'file:/home/xen/domains/debiantest2/disk.img,sda2,w', ]
# # Hostname # name = 'debiantest2'
# # Networking # dhcp = 'dhcp' vif = [ 'mac=00:16:3E:85:31:E6' ]
# # Behaviour #
on_reboot = 'restart' on_crash = 'restart'
========================================== 4. /etc/xen/xend-config.sxp
# The Xen-API server configuration. (Please note that this server is # available as an UNSUPPORTED PREVIEW in Xen 3.0.4, and should not be relied # upon). # # This value configures the ports, interfaces, and access controls for the # Xen-API server. Each entry in the list starts with either unix, a port # number, or an address:port pair. If this is "unix", then a UDP socket is # opened, and this entry applies to that. If it is a port, then Xend will # listen on all interfaces on that TCP port, and if it is an address:port # pair, then Xend will listen on the specified port, using the interface with # the specified address. # # The subsequent string configures the user-based access control for the # listener in
question. This can be one of "none" or "pam", indicating either # that users should be allowed access unconditionally, or that the local # Pluggable Authentication Modules configuration should be used. If this # string is missing or empty, then "pam" is used. # # The final string gives the host-based access control for that listener. If # this is missing or empty, then all connections are accepted. Otherwise, # this should be a space-separated sequence of regular expressions; any host # with a fully-qualified domain name or an IP address that matches one of # these regular expressions will be accepted. # # Example: listen on TCP port 9363 on all interfaces, accepting connections # only from machines in example.com or localhost, and allow access through # the unix domain socket unconditionally: # # (xen-api-server ((9363 pam '^localhost$
example\\.com$') # (unix none))) # # Optionally, the TCP Xen-API server can use SSL by specifying the private # key and certificate location: # # (9367 pam '' /etc/xen/xen-api.key /etc/xen/xen-api.crt) # # Default: # (xen-api-server ((unix)))
#(xend-http-server no) #(xend-unix-server no) #(xend-tcp-xmlrpc-server no) #(xend-unix-xmlrpc-server yes) #(xend-relocation-server no)
#(xend-unix-path /var/lib/xend/xend-socket)
# Address and port xend should use for the legacy TCP XMLRPC interface, # if xen-tcp-xmlrpc-server is set. #(xen-tcp-xmlrpc-server-address 'localhost') #(xen-tcp-xmlrpc-server-port 8006)
# SSL key and certificate to use
for the legacy TCP XMLRPC interface. # Setting these will mean that this port serves only SSL connections as # opposed to plaintext ones. #(xend-tcp-xmlrpc-server-ssl-key-file /etc/xen/xmlrpc.key) #(xend-tcp-xmlrpc-server-ssl-cert-file /etc/xen/xmlrpc.crt)
# 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 is # 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 '')
# The hosts allowed to talk to the relocation port. If this is empty (the # default), then all connections are allowed (assuming that the connection # arrives on a port and interface on which we are listening; see # xend-relocation-port and xend-relocation-address above). Otherwise, this # should be a space-separated sequence of regular expressions. Any host with # a fully-qualified domain name or an IP address that matches one of these # regular expressions will be accepted. # # For example: # (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$') # #(xend-relocation-hosts-allow '')
# The limit (in kilobytes) on the size of the console buffer #(console-limit 1024)
## # To bridge network traffic, like this: # # dom0: ----------------- bridge -> real eth0 -> the
network # | # domU: fake eth0 -> vifN.0 -+ # # use
(network-script network-bridge) # # Your default ethernet device is used as the outgoing interface, by default. # To use a different one (e.g. eth1) use # # (network-script 'network-bridge netdev=eth1') # # The bridge is named xenbr0, by default. To rename the bridge, use # # (network-script 'network-bridge bridge=<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 appropriate. # # (network-script
network-dummy)
# 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=<name>') 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=0, dom0 will never balloon out. (dom0-min-mem 196)
# In SMP system, dom0 will use dom0-cpus # of CPUS # If dom0-cpus = 0, dom0 will take all cpus available (dom0-cpus 0)
# Whether to enable core-dumps when domains crash. #(enable-dump no)
# The tool used for initiating virtual TPM migration #(external-migration-tool '')
# The interface for VNC servers to listen on. Defaults # to 127.0.0.1 To restore old 'listen everywhere' behaviour # set this
to 0.0.0.0 #(vnc-listen '127.0.0.1')
# The default password for VNC console on HVM domain. # Empty string is no authentication. (vncpasswd '')
# The VNC server can be told to negotiate a TLS session # to encryption all traffic, and provide x509 cert to # clients enalbing them to verify server identity. The # GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt # all support the VNC extension for TLS used in QEMU. The # TightVNC/RealVNC/UltraVNC clients do not. # # To enable this create x509 certificates / keys in the # directory /etc/xen/vnc # # ca-cert.pem - The CA certificate # server-cert.pem - The Server certificate signed by the CA # server-key.pem - The server private key # # and then uncomment this next line # (vnc-tls 1)
# The certificate dir can be pointed elsewhere.. # #
(vnc-x509-cert-dir /etc/xen/vnc)
# The server can be told to request & validate an x509 # certificate from the client. Only clients with a cert # signed by the trusted CA will be able to connect. This # is more secure the password auth alone. Passwd auth can # used at the same time if desired. To enable client cert # checking uncomment this: # # (vnc-x509-verify 1)
# The default keymap to use for the VM's virtual keyboard # when not specififed in VM's configuration #(keymap 'en-us')
# Script to run when the label of a resource has changed. #(resource-label-change-script '')
============================================ 5. /etc/xen-tools/xen-tools.conf
## # /etc/xen-tools/xen-tools.conf ## # # This is the global configuration file for the scripts included # within the xen-tools package. # # For more details
please see: # # http://xen-tools.org/ # ##
## # # File Format # ----------- # # Anything following a '#' character is ignored as a comment. # # Otherwise the format of this file "key = value". The value of # any keys in this file may be constructed via the output of a command. # # For example: # # kernel = /boot/vmlinuz-`uname -r` # ##
# ## # Output directory for storing loopback images. # # If you choose to use loopback images, which are simple to manage but # slower than LVM partitions, then specify a directory here and uncomment # the line. # # New instances will be stored in subdirectories named after their # hostnames. # ## dir = /home/xen #
# ## # # If you don't wish to use
loopback images then you may specify an # LVM volume group here instead # ## # lvm = skx-vg
# ## # # Installation method. # # There are four distinct methods which you may to install a new copy # of Linux to use in your Xen guest domain: # # - Installation via the debootstrap command. # - Installation via the rpmstrap command. # - Installation via the rinse command. # - Installation by copying a directory containing a previous installation. # - Installation by untarring a previously archived image. # # NOTE That if you use the "untar", or "copy" options you should ensure # that the image you're left with matches the 'dist' setting later in # this file. # # ## # # # install-method = [ debootstrap | rinse | rpmstrap | copy | tar ] # # install-method = debootstrap
# # If
you're using the "copy", or "tar" installation methods you must # need to specify the source location to copy from, or the source # .tar file to unpack. # # You may specify that with a line such as: # # install-source = /path/to/copy # install-source = /some/path/img.tar # #
# ## # Command definitions. ## # # The "rinse", and "rpmstrap" commands are hardwired into # the script, but if you wish to modify the commands which are executed # when installing new systems by a "copy", "debootstrap", or "tar" method # you can do so here: # # (This allows you to install from a .tar.bz file, rather than a plain # tar file, use cdebootstrap, etc.) # # install-method=copy: # copy-cmd = /bin/cp -a $src/* $dest # # install-method=debootstrap: # debootstrap-cmd=/usr/sbin/debootstrap # # install-method=tar: # tar-cmd = /bin/tar --numeric-owner -xvf
$src # #
# ## # Disk and Sizing options. ## # size = 4Gb # Disk image size. memory = 128Mb # Memory size swap = 128Mb # Swap size # noswap = 1 # Don't use swap at all for the new system. fs = ext3 # use the EXT3 filesystem for the disk image. dist = etch # Default distribution to install. image = sparse # Specify sparse vs. full disk images.
# # Currently supported and tested distributions include: # # via Debootstrap: # # Debian: # sid, sarge, etch, lenny. # # Ubuntu: # edgy, feisty, dapper. # # via Rinse: # centos-4, centos-5. # fedora-core-4, fedora-core-5,
fedora-core-6, fedora-core-7 # #
## # Networking setup values. ##
# # Uncomment and adjust these network settings if you wish to give your # new instances static IP addresses. # gateway = 192.168.1.1 netmask = 255.255.255.0 broadcast = 192.168.1.255 # # Uncomment this if you wish the images to use DHCP # # dhcp = 1
## # Misc options ##
# # Uncomment the following line if you wish to disable the caching # of downloaded .deb files when using debootstrap to install images. # # cache = no #
# # Uncomment the following line if you wish to interactively setup # a new root password for images. # # passwd = 1
# # If you'd like all accounts on your host system which are not present # on the guest system to be copied over then uncomment the following line. # # accounts =
1 #
# # Default kernel and ramdisk to use for the virtual servers # kernel = /boot/vmlinuz-`uname -r` initrd = /boot/initrd.img-`uname -r`
# # The architecture to use when using debootstrap, rinse, or rpmstrap. # # This is most useful on 64 bit host machines, for other systems it # doesn't need to be used. # # arch=[i386|amd64] #
# # The default mirror for debootstrap to install Debian-derived distributions # mirror = http://ftp.us.debian.org/debian/
# # A mirror suitable for use when installing the Dapper release of Ubuntu. # # mirror = http://gb.archive.ubuntu.com/ubuntu/
# # If you like you could use per-distribution mirrors, which will # be more useful if you're working in an environment where you want # to regularly use multiple distributions: # #
mirror_sid=http://ftp.us.debian.org/debian # mirror_sarge=http://ftp.us.debian.org/debian # mirror_etch=http://ftp.us.debian.org/debian # mirror_dapper=http://archive.ubuntu.com/ubuntu # mirror_edgy=http://archive.ubuntu.com/ubuntu # mirror_feisty=http://archive.ubuntu.com/ubuntu # mirror_gutsy=http://archive.ubuntu.com/ubuntu
# # Filesystem options for the different filesystems we support. # ext3_options = noatime,nodiratime,errors=remount-ro ext2_options = noatime,nodiratime,errors=remount-ro xfs_options = defaults reiser_options = defaults
# # Uncomment if you wish newly created images to boot once they've been # created. # boot = 1
# # If you're using the lenny or later version of the Xen guest kernel you will # need to make sure that you use 'hvc0' for the guest serial device, # and 'xvdX' instead
of 'sdX' for serial devices. # # You may specify the things to use here: # serial_device = hvc0 #default # serial_device = tty1 # # disk_device = xvda #default disk_device = sda #
# # Here we specify the output directory which the Xen configuration # files will be written to, and the suffix to give them. # # Historically xen-tools have created configuration files in /etc/xen, # and given each file the name $hostname.cfg. If you want to change # that behaviour you may do so here. # # # output = /etc/xen # extension = .cfg #
=========================================================
--- On Tue, 16/2/10, Mark Hurenkamp <mark.hurenkamp@xxxxxxxxx> wrote:
From: Mark Hurenkamp
<mark.hurenkamp@xxxxxxxxx> Subject: Re: [Xen-users] Bridge Setup problem in domU! To: "Jan Muhammad" <janmuhd@xxxxxxxxx> Cc: xen-users@xxxxxxxxxxxxxxxxxxx Date: Tuesday, 16 February, 2010, 0:51
Hi Jan,
I forgot to mention that you need to replace your existing eth0 entry with the following:
auto eth0 iface eth0 inet manual
And then let these lines be followed by the br0 entry. After reboot, you should have an br0 where you would normally use eth0.
If things still don't work, then please attach a bit more information, it is hard for us to guess what goes wrong, if we don't see the config files you are using. So if you still have network problems then please attach your original and your altered interfaces
file.
Regards, Mark.
On Feb 15, 2010, at 6:50 PM, Jan Muhammad wrote: Hi Mark,
Thanks indeed for your response. Do you mean I should disable earlier entries in (/etc/network/interfaces) config file; I already have static entries in this file. I note that when I did so the NFS seems to stoped/failed and also now I can't create new domU's due to unavailablity of Network Proxy... :(
Regards
-Jan
From: Mark Hurenkamp <mark.hurenkamp@xxxxxxxxx> Subject: Re: [Xen-users] Bridge Setup problem in domU! To: "Jan Muhammad" <janmuhd@xxxxxxxxx> Cc: xen-users@xxxxxxxxxxxxxxxxxxx Date: Monday, 15 February, 2010, 21:50
Hi Jan,
> Either I disable or enable DHCP option in config file still the error > message is same (as follow). > Although both dom0 and domU boot okay, except for a problem with bridge > problem. The network bridge is never setup when the > server is
rebooted. I have to shutdown domU, and then run > > ./network-bridge stop > ./network-bridge start
I'm using a similar setup, running a Ubuntu Karmic dom0, and several Debian/Ubuntu domU machines.
But I've completely stopped using the network-bridge scripts, and now setup the bridge from my /etc/network/interfaces config file, which avoids the whole problem of transfering IP, and renaming eth device completely.
Here's an example for setting up a bridge using Debian/Ubuntu:
auto br0 iface br0 inet static address 192.168.1.101 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 bridge_ports eth0
This has worked fine for me ever since the first xen-3.0 days
;-)
Regards,
Mark.
|
-----Inline Attachment Follows-----
|
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|