[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] xl network-attach


  • To: "Xen-users@xxxxxxxxxxxxx" <Xen-users@xxxxxxxxxxxxx>
  • From: 席康杰 <xikangjie@xxxxxx>
  • Date: Wed, 18 May 2016 13:12:39 +0000
  • Accept-language: zh-CN, en-US
  • Delivery-date: Wed, 18 May 2016 13:14:05 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>
  • Thread-index: AdGxBad+tSxDZrFIT0O6z06Vmz5MKw==
  • Thread-topic: xl network-attach

Hi,

 

I use xl network-attach to attach a nic, but failed.

 

# xl -vvv network-attach 6028 mac=00:16:3e:eb:ca:81 bridge=virbr0

libxl: debug: libxl.c:4247:libxl_device_nic_add: ao 0x20a9190: create: how=(nil) callback=(nil) poller=0x20a91f0

libxl: debug: libxl_event.c:577:libxl__ev_xswatch_register: watch w=0x20a5948 wpath=/local/domain/0/backend/vif/6028/0/state token=3/0: register slotnum=3

libxl: debug: libxl.c:4247:libxl_device_nic_add: ao 0x20a9190: inprogress: poller=0x20a91f0, flags=i

libxl: debug: libxl_event.c:514:watchfd_callback: watch w=0x20a5948 wpath=/local/domain/0/backend/vif/6028/0/state token=3/0: event epath=/local/domain/0/backend/vif/6028/0/state

libxl: debug: libxl_event.c:834:devstate_watch_callback: backend /local/domain/0/backend/vif/6028/0/state wanted state 2 still waiting state 1

libxl: debug: libxl_event.c:514:watchfd_callback: watch w=0x20a5948 wpath=/local/domain/0/backend/vif/6028/0/state token=3/0: event epath=/local/domain/0/backend/vif/6028/0/state

libxl: debug: libxl_event.c:830:devstate_watch_callback: backend /local/domain/0/backend/vif/6028/0/state wanted state 2 ok

libxl: debug: libxl_event.c:615:libxl__ev_xswatch_deregister: watch w=0x20a5948 wpath=/local/domain/0/backend/vif/6028/0/state token=3/0: deregister slotnum=3

libxl: debug: libxl_event.c:629:libxl__ev_xswatch_deregister: watch w=0x20a5948: deregister unregistered

libxl: debug: libxl_device.c:1028:device_hotplug: calling hotplug script: /etc/xen/scripts/vif-bridge online

libxl: debug: libxl_aoutils.c:513:libxl__async_exec_start: forking to execute: /etc/xen/scripts/vif-bridge online

libxl: debug: libxl_event.c:629:libxl__ev_xswatch_deregister: watch w=0x20a59d0: deregister unregistered

libxl: debug: libxl_device.c:1028:device_hotplug: calling hotplug script: /etc/xen/scripts/vif-bridge add

libxl: debug: libxl_aoutils.c:513:libxl__async_exec_start: forking to execute: /etc/xen/scripts/vif-bridge add

libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge add [-1] exited with error status 255

libxl: debug: libxl_event.c:629:libxl__ev_xswatch_deregister: watch w=0x20a59d0: deregister unregistered

libxl: debug: libxl_event.c:629:libxl__ev_xswatch_deregister: watch w=0x20a59d0: deregister unregistered

libxl: error: libxl.c:1965:device_addrm_aocomplete: unable to add vif with id 0

libxl: debug: libxl_event.c:1765:libxl__ao_complete: ao 0x20a9190: complete, rc=-3

libxl: debug: libxl_event.c:1737:libxl__ao__destroy: ao 0x20a9190: destroy libxl_device_nic_add failed.

xc: debug: hypercall buffer: total allocations:26 total releases:26

xc: debug: hypercall buffer: current allocations:0 maximum allocations:2

xc: debug: hypercall buffer: cache current size:2

xc: debug: hypercall buffer: cache hits:20 misses:2 toobig:4

 

# xl network-list 6028

Idx BE Mac Addr.         handle state evt-ch   tx-/rx-ring-ref BE-path

0   0  00:16:3e:eb:ca:81     0     1     -1    -1/-1          /local/domain/0/backend/vif/6028/0

 

# brctl show

bridge name     bridge id               STP enabled     interfaces

virbr0          8000.feffffffffff       no              vif6028.0

 

If succeed to attachbrctl show will output:

bridge name     bridge id               STP enabled     interfaces

virbr0          8000.feffffffffff       no              vif6028.0

                                                  vif6028.0-emu

 

# cat /var/log/xen/xen-hotplug.log

Cannot find device "vif6028.0-emu"

 

I trace /etc/xen/scripts/vif-bridgefind it is /etc/xen/scripts/xen-network-common.sh:88, failed to execute command

ip link set dev vif6028.0-emu downthen output Cannot find device "vif6028.0-emu"

 

82 # configure interfaces which act as pure bridge ports:

83 _setup_bridge_port() {

84     local dev="$1"

85     local virtual="$2"

86

87     # take interface down ...

88     ip link set dev ${dev} down

89

90     if [ $virtual -ne 0 ] ; then

91         # Initialise a dummy MAC address. We choose the numerically

92         # largest non-broadcast address to prevent the address getting

93         # stolen by an Ethernet bridge for STP purposes.

94         # (FE:FF:FF:FF:FF:FF)

95         ip link set dev ${dev} address fe:ff:ff:ff:ff:ff || true

96     fi

97

98     # ... and configure it

99     ip address flush dev ${dev}

100 }

 

Anyone have an idea?

 

Thanks!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.