VMware Communities
Leornardo
Contributor
Contributor

Connect to my VM from my host OS

Hello for All.

I have created a VM with CentOS 5.6 64 bit, and I run this VM with VM ware player 3.1. My host OS is WinXP.

I have configured my VM network's adapter as NAT, and I set a hostname and a fixed ip on guest OS.

I wonder if you can tell me which configurations steps I need to do in prior to access the VM by using software like putty, sql developer and so on. Do I have to change the VM network adapter's configuration?

Thanks

0 Kudos
8 Replies
FranckRookie
Leadership
Leadership

Hi Leonardo,

Welcome to the forums.

Check the configuration of the virtual NIC attached to the NAT network on the host. You have to give the guest OS an IP address on the same subnet.

On your Windows host, use "ipconfig /all" to retrieve the configuration of the VMnet8 adapter. Give the CentOS an IP on the same subnet. Then, you should be able to access your guest directly from the host. Check that any firewall is disabled for the ports you need to access.

Good luck.

Regards

Franck

0 Kudos
Leornardo
Contributor
Contributor

Franck,

I followed your instructions, for VMNet8 virtual ethernet adapter, I have configured the following IP's: 192.168.142.1 and 10.157.215.51 (I set this for my VM), and the following subnet mask: 255.255.255.0 (I set this subnet mask in VM's network configuration too). Additionally, the firewall is set to off. I make a ping to 10.57.215.51 obtaining the desired response.

I have an Oracle DB installed on my VM, and I can connect to this DB when I work inside the VM (for to get connected to this database I use host: 10.157.215.51, and port 1521). However, when I try to connect to this DB from my Host OS (WinXP) I get an error code, something like "the network adapter could not establish the connection" (I use host: 10.157.215.51 and port 1521).

Do you think there is some missing configuration?, remember, the VM's virtual network adapter is set to NAT, or do I have to change the configuration to host only?.

Thanks,

0 Kudos
FranckRookie
Leadership
Leadership

If I understand correctly, when running "ipconfig /all" on your host, you should have "192.168.142.1" for VMnet8 adapter. So on your VM, you should have a static address in the range "192.168.142.3" to ".254" (or leave it in DHCP if possible). Then, you should be able to reach your Oracle database through this address from the host.

Franck

0 Kudos
Leornardo
Contributor
Contributor

Franck,

I set my VM ip address to 192.168.142.5 (obviously I made the needed changes of the configuration of the DB) but I am still not be able to connect to the DB from my host os.

I let only one ip address in the configuration of VMNet8 adapter (192.168.142.1)

Farid.

0 Kudos
FranckRookie
Leadership
Leadership

Do not use standard Windows mecanism to modify VMnet8 configuration. If you did so, you need to use a VMware application to set it back to the good configuration.

Run Player installer with "/e .\source" option. Open “network.cab” in the new "source" folder and extract vmnetcfg.exe. Now you can run vmnetcfg, select VMnet8 and check that Subnet IP is set to 192.168.142.0 . If it is not the case, correct it. Otherwise, change it to a temporary config, click Apply and set it back to its original config. This should bring you back to a working configuration.

Franck

0 Kudos
Leornardo
Contributor
Contributor

Franck,

Finally I changed the VM virtual network adapter´s configuration to Host-Only, next, I changed the guest ip settings and I could get connected to the Oracle DB located at the guest.

However I noticed that when I connect my machine to my job´s VPN, I can´t get connected to the VM, do you know why?

My configuration is the following:

VMNet1:                       Subnet IP: 192.168.75.0

                                    Subnet Mask: 255.255.255.0

                                    Default gateway: 192.168.91.1

Guest:                          IP: 192.168.75.200

                                    Subnet Mask: 255.255.255.0

                                    Default gateway: 192.168.91.1

When I send an ipconfig /all command all information about VMNet 1 appears, but when I connect to the VPN and send the ipconfig command agin, the default gateway info is left blank.

Thanks,

0 Kudos
FranckRookie
Leadership
Leadership

It should be due to your VPN client. It should prevent you to connect to any other network but your private job's subnet.

Leornardo
Contributor
Contributor

As you said, the VPN configuration prevents the connection between the host and the guest. Nevertheless, I do not need to stay connected to the VPN all time.

Thanks for you help in solving the main topic: the connection between host ang guest.

0 Kudos