qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Network device not detected inside guest VM


From: troz_82
Subject: Network device not detected inside guest VM
Date: Mon, 10 Jan 2022 02:34:29 -0000
User-agent: SquirrelMail/1.4.23 [SVN]

I could use some help with getting QEMU to work.

I compiled 6.2.50 from git source on aarch64 and try to use networking,
but inside the guest VM the network does not get detected, at least not
during initrd phase.

Command executed:

qemu-system-aarch64 \
 -machine virt \
 -cpu host \
 -smp 4 \
 -m 2G \
 -kernel /boot/vmlinuz-$( uname -r ) \
 -initrd initrd.img \
 -enable-kvm \
 -serial stdio \
 -netdev user,id=net0 -device e1000,netdev=net0

Expected result:

The guests boots and inside the initrd image i can see a 'eth0' or similar
network adapter ready for usage using tools like `ifconfig`

Actual result:

The guest boots but no network adapter is detected during initrd scripts.

ifconfig -a only shows localhost/loopback
ip addr shows the same - only loopback

Any help into achieving a working network setup inside guest-VM's initrd
would be appreciated. Do i need to modprobe? Do i need a custom kernel? Or
does qemu need to be built with a --enable configure that enables use of
the networking backends: e1000, rtl8139 or virtio-net.

Additional problem:

It could be related, but i am also having problems with mounting 9p2000.L
(virtfs) inside a guest vm using QEMU. I could not mount it using a `mount
-t 9p -o trans=virtio,version=9p2000.L sharename /mnt` command. If i
change "sharename" then i got the same error.

The parameter i am giving to qemu is:
-virtfs
local,path=<path-on-host>,mount_tag=sharename,security_model=none,id=sharename

My kernel (5.15.13 aarch64) is compiled with 9P support builtin, please
confirm that this is sufficient:

# 9P support (built-in)
CONFIG_9P_FS=y
CONFIG_9P_FSCACHE=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS_SECURITY=y
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y

# virtio support (built-in)
CONFIG_VIRTIO_BLK=y
CONFIG_SCSI_VIRTIO=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_HW_RANDOM_VIRTIO is not set
# CONFIG_I2C_VIRTIO is not set
# CONFIG_GPIO_VIRTIO is not set
# CONFIG_DRM_VIRTIO_GPU is not set
# CONFIG_SND_VIRTIO is not set
CONFIG_VIRT_DRIVERS=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI_LIB=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_VIRTIO_IOMMU=y
# CONFIG_RPMSG_VIRTIO is not set
CONFIG_VIRTIO_FS=y




reply via email to

[Prev in Thread] Current Thread [Next in Thread]