为什么我的 RHEL 7.2 虚拟机中的网络无法访问?

为什么我的 RHEL 7.2 虚拟机中的网络无法访问?

我获得了 RHEL 7.2 的 30 天评估。

我安装到 VirtualBox 机器中,并尝试注册我的订阅:

# subscription-manager register
Registering to: subscription.rhn.redhat.com:443/subscription
Username: ***
Password: 
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

日志说出现网络错误:

2016-06-10 17:35:13,853 [INFO] subscription-manager:2398 @connection.py:778 - Connection built: host=subscription.rhn.redhat.com port=443 handler=/subscription auth=basic username=***
2016-06-10 17:35:13,899 [DEBUG] subscription-manager:2398 @hwprobe.py:554 - cpu info: {'cpu.cpu(s)': 1, 'cpu.core(s)_per_socket': 1, 'cpu.thread(s)_per_core': 1, 'cpu.topology_source': 'kernel /sys cpu sibling lists', 'cpu.cpu_socket(s)': 1}
2016-06-10 17:36:34,000 [DEBUG] subscription-manager:2398 @hwprobe.py:772 - Running 'virt-what'
2016-06-10 17:36:34,059 [DEBUG] subscription-manager:2398 @hwprobe.py:776 - virt-what stdout: virtualbox
kvm

2016-06-10 17:36:34,059 [DEBUG] subscription-manager:2398 @hwprobe.py:777 - virt-what stderr: 
2016-06-10 17:36:34,068 [INFO] subscription-manager:2398 @hwprobe.py:854 - collected virt facts: virt.is_guest=True, virt.host_type=virtualbox, kvm, virt.uuid=bcb0c5f9-560d-44df-b8b7-3a085d08cff5
2016-06-10 17:36:34,069 [DEBUG] subscription-manager:2398 @connection.py:475 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2016-06-10 17:36:34,069 [DEBUG] subscription-manager:2398 @connection.py:523 - Making request: GET /subscription/users/***/owners
2016-06-10 17:37:14,122 [ERROR] subscription-manager:2398 @managercli.py:160 - Error during registration: [Errno -3] Temporary failure in name resolution
2016-06-10 17:37:14,123 [ERROR] subscription-manager:2398 @managercli.py:161 - [Errno -3] Temporary failure in name resolution

然而,它似乎不仅仅是 DNS。我正在使用桥接适配器:截屏 我已经通过 ssh 连接了。路由器为 192.168.0.1,主机为 192.168.0.103,访客为 192.168.0.100。我可以从访客 ping 主机:

# ping -c 1 192.168.0.103
PING 192.168.0.103 (192.168.0.103) 56(84) bytes of data.
64 bytes from 192.168.0.103: icmp_seq=1 ttl=64 time=0.342 ms

--- 192.168.0.103 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.342/0.342/0.342/0.000 ms

但我无法 ping 通路由器。或者除此之外的任何其他事情。

# ping -c 1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

的输出ip route

# ip route
default via 192.168.0.1 dev enp0s3  proto static  metric 100 
192.168.0.0/24 dev enp0s3  proto kernel  scope link  src 192.168.0.100  metric 100 

我究竟做错了什么?

相关内容