解决方法
步骤一:配置libvirt
# 修改libvirtd配置
vi /etc/libvirt/libvirtd.conf
unix_sock_group = "libvirt"
unix_sock_ro_perms = "0770"
unix_sock_rw_perms = "0770"
unix_sock_admin_perms = "0700"
unix_sock_dir = "/var/run/libvirt"
auth_unix_ro = "polkit"
auth_unix_rw = "polkit"
步骤二: 添加用户组
#添加组
usermod -aG libvirt $(whoami)
步骤三: 重启libvirtd服务
systemctl restart libvirtd