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/
Home Products Support Community News


[Xen-devel] HVM guest sees two NICs even though just one vif configured

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] HVM guest sees two NICs even though just one vif configured
From: "Fischer, Anna" <anna.fischer@xxxxxx>
Date: Thu, 6 Aug 2009 09:32:23 +0000
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Thu, 06 Aug 2009 02:33:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoWeM3QdTRjgnaEQhqqXuFH+NHM2w==
Thread-topic: HVM guest sees two NICs even though just one vif configured
I am running SLES10 with Xen 3.2 and I have configured an HVM guest. 

I configured the guest with a single virtual NIC:

vif = [ 'bridge=eth0, mac=00:16:3e:00:31:13' ]

I have not configured type=ioemu or type=netfront here, as you can see.

Now what happens is that on Dom0 Xen creates a tap device connecting to QEMU 
emulating a RTL 8139 NIC, and additionally a vifX device for the traditional PV 
approach. Both devices are connected to the bridge eth0.

Now within my HVM guest I can see the RTL 8139 under lspci. However, I also 
have the xen-vnif driver installed inside the guest OS as it provides much 
better performance. On boot xen-vnif successfully connects the netfront to the 
netback driver and basically I have a proper PV connection that my guest can 
now use. It shows up as say eth0. At this point the guest will use eth0 and the 
PV drivers to do networking.

But still the guests sees as second NIC, the RTL 8139, and if I load the 
8139too driver inside the guest, then the guest can additionally activate that 
second NIC, say as eth1. By default it is configured with the same MAC address 
as eth0 but I can easily change that within the guest OS. From that point on, 
my guest has two working NICs, with different MACs and so different IPs. 

For me this does not sound right. If I configure my guest with only a single 
NIC in the configuration file, then there should not be any way for the guest 
to set up and use two NICs at the same time. 

Is this a known issue? How is this supposed to be handled?


My Xen version:

xm info
release                :
version                : #1 SMP Tue May 6 12:41:02 UTC 2008
machine                : x86_64
nr_cpus                : 8
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 2700
hw_caps                : 
total_memory           : 65533
free_memory            : 4141
max_free_memory        : 54085
max_para_memory        : 54081
max_hvm_memory         : 53946
node_to_cpu            : node0:0-7
xen_major              : 3
xen_minor              : 2
xen_extra              : .0_16718_14-0.4
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 
hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : 16718
cc_compiler            : gcc version 4.1.2 20070115 (SUSE Linux)
cc_compile_by          : abuild
cc_compile_domain      : suse.de
cc_compile_date        : Tue May  6 15:20:41 UTC 2008
xend_config_format     : 4

Xen-devel mailing list