Bug 6922 - The network doesn't work in BA when using kvm with libvirt
Summary: The network doesn't work in BA when using kvm with libvirt
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Build System, Metadata & Runtime
Component: build-appliance (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.8 M1
Assignee: Cristian Iorga
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-11-03 08:33 UTC by Yi Zhao
Modified: 2014-11-08 08:30 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2014-11-03 08:33:36 UTC
Image location: http://downloads.yoctoproject.org/releases/yocto/yocto-1.7/build-appliance/

Git rev: dizzy/924da20c6f2f183fa7e930e4c3c6b14c090acbe5

Test environment: Ubuntu 12.04 x86_64

I tried to bootup the BA by using kvm with libvirt (Please see https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=323  Set Up/Break Down section for the detailed method). The system can boot up but the network can not access the external network. This used to work in Yocto 1.6.

##############################
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:99:41:3C  
          inet addr:169.254.202.151  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::5054:ff:fe99:413c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2294 (2.2 KiB)  TX bytes:9431 (9.2 KiB)

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         *               0.0.0.0         U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0

##############################

The eth0 is set an invalid ip 169.254.x.x, it should be 192.168.122.x.

After some more testings, I believe it is a connman issue. I tried connman 1.22 (the version in Yocto 1.6), 1.23, 1.24, 1.25 (The current version in master/dizzy), and 1.26. The 1.24 and 1.25 don't work, and others work well. Here is the output for connman 1.26:
##############################
# ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:99:41:3C  
          inet addr:192.168.122.252  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe99:413c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2307 (2.2 KiB)  TX bytes:16016 (15.6 KiB)

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         pek-yocto-build 0.0.0.0         UG    0      0        0 eth0
192.168.122.0   *               255.255.255.0   U     0      0        0 eth0
192.168.122.1   *               255.255.255.255 UH    0      0        0 eth0
########################

So, the easiest way to fix this issue is upgrade connman to the latest version (1.26)
Comment 1 Cristian Iorga 2014-11-04 06:35:47 UTC
Connman upgrade to 1.26 will get integrated soon.