当主机未连接到网络时,在 vmware player 中连接到服务器
我在主机操作系统 Windows 7 Professional 64 位上使用 VMWare Player 3.1.0。我的客户是 SUSE Linux ES 10。我的客户操作系统 (SUSE) 运行 JBoss 应用服务器,我使用 HTTP 从主机访问该服务器。我使用“桥接”连接来设置这一切。
我的问题: 当我连接到主机上的网络(使用有线网络适配器)时,我可以连接到来宾操作系统上的 http 服务器并浏览应用程序。但是,当我与主机上的网络断开连接(拔掉电线)时,我无法访问来宾操作系统应用程序服务器并浏览应用程序。我使用来宾操作系统 ifconfig
命令来查找来宾操作系统的 IP 地址。无论连接还是断开,该 IP 地址都不会改变。我什至尝试过使用无线数据卡,但这也不起作用。
我尝试过“NAT”以及“仅主机”连接并重新启动了来宾,但它也不起作用。我认为由于某种原因,来宾操作系统只能识别物理网卡(已断开连接)。
我需要独立于网络运行这台机器(我的笔记本电脑),因为我使用它进行演示,并且需要能够从我的主机操作系统连接到来宾操作系统。
I am using VMWare Player 3.1.0 on Host OS Windows 7 Professional 64-bit. My guest is is SUSE Linux ES 10. My guest OS (SUSE) runs JBoss App Server which I access from host using HTTP. I used a "Bridged" connection to set up all this.
My problem:
When I am connected to network on the Host (using wired network adapter) I can connect to the http server on the Guest OS and browse the application. However, when I am disconnected from the network on Host (unplugged the wire), I cannot access to the guest OS app server and browse the application. I use the guest OS ifconfig
command to find out ip address of the guest OS. This ip address does not change whether connected or disconnected. I have even tried using Wireless Data card, but that does not work either.
I have tried "NAT" as well as "Host Only" connection and rebooted the guest but it does not work either. I think for some reason the guest OS can only recognize the physical network card (which is disconnected).
I need to run this machine (my laptop) independently of the network because I use this for demo and need to be able to connect from my host OS to Guest OS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定我是否完全理解您想要做什么,但我确实知道设置有效的 NAT 配置将为您提供最大的灵活性。
单击网络图标并选择设置,选择 NAT。
在您的 Unix 操作系统上执行以下步骤
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0.bak
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="您的系统上曾经存在过什么"
br/>;NM_CONTROLLED="是"
ONBOOT="yes"
/etc/init.d/network restart
您现在应该能够从 Windows 主机和 Linux 客户机来回连接。
theJay28
-ps 我有屏幕截图,但我还没有 10 分来发布图像。
I am not sure I understand exactly what you are trying to do, but I do know setting up a working NAT configuration will offer you the most flexibility.
Click the networking icon and select settings, Select NAT.
Follow these steps on your Unix OS
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0.bak
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="What ever was here on your system"
br/>NM_CONTROLLED="yes"
ONBOOT="yes"
/etc/init.d/network restart
You should now be able to connect back and forth from your Windows Host and Linux guest.
theJay28
-p.s. I had screenshots, but I do not have the 10 points yet to post images.
我认为解决方案是在更改 VMWare 上的 NetWork 设置后重新启动 VM。我将虚拟机的网络选择为“仅主机”,关闭虚拟机并再次启动。之后,我就可以做我想做的事情(即从主机中的浏览器浏览来宾上的 Web 应用程序),而无需将主机连接到网络。
因此,就我而言,解决方案的关键是更改网络并重新启动虚拟机。
有任何意见建议欢迎...
I figured that the solution is to restart the VM after making the changes to the NetWork setting on the VMWare. I selected Network for the VM as "Host Only" shutdown the VM and started it again. After that I was able to do what I wanted to do (i.e. browse the web application on guest from the browser in the host machine) without connecting the host to the network.
So key to the solution in my case was to make the network changes and restart the VM.
Any comments suggestions welcome...