我遵循以下步骤:https://linuxhint.com/install-kvm-ubuntu-22-04/
当我将 netplan 应用到 yaml 文件时出现错误:
sudo netplan apply
Failed to reload network settings: No such file or directory
netplan 的调试得到如下结果:
netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:20463): DEBUG: 23:06:06.988: starting new processing pass
** (generate:20463): DEBUG: 23:06:06.988: starting new processing pass
** (generate:20463): DEBUG: 23:06:06.988: br0: adding new route
** (generate:20463): DEBUG: 23:06:06.988: We have some netdefs, pass them through a final round of validation
** (generate:20463): DEBUG: 23:06:06.988: enp1s0f1: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
** (generate:20463): DEBUG: 23:06:06.988: enp6s0f0: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
** (generate:20463): DEBUG: 23:06:06.988: br0: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
** (generate:20463): DEBUG: 23:06:06.988: enp1s0f0: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
** (generate:20463): DEBUG: 23:06:06.988: eth0: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
** (generate:20463): DEBUG: 23:06:06.988: enp6s0f1: setting default backend to 1
** (generate:20463): DEBUG: 23:06:06.988: Configuration is valid
ERROR: cannot create file /run/systemd/system/netplan-ovs-cleanup.service: Failed to create file “/run/systemd/system/netplan-ovs-cleanup.service.CLDTV1”: Permission denied
知道是什么原因导致了这个问题吗?
答案1
你能发布你的 netplan 配置文件吗?看来解析器对 yaml 很满意,但 netplan 不太满意。
此外,KVM 无需添加桥接器即可启动和运行,如果您只想使用本地 VM 进行一些测试,则不需要添加桥接器。Ubuntu 上的 KVM 安装在开箱即用,无需任何操作即可为您提供本地 NAT 网络。因此,如果您想测试安装的其余部分,可以恢复 netplan 文件并尝试一下。