WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] domU HVM network problem

To: 'Carles Pina i Estany' <carles@xxxxxxxx>
Subject: RE: [Xen-users] domU HVM network problem
From: "Max E. Baro" <MEB@xxxxxxxxxxxxxxxxx>
Date: Sun, 9 Mar 2008 17:13:56 -0400
Cc: "'xen-users@xxxxxxxxxxxxxxxxxxx'" <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 09 Mar 2008 14:14:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

Sorry, I guess I forgot to elaborate on the rest of the setup to make it work.

I modified vif-route because the default behavior is to set the eth0 ip address to the vif interface and I could never get that to work properly.  Instead I assign the IP in the configuration file as you did, but I assign a network number address, not a host address.

vif-route:

dir=$(dirname "$0")
. "$dir/vif-common.sh"

main_ip=$(dom0_ip)

case "$command" in
    online)
        ifconfig ${vif} ${ip} netmask 255.255.255.255 up                         <<<<<  changed to ip from main_ip
        echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
        ipcmd='add'
        cmdprefix=''
        ;;
    offline)
        do_without_error ifdown ${vif}
        ipcmd='del'
        cmdprefix='do_without_error'
        ;;
esac

if [ "${ip}" ] ; then
    # If we've been given a list of IP addresses, then add routes from dom0 to
    # the guest using those addresses.
    for addr in ${ip} ; do
      ${cmdprefix} ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip}         <<<<<<<<<<<<<<<  same here
    done
fi

handle_iptable

log debug "Successful vif-route $command for $vif."
if [ "$command" == "online" ]
then
  success
fi


Then in config I assign IP as "192.168.1.0".  This is important because you will cause a conflict with the eth0 adapter inside the domU.  In my domU I configure ifcfg-eth0 with IPADDRESS=192.168.1.2.  AFTER the domU is started I assign IP address 192.168.1.1 to the tap/tun device created in dom0 for that domain.

Here is where the problem with routing comes in.  The tap/tun device created is not specific to the domU id in anyway, it depends in what order the domU's are created.  If you have two HVM domains and each only one nic assigned, then the first one to be created will use device tap0 and the second one created will use tap1.  I have not found a way to specify which tap device to create so I cannot assign the IP address for the tap device automatically on startup.


Max Baro
Technical Support Supervisor
FACTS Services, Inc.
(305) 284 - 7440
meb@xxxxxxxxxxxxxxxxx



-----Original Message-----
From: Carles Pina i Estany [mailto:carles@xxxxxxxx]
Sent: Sunday, March 09, 2008 5:44 AM
To: Max E. Baro
Cc: 'xen-users@xxxxxxxxxxxxxxxxxxx'
Subject: Re: [Xen-users] domU HVM network problem



Hello,

On Mar/08/2008, Max E. Baro wrote:
> You need to specify 'type=ioemu' in your vif line.  If running multiple
> domu's you should also specify a unique mac address for each one.  Also in
> my version of XEN (3.0.3) the domu would not start if I didn't have a bridge
> created ahead of time even though I am using route and not bridge.  I fixed
> this by adding 'brctl addbr xenbr0' to network-route.

thank you! finally I have a NIC card! :-) I spent lot of time yesterday
for this issue. We use the same Xen version, I also needed to add brctl.

Thank again!

--
Carles Pina i Estany            GPG id: 0x8CBDAE64
        http://pinux.info       Manresa - Barcelona

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users