Ruby On Rails : VmWare : Open your localhost running inside a virtual machine from your host

If you are running Ubuntu 14.04 in your virtual machine and want to run your web application from your host OS viz. Windows or OSx then this post is for you.

Steps:

$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:be:df:b8
inet addr:192.168.79.128 Bcast:192.168.79.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:febe:dfb8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15822 errors:0 dropped:0 overruns:0 frame:0
TX packets:9998 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17368444 (17.3 MB) TX bytes:1260756 (1.2 MB)

You can see the IP for your web server will be

192.168.79.128:3000
# In my case it was 192.168.79.128:3000
#   whereas 3000 is port number for my web server : Webrick

Enter the ip above in you Windows browser

Snapshot of invoking webserver running inside my vmWare Guest ubuntu instance

Snapshot of invoking webserver running inside my vmWare Guest ubuntu instance

Network Configuration Needed : Guest OS

VmWare Configuration needed to access guest network form host OS

VmWare Configuration needed to access guest network form host OS

One thought on “Ruby On Rails : VmWare : Open your localhost running inside a virtual machine from your host

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s