MirageOS 和 Xen - 虚拟接口无法获取 IP 地址



我已经按照本指南编译并构建了一个用于XEN的MirageOS单内核 https://github.com/mirage/mirage-www/blob/master/tmpl/wiki/hello-world.md(主要是最后一部分,步骤4,stackv4),但是在启动它之后,我无法通过DHCP发现阶段,如以下日志所示:

Parsing config from stackv4.xl
Xen Minimal OS!
Initialising console ... done.
getenv(OCAMLRUNPARAM) -> null
getenv(CAMLRUNPARAM) -> null
getenv(PATH) -> null
Unsupported function lseek called in Mini-OS kernel
Unsupported function lseek called in Mini-OS kernel
Unsupported function lseek called in Mini-OS kernel
getenv(OCAMLRUNPARAM) -> null
getenv(CAMLRUNPARAM) -> null
getenv(TMPDIR) -> null
getenv(TEMP) -> null
Netif: add resume hook
Netif.connect 0
Netfront.create: id=0 domid=0
 sg:true gso_tcpv4:true rx_copy:true rx_flip:false smart_poll:false
MAC: 00:16:3e:7e:c0:0d
Attempt to open(/dev/urandom)!
Unsupported function getpid called in Mini-OS kernel
Unsupported function getppid called in Mini-OS kernel
Manager: connect
Manager: configuring
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
....

我的幻影操作系统单内核配置:

name = 'stackv4'
kernel = '/home/mirage/mirage-skeleton/stackv4/mir-stackv4.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
disk = [  ]
# if your system uses openvswitch then either edit /etc/xen/xl.conf and set
#     vif.default.script="vif-openvswitch"
# or add "script=vif-openvswitch," before the "bridge=" below:
vif = [ 'bridge=xenbr0' ]

我的网络配置:

eth0      Link encap:Ethernet  HWaddr 02:01:06:02:83:c0
          inet6 addr: fe80::1:6ff:fe02:83c0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:110876 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14602 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9736700 (9.7 MB)  TX bytes:1999992 (1.9 MB)
          Interrupt:117
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:384394 errors:0 dropped:0 overruns:0 frame:0
          TX packets:384394 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:26761500 (26.7 MB)  TX bytes:26761500 (26.7 MB)
vif16.0   Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11289 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:33640 (33.6 KB)  TX bytes:778590 (778.5 KB)
xenbr0    Link encap:Ethernet  HWaddr 02:01:06:02:83:c0
          inet addr:131.159.24.167  Bcast:131.159.25.255  Mask:255.255.254.0
          inet6 addr: fe80::1:6ff:fe02:83c0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:110689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11987 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8328727 (8.3 MB)  TX bytes:1703101 (1.7 MB)

我的网桥配置:

bridge name     bridge id               STP enabled     interfaces
xenbr0          8000.0201060283c0       no              eth0
                                                        vif16.0

我的/etc/network/interface:

auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
#  up ip link set eth0 up
iface eth0 inet manual
auto xenbr0
    iface xenbr0 inet dhcp
            bridge_ports eth0

我试图了解问题是什么,但一切似乎都是正确的(根据另一个指南 http://wiki.xen.org/wiki/Network_Configuration_Examples_(Xen_4.1%2B)#Example_Debian-style_bridge_configuration_.28e.g._Debian.2C_Ubuntu.29)。

一些建议:

  1. 检查您是否确实在运行 DHCP 服务器。
  2. 在网桥计算机(可能是 dom0)上运行tcpdumpwireshark,看看有什么流量。您是否看到 DHCP 请求?
  3. 尝试配置静态 IP 地址,看看是否有效。
  4. 尝试运行 Linux 客户机,看看 DHCP 是否在那里工作(并为此比较数据包捕获)。

相关内容

  • 没有找到相关文章

最新更新