Proxmox 容器无法访问互联网

Proxmox 容器无法访问互联网

我新安装了 proxmox 实例。但是当我创建新容器时,我无法访问互联网。

当我尝试进行包更新时

root@pve:~# apt-get update
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

当我尝试 ping google 时,我得到了

root@pve:~# ping google.pl
ping: google.pl: Temporary failure in name resolution

我在容器上的网络配置

root@pve:~# cat /etc/resolv.conf 
# --- BEGIN PVE ---
search learn-linux.eu
nameserver 8.8.8.8
nameserver 8.8.4.4
# --- END PVE ---

我的 proxmox 网络配置 在此处输入图片描述 我的 DNS 配置

在此处输入图片描述

知道我做错了什么吗?

答案1

您可能必须将容器设置为使用 DHCP,以便它获得正确的 IP 地址。

容器网络的 Proxmox 配置。IPV4:DHCP

相关内容