HomeDefectsLIN1025-676
Acknowledged

LIN1025-676 : Virtualization: the network interface of intel-x86-64 guest image is not up

Created: Apr 27, 2025    Updated: Aug 17, 2025
Found In Version: 10.25.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Userspace

Description

Boot up wrlinux-image-std-intel-x86-64.ext4 as guest OS on intel-x86-64 host using the following command:

$ qemu-system-x86_64 -enable-kvm -drive file=/exports/guest/wrlinux-image-std-intel-x86-64.ext4,media=disk,if=virtio -kernel /exports/guest/kernel -append 'console=ttyS0 root=/dev/vda rw' -nographic -m 2G -netdev user,id=mynet0 -device
virtio-net,netdev=mynet0
 

Sometimes after the guest OS boots up, the guest OS's network interface (e.g. ens3) is not started:

root@intel-x86-64:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 18  bytes 2214 (2.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18  bytes 2214 (2.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:99:21:60  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
 

A workaround is to disable predictable name interface in guest OS with template no-pni-names:

 $ setup.sh --machines intel-x86-64 --templates feature/libvirt feature/no-pni-names --distro wrlinux --dl-layers

Workaround

Workaround 1:

Disable predictable name interface in guest OS with template no-pni-names:

$ setup.sh --machines intel-x86-64 --templates feature/libvirt feature/no-pni-names --distro wrlinux --dl-layers

 

Workaround 2:

Replace dhcpcd with systemd-networkd in guest OS.

$ systemctl disable dhcpcd

$ rm /etc/systemd/network/80-wired.network

$ reboot

Steps to Reproduce

1. bitbake two images for both host and guest
[HOST]

1) setup.sh
--machines intel-x86-64 --templates feature/libvirt feature/virt-host --distro wrlinux --dl-layers=1 --accept-eula=yes
2)
source environment-setup-x86_64-wrlinuxsdk-linux
source oe-init-build-env build
3) bitbake-layers
(you need to clone test layer before execute bitbake-layer, "git clone ssh://git@lxgit.wrs.com/wrlinux-testing/testcases" for you to get test layer)
bitbake-layers add-layer /local-testlayer/wr-testing/virtualization
4). modify conf/local.conf
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"' >> conf/local.conf
echo 'require templates/feature/virtualization/template.conf' >> conf/local.conf
echo 'IMAGE_FSTYPES += " tar.bz2 ext4"' >> conf/local.conf
echo 'BB_NO_NETWORK:pn-lmbench = "0"' >> conf/local.conf
echo 'IMAGE_FSTYPES:remove = " live hddimg iso"' >> conf/local.conf
echo 'IMAGE_ROOTFS_EXTRA_SPACE = "5242880"' >> conf/local.conf
5). bitbake wrlinux-image-std


[GUEST]

1) setup
--machines intel-x86-64 --templates feature/libvirt --distro wrlinux --dl-layers=1 --accept-eula=yes
2)
source environment-setup-x86_64-wrlinuxsdk-linux
source oe-init-build-env build
3) bitbake-layers add-layer /path/to/local/testlayer/wr-testing/virtualization
4) modify conf/local.conf
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"' >> conf/local.conf
echo 'require templates/feature/virtualization/template.conf' >> conf/local.conf
echo 'IMAGE_FSTYPES += " tar.bz2"' >> conf/local.conf
echo 'BB_NO_NETWORK:pn-lmbench = "0"' >> conf/local.conf
echo 'ACTIVE_PLAN = "customized_test_plan.ini"' >> conf/local.conf
echo 'IMAGE_FSTYPES:remove = " live hddimg iso"' >> conf/local.conf
echo 'IMAGE_ROOTFS_EXTRA_SPACE = "5242880"' >> conf/local.conf
6) bitbake wrlinux-image-std


2. bootup target
bootup the target with host image from hard disk

3. prepare guest image
copy guest kernel and image(.ext4) under /exports/guest1 , as below

root@intel-x86-64:/exports/guest1# ls
kernel  wrlinux-image-std-intel-x86-64.ext4
root@intel-x86-64:/exports/guest1#
root@intel-x86-64:/exports/guest1# dd if=/dev/zero of=/exports/guest1/test.img bs=1024 count=2
2+0 records in
2+0 records out
2048 bytes (2.0 kB, 2.0 KiB) copied, 8.3352e-05 s, 24.6 MB/s
root@intel-x86-64:/exports/guest1# ls 
kernel  test.img  wrlinux-image-std-intel-x86-64.ext4
root@intel-x86-64:~#