如何查找 HDP-Sandbox(在 VirtualBox VM 上)的 IP 地址?

如何查找 HDP-Sandbox(在 VirtualBox VM 上)的 IP 地址?

我的主机是Ubuntu。当我登录 HDP-Sandbox 时

ip addr show

给我

5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:12:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.18.0.2/16 brd 172.18.255.255 scope global eth0

是不是意味着

172.18.0.2

是VM的IP地址吗?

我将此行添加到/etc/hosts

127.0.0.1 sandbox-hdp.hortonworks.com sandbox-hdf.hortonworks.com

当我查看日志时

00:00:00.942935 NAT: Guest address guess set to 10.0.2.15 by initialization
00:00:00.943051 NAT: resolv.conf: nameserver 127.0.0.53
00:00:00.943058 NAT: resolv.conf: ignoring "options edns0"
00:00:00.943067 NAT: DNS server 127.0.0.53 registration detected, switching to the DNS proxy

网络地址

VM receives its network address and configuration on the private network from a DHCP server 

这在实践中是如何运作的?我是否有静态IP?

相关内容