Q1:waydroid.log(应该是)中提示:
(005340) [02:20:37] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
lxc-start: waydroid: network.c: netdev_configure_server_veth: 662 Operation not supported - Failed to create veth pair “vethP9IE4m” and “veth9pEmsU”
lxc-start: waydroid: network.c: lxc_create_network_priv: 3427 Operation not supported - Failed to create network device
lxc-start: waydroid: start.c: lxc_spawn: 1843 Failed to create the network
lxc-start: waydroid: start.c: __lxc_start: 2074 Failed to spawn container “waydroid”
STOPPED
A1:CONFIG_VETH=y
===================================
Q2:启动log提示:
[FAILED] Failed to start LXC network bridge setup.
See ‘systemctl status lxc-net.service’ for details.
查看lxc-net.service服务运行状态
systemctl status lxc-net.service
× lxc-net.service - LXC network bridge setup
Loaded: loaded (/lib/systemd/system/lxc-net.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2025-04-09 09:15:31 UTC; 15min ago
Docs: man:lxc
Process: 2835 ExecStart=/usr/lib/aarch64-linux-gnu/lxc/lxc-net start (code=exited, status=1/FAILURE)
Main PID: 2835 (code=exited, status=1/FAILURE)
CPU: 8ms
Apr 09 09:15:31 localhost.localdomain systemd[1]: Starting LXC network bridge setup…
Apr 09 09:15:31 localhost.localdomain lxc-net[2842]: Error: Unknown device type.
Apr 09 09:15:31 localhost.localdomain lxc-net[2835]: Failed to setup lxc-net.
Apr 09 09:15:31 localhost.localdomain systemd[1]: lxc-net.service: Main process exited, code=exi
ted, status=1/FAILURE
Apr 09 09:15:31 localhost.localdomain systemd[1]: lxc-net.service: Failed with result ‘exit-code’.
Apr 09 09:15:31 localhost.localdomain systemd[1]: Failed to start LXC network bridge setup.
A2-1 :依赖CONFIG_BRIDGE=y
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y
CONFIG_IP_NF_MANGLE=y
#systemctl status lxc-net.service
× lxc-net.service - LXC network bridge setup
Loaded: loaded (/lib/systemd/system/lxc-net.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2025-04-14 02:28:13 UTC; 2min 37s ago
Docs: man:lxc
Process: 2822 ExecStart=/usr/lib/aarch64-linux-gnu/lxc/lxc-net start (code=exited, status=1/FAILURE)
Main PID: 2822 (code=exited, status=1/FAILURE)
Apr 14 02:28:13 localhost.localdomain lxc-net[2853]: Try iptables -h' or 'iptables --help' for more information. Apr 14 02:28:13 localhost.localdomain lxc-net[2855]: iptables: Bad rule (does a matching rule exist in that chain?). Apr 14 02:28:13 localhost.localdomain lxc-net[2857]: iptables: Bad rule (does a matching rule exist in that chain?). Apr 14 02:28:13 localhost.localdomain lxc-net[2865]: iptables v1.8.7 (nf_tables): Chain 'MASQUERADE' does not exist Apr 14 02:28:13 localhost.localdomain lxc-net[2865]: Try
iptables -h’ or ‘iptables --help’ for more information.
Apr 14 02:28:13 localhost.localdomain lxc-net[2867]: iptables v1.8.7 (nf_tables): Couldn’t load match udp':No such file or directory Apr 14 02:28:13 localhost.localdomain lxc-net[2867]: Try
iptables -h’ or ‘iptables --help’ for more information.
Apr 14 02:28:13 localhost.localdomain systemd[1]: lxc-net.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 02:28:13 localhost.localdomain systemd[1]: lxc-net.service: Failed with result ‘exit-code’.
Apr 14 02:28:13 localhost.localdomain systemd[1]: Failed to start LXC network bridge setup.
A2-2:update-alternatives --set iptables /usr/sbin/iptables-legacy //设置防火墙工具为iptables-legacy,而不是iptables-nft
===================================
Q3:启动log提示:
[FAILED] Failed to start FUSE filesystem for LXC.
See ‘systemctl status lxcfs.service’ for details.
查看 lxcfs.service服务运行状态
#systemctl status lxcfs.service
× lxcfs.service - FUSE filesystem for LXC
Loaded: loaded (/lib/systemd/system/lxcfs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2025-04-09 09:15:32 UTC; 18min ago
Docs: man:lxcfs(1)
Process: 2929 ExecStart=/usr/bin/lxcfs /var/lib/lxcfs (code=exited, status=1/FAILURE)
Process: 2933 ExecStopPost=/bin/fusermount -u /var/lib/lxcfs (code=exited, status=1/FAILURE)
Main PID: 2929 (code=exited, status=1/FAILURE)
CPU: 7ms
Apr 09 09:15:32 localhost.localdomain systemd[1]: lxcfs.service: Scheduled restart job, restart counter is at 5.
Apr 09 09:15:32 localhost.localdomain systemd[1]: Stopped FUSE filesystem for LXC.
Apr 09 09:15:32 localhost.localdomain systemd[1]: lxcfs.service: Start request repea
ted too quickly.
Apr 09 09:15:32 localhost.localdomain systemd[1]: lxcfs.service: Failed with result
‘exit-code’.
Apr 09 09:15:32 localhost.localdomain systemd[1]: Failed to start FUSE filesystem for LXC.
A3:CONFIG_FUSE_FS=y
===================================
Q4:启动waydroid时,waydroid.log未报错,但是应用无画面
A4:修改bootargs将cgroup设置为v1 =》 追加 systemd.unified_cgroup_hierarchy=0
===================================
Q5:启动成功时waydroid.log提示:
skipping clipboard manager service because of missing pyclip package
A5:Waydroid 依赖 pyclip(一个 Python 库)来实现主机和容器之间的剪贴板共享功能。
apt install python3-pip
pip install pyclip //检查是否安装成功 python3 -m pip show pyclip