| Summary: |
Need TUN enabled in CROPS container to run QEMU |
| Product: |
[Yocto Project Subprojects] CROPS
|
Reporter: |
Chin Huat Ang <chin.huat.ang> |
| Component: |
crops-default | Assignee: |
Todor Minchev <todor.minchev> |
| Status: |
RESOLVED
DUPLICATE
|
QA Contact: |
Toaster default assignee <toaster> |
| Severity: |
normal
|
|
|
| Priority: |
Undecided
|
CC: |
joshuagloe
|
| Version: |
2.5 | |
|
| Target Milestone: |
--- | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
Here's how I tried to execute runqemu using Brian's prototype toolchain container, however runqemu failed complaining TUN is not enabled: parallels@ubuntu:~/sdk$ docker run --rm -it -v $PWD:$PWD bavery/scott:cross --workdir=$PWD --cmd="runqemu qemux86 $PWD/bzImage-qemux86.bin $PWD/MY_QEMU_ROOTFS" sourcing /opt/poky/sdk/environment-setup-i586-poky-linux runqemu - INFO - Can't find required *.qemuboot.conf in /home/parallels/sdk/MY_QEMU_ROOTFS runqemu - INFO - Assuming /home/parallels/sdk/MY_QEMU_ROOTFS is an nfs rootfs runqemu - INFO - Assuming MACHINE = qemux86 runqemu - INFO - Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL! runqemu - INFO - Setting STAGING_DIR_NATIVE to OECORE_NATIVE_SYSROOT (/opt/poky/sdk/sysroots/x86_64-pokysdk-linux) runqemu - INFO - Setting STAGING_BINDIR_NATIVE to /opt/poky/sdk/sysroots/x86_64-pokysdk-linux/usr/bin Traceback (most recent call last): File "/opt/poky/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 1199, in <module> ret = main() File "/opt/poky/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 1186, in main config.check_and_set() File "/opt/poky/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 619, in check_and_set check_tun() File "/opt/poky/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu", line 103, in check_tun raise Exception("TUN control device %s is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)" % dev_tun) Exception: TUN control device /dev/net/tun is unavailable; you may need to enable TUN (e.g. sudo modprobe tun) I've also tried to workaround this by bind-mounting host /dev/net/tun (docker run ... -v /dev/net/tun:/dev/net/tun ...) but I prompted to enter pokyuser password which I don't know. But in any case this might not be a good idea as it will only work on Linux hosts.