LXD:取得 DHCP IP,但外部無法 ping 通

LXD:取得 DHCP IP,但外部無法 ping 通

所以我在 VirtualBox 中設定了一個乾淨的虛擬機器。我按照描述設定橋接設備一些 教程。 我建立了一個虛擬機,獲得了一個 DHCP 位址。但此後,我無法從容器對本地網路上的任何 IP 執行 ping 操作,更不用說外部了。不過我可以從我的主機 ping 虛擬機器。

所以問題仍然存在,我做錯了什麼?我正在運行主機和虛擬機器 Ubuntu 16.04 LTS,以及 LXD 2.0.8:

   root@ubuntu:/home/test# cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet manual

auto br0
iface br0 inet dhcp
        bridge_ports enp0s3
root@ubuntu:/home/test# lxc profile list
default
docker
root@ubuntu:/home/test# lxc profile show default
config:
  environment.http_proxy: ""
  user.network_mode: ""
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
name: default
used_by: []
root@ubuntu:/home/test#

root@ubuntu:/home/test# lxc list
+------+---------+-----------------------+------+------------+-----------+
| NAME |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS |
+------+---------+-----------------------+------+------------+-----------+
| u1   | RUNNING | 192.168.192.12 (eth0) |      | PERSISTENT | 0         |
+------+---------+-----------------------+------+------------+-----------+

感謝任何幫助,因為我完全瘋了。謝謝!

相關內容