Host OS unable to connect to Guest OS (virtual machines) in VMware
3 Attachment(s)
Dear All,
I have two virtual machines (both CentOS) installed on my Win Vista Laptop. Both of my Guest OS have bridged network connection, snapshot attached (Guest OS 1.jpg and Guest OS 2.jpg) and are able to ping/connect each other successfully. I have given my physical network the same segment IP too, snapshot attached (Physical Network.jpg). Now, I have this scenario. Host OS (Vista) - 192.168.1.30 Guest OS 1 (CentOS) - 192.168.1.10 Guest OS 2 (CentOS) - 192.168.1.20 But, I also need to connect to my Guest OS (or Virtual Machines) from my Vista through putty. Any idea people. This might not be the right forum to ask this, I apologize if it is not. |
Are you using the same gateway 192.168.1.1 in Host OS and in virtual machines?
|
Quote:
|
Hi vikas027,
Do you have an ssh server running on the guest machines? When I use putty I generally make an ssh connection. If I attempt to connect to a guest or physical computer which is not running ssh I get a message "connection refused". Once I install and start the ssh server I can connect. Are you attempting to connect by the guest IP address or the guest computer name? Try using the IP address if the computer name does not work. Another thing to check - is there firewall software running on the Win 7 machine? Perhaps the firewall is blocking the connection. When I try to connect to my Ubuntu host from a VMWare Win 7 guest for the first time putty prompts me to add the host' rsa fingerprint to the registry. After I click OK to add the fingerprint I am able to connect. Are or were you prompted to do this? If none of this helps please tell us what error messages you are receiving or what is happening or not happening when you try to connect to the guests with putty. Ken |
Set VM nic setting as local and try to use the two VM's between each other.
|
Quote:
Quote:
Quote:
Quote:
Quote:
and below error when pinging the Guest OS. Code:
C:\Users\vicky>ping 192.168.1.10 |
Quote:
and as of now, the VMs are able to ssh/ping each other. |
I guess I am not even sure what the question is. I don't get the talk about putty when it is not even clear the host can talk to the guests.
To sort this out, in each guest, in a shell window, type in the command "ifconfig -a" and copy the results here. You might need to be root in order to do this. Then , for each guest, enter the command "route" (again you might have to be root) and copy the results here Then, in the host, open a cmd window and type in the command "ipconfig /all" and copy the results here. Then, in the host, type in the command "route print" and copy the results here. Once I see the output from those, I'll be able to tell you what is wrong. |
Quote:
Code:
FIRST VIRTUAL MACHINE Quote:
Code:
IPCONFIG /ALL |
Your LAN is down on the vista host. You do not have a 192.168.1.* address specified anyplace, and you have no route specified for that IP range. Hence no communications between host and guests, though obviously from the correct routing tables on the guests they can talk to each other.
You have a lot of IP tunnels running on the host. I don't use Vista here, and I only recently deployed Windows 7 (as a VMWare virtual machine with a Linux host, as it happens), and I do recall vaguely something about problems with that tunneling feature and I turned it off on my Win 7 installation. The one IPv4 address I see on your host is this one: 115.118.40.156. I infer from this that the Vista machine is directly facing the internet with no router between it and the internet. I do know that when I traceroute that address, it takes me to a location near Delhi, India; I presume this is your IP address. If true, this is why you don't have a 192.168.1.* address for the host; that address range is non-routable and will only be provided for you if you have a LAN setup. You have three choices. The one I would recommend is that you obtain a small router and place it between your Vista machine and the internet. This will greatly enhance your host computer's security, AND the router will provide a 192.168.x.x address, which you can set to be a 192.168.1.* address range. Thus your host and your guests will all be on the same LAN and will talk to each other. Your second choice, which is less desirable for security reasons (Vista is vulnerable when exposed to the internet) is to switch from bridged networking in VMWare to host-only networking and make sure there is a route in the Vista host that points to the proper address range on the guests. In this way, your guests and your host will be able to talk with each other, though your guests will not be able to access the internet (they can't now anyway) unless you do IP forwarding or masquerading on the Vista host to allow them to reach the 'net. As it happens, on my LAN, though I DO have a router in place, I also use host-only networking so that I can control my Windows guests' internet connections through my Linux host. I then masquerade the guests' IP addresses so that they can talk on the internet. This has proved useful for me since it makes it possible for me to control Windows 7's overwhelming desire to call microsoft all the time by using IPTables in Linux. Your third choice is to use the NAT routing that VMWare provides, and manually set a route on your host that points to the interface (vmnet8, I think) so that you can talk to your guests. I haven't played with VMWare's NAT routing myself so I can't tell you in detail how to do it, and I don't know if it will set up the routing table in Vista or not, though I rather suspect it will. |
Quote:
I would like to go with the second option. Will the two VMs be able to interact with each other then ? Also, could you please guide me, how to add a route in the Vista host to point the address range on the guests ? My current range for the guest is configured in Cent OS are :- Guest OS 1 (CentOS) - 192.168.1.10 Guest OS 2 (CentOS) - 192.168.1.20 |
jpeg 2 shows how to connect host only.
|
Quote:
I tried Host-Only, but then neither the machines could ping each other nor the host could connect it. |
local only would mean the host can not connect.
Local only was for testing. On local what is ifconfig? No need for gateway. If ping is unblocked then it should work. |
If you set up host only networking, I would expect Vista to handle all details of routing for you. The vmnet1 adapter should be enabled and assigned an IP address (using your current configuration, you probably would want vmnet1 to have 192.168.1.1 for its address).
You probably should just use DHCP, at least initially, for setup of host-only networking. If Vista does not provide a route to the vmnet1 adapter, you would do it from a command line window using the ROUTE ADD command. Examples of syntax are automatically shown for you when you when you type in just the word ROUTE. |
All times are GMT -5. The time now is 08:48 AM. |