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] Emulating Multiple NIC cards on Guests

To: Viswanath T K <viswanath.t@xxxxxxxxxxx>
Subject: Re: [Xen-users] Emulating Multiple NIC cards on Guests
From: Sadique Puthen <sputhenp@xxxxxxxxxx>
Date: Wed, 06 Feb 2008 19:49:20 +0530
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 06 Feb 2008 06:20:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1202294583.2922.1.camel@xxxxxxxxxxxxxxxxxxxxx>
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>
References: <12E3FCFEFACC6D47A2525F89FB04446D40FEA9@xxxxxxxxxxxxxxxx> <1202294583.2922.1.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20070926)
Viswanath T K wrote:
Hi All,

I have a x86 64bit Machine on which I run fedora 7 64bit.
I have 3 NIC cards on the machine. Now I want to create 2
paravirtualised guests with fedora 7 64 bit as the OS.
My objective is I want the guests also to emulate or show the 3 NIC
cards which are present on the host or dom0 . At present I am using
virt-manager to create the guests and on doing the regular process, the
3 NIC cards are not shown on the guests.

The default xen dom0 configuration creates only a single bridge and the default guest configuration only creates a single virtual ethernet interface on the guest. Solution for you would be something below.

- In /etc/sysconfig/network-scripts of dom0 , Configure eth0, eth1 and eth3 with appropriate network details.

- Edit /etc/xen/xend-config.sxp, comment out Line 91 by putting a # in the beginning of the line and add the below line after that.

(network-script network-custom)

- Crate /etc/xen/scripts/network-custom with the below contents in it and give it 755 permission.

#!/bin/bash
/etc/xen/scripts/network-bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0
/etc/xen/scripts/network-bridge $1 netdev=eth1 bridge=xenbr1 vifnum=1
/etc/xen/scripts/network-bridge $1 netdev=eth2 bridge=xenbr2 vifnum=2

- Reboot your system.

- Now you should have xenbr0, xenbr1 and xenbr2 configured properly on your host system. Run "brctl show" to see details.

Now if you want to start a guest with three virtual interfaces, Edit the guest configuration file in /etc/xen/<guest name> and change vif= parameter as below.

vif = [ "mac=00:16:3e:7b:0e:a4,bridge=xenbr0,script=vif-bridge","mac=00:16:3e:7b:0e:a5,bridge=xenbr1,script=vif-bridge" ,"mac=00:16:3e:7b:0e:a6,bridge=xenbr2,script=vif-bridge"]

This would create three virtual ethernet interfaces - eth0, eth1 and eth2 - in the guest where eth0 would be bridged to xenbr0, eth1 to xenbr1 and eth2 to xenbr2. Then configure these virtual interfaces in the guest as you usually do with a physical system. If eth0, eth1 and eth2 in dom0 are connected to separate subnets and if you configure these three virtual ethernets in the guest to obtain their ip addresses from dhcp, then they should have obtained an ip address from the respective dhcp servers when you restart network service in the guest. Please make sure that the mac address you assign is unique.

The above vif = entry is for a para-virtualized guest. If it's a fully virtualized guest, it should be as below.

vif = [ 'type=ioemu, mac=00:16:3e:04:98:04, bridge=xenbr0','type=ioemu, mac=00:16:3e:04:98:05, bridge=xenbr1','type=ioemu, mac=00:16:3e:04:98:06, bridge=xenbr2' ]

--Sadique


Can somebody help me on how to go about this .


Thanks ,
Vishu



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



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