0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

QEMU 上での動作確認方法

0
Last updated at Posted at 2026-07-10

関連記事


qemux86-64 のビルドに成功したら、runqemu で起動確認します。Docker コンテナ内では slirp を使うと TUN/TAP 権限問題を避けやすいです。

事前確認

cd /work
source poky/oe-init-build-env build-qemu
ls -lh tmp/deploy/images/qemux86-64/

以下があることを確認します。

core-image-minimal-qemux86-64.rootfs.ext4
core-image-minimal-qemux86-64.rootfs.qemuboot.conf
bzImage

推奨起動コマンド

Docker コンテナ内では、まずこれを使います。

runqemu nographic slirp \
  tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.qemuboot.conf

起動すると、ログインプロンプトが出ます。

qemux86-64 login:

入力するのは root だけです。

root

起動後の確認

QEMU 内で実行します。

uname -a
cat /etc/os-release
ip addr
df -h
ps
systemctl --failed

ネットワーク確認です。

ping -c 3 8.8.8.8
ping -c 3 example.com

slirp ではネットワーク挙動が実機と異なります。ここでは起動・ログイン・基本コマンド確認までで十分です。

終了方法

nographic の場合、通常は以下です。

Ctrl-a x

Ctrl を押しながら a、その後 x です。

IMAGE_LINK_NAME エラー

症状

runqemu - ERROR - IMAGE_LINK_NAME wasn't set to find corresponding .qemuboot.conf file

回避策

.qemuboot.conf を直接指定します。

runqemu nographic slirp \
  tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.qemuboot.conf

rootfs を直接指定する方法もあります。

runqemu qemux86-64 nographic slirp \
  tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.ext4

TUN エラー

症状

runqemu - ERROR - TUN control device /dev/net/tun is unavailable

推奨対処

slirp を追加します。

runqemu nographic slirp \
  tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.qemuboot.conf

TUN/TAP を使いたい場合

ホスト側で実行します。

sudo modprobe tun
ls -l /dev/net/tun

docker-compose.yml に追加します。

devices:
  - /dev/net/tun:/dev/net/tun
cap_add:
  - NET_ADMIN

QEMU 起動成功の完了判定

以下が確認できれば、Docker + Yocto + QEMU の基本動作確認は完了です。

- runqemu が起動する
- login prompt が出る
- root でログインできる
- uname -a が実行できる
- /etc/os-release が見える
- systemctl --failed が確認できる
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?