![如何查找 HDP-Sandbox(在 VirtualBox VM 上)的 IP 地址?](https://linux22.com/image/157701/%E5%A6%82%E4%BD%95%E6%9F%A5%E6%89%BE%20HDP-Sandbox%EF%BC%88%E5%9C%A8%20VirtualBox%20VM%20%E4%B8%8A%EF%BC%89%E7%9A%84%20IP%20%E5%9C%B0%E5%9D%80%EF%BC%9F.png)
我的主机是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?