我正在尝试通过 Putty 连接到虚拟机中的 Oracle Linux 安装,并将桥接适配器设置为网络适配器。但我无法从 Putty 获取要连接的 IP。我正在尝试使用办公室的 WiFi 连接。这个错误可能存在任何原因和解决方法。谢谢。以下是 ifconfig 输出。
[sandun@localhost ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::e52c:9da9:ad4c:d17a prefixlen 64 scopeid 0x20<link>
ether 08:00:27:92:d9:bb txqueuelen 1000 (Ethernet)
RX packets 1 bytes 60 (60.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38 bytes 6660 (6.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 48 bytes 4272 (4.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 4272 (4.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:d0:1c:f7 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[sandun@localhost ~]$
谢谢
答案1
尝试从主机 ping 通客户机的 IP 地址 192.168.122.1(假设此 IP 地址是静态的,否则运行命令 ifconfig virbr0 来获取正确的 IP 地址)。如果 ping 成功,则将该 IP 地址用于 putty。如果 ping 超时或无法到达主机,请尝试禁用防火墙或将桥接网络添加到受信任的接口(在客户机虚拟机上)。