<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11232</bug_id>
          
          <creation_ts>2017-03-24 02:53:50 +0000</creation_ts>
          <short_desc>The qemu can not get correct ip in meta-ide-support environment</short_desc>
          <delta_ts>2017-04-01 02:41:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>eduard.bartosh</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Yi Zhao">yi.zhao</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71671</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-03-24 02:53:50 +0000</bug_when>
    <thetext>Git rev: master/6e20b31d5d17133e0fca086e12a0ad06ab5c4cc8

Steps:
1. Download poky source and set the environment.
2. Run bitbake meta-ide-support
3. Run bitbake core-image-sato
4. Set the environment for meta-ide-support
   $ . ./tmp/environment-setup-i586-poky-linux 
5. Run runqemu to launch a qemu image
   $ runqemu tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf 

The qemu can be launched but the ip address is not correct. The root cause is sudo command is not in the PATH so the tap device can not be created.

#############################################
$ runqemu tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf nographic
runqemu - INFO - CONFFILE: /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf
runqemu - INFO - Continuing with the following parameters:

KERNEL: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/bzImage--4.10.2+git0+69bfa87234_827a1164b1-r0-qemux86-20170320041334.bin]
MACHINE: [qemux86]
FSTYPE: [ext4]
ROOTFS: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86-20170324004454.rootfs.ext4]
CONFFILE: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf]

runqemu - INFO - Running /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/hosttools/ip link...
runqemu - INFO - Setting up tap interface under sudo
/bin/sh: sudo: command not found
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/.lock...
runqemu - INFO - Created tap: 
runqemu - ERROR - Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.
runqemu - INFO - Running ldd /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/recipe-sysroot-native/usr/bin/qemu-system-i386...
runqemu - INFO - Running /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/recipe-sysroot-native/usr/bin/qemu-system-i386  -drive file=/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86-20170324004454.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci  -nographic  -cpu qemu32 -m 256 -serial mon:stdio -serial null -kernel /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/bzImage--4.10.2+git0+69bfa87234_827a1164b1-r0-qemux86-20170320041334.bin -append &apos;root=/dev/vda rw highres=off  console=ttyS0 mem=256M vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 &apos;
###################################

On target:
###################################
root@qemux86:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fec0::5054:ff:fe12:3456%134535719/64 Scope:Site
          inet6 addr: fe80::5054:ff:fe12:3456%134535719/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:4 dropped:0 overruns:0 frame:4
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2526 (2.4 KiB)  TX bytes:10431 (10.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%134535719/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:140 (140.0 B)  TX bytes:140 (140.0 B)

########################################</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71905</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-03-30 14:42:35 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d60ede331558efc93011dee6f157028174b9c5a1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71988</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2017-04-01 02:41:46 +0000</bug_when>
    <thetext>Verified with 2.3 M3 rc2.
git rev: master/415b72ffcbd26e5f3664370d8b2a9b8105fb6342</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>