OK, I'm posting this here because the Drupal community is nice and I think the solution will be of be benefit to almost all Drupal developers ...
My OS is Ubuntu 9. I'm using Virtualbox and I'm running a Windows 7 Virtual Machine.
Using the Win7 VM, I want to test my development sites set up under Ubuntu.
I want to do this using various Windows browsers (Internet Explorer, Safari, Firefox, Opera).
So, how do I configure my setup so that the Virtual Machine can "see" Ubuntu's hosts.txt file (ie: my local development sites)?
To put it another way, I want to browse my RM (Real Machine) with my VM!
Anyone able to explain this in simple "do this then this" terms? Ubuntu networking is too strange and new to me.
Appreciation levels will be very high. :)
PS: Also very interested in Ubuntu internet connection sharing *from* a wireless connection to Ethernet device - anyone?
I can do this easily with Mac and PC, but Ubuntu ... just not happening for me!
Comments
long story...
I'm doing everything totally different from you, (running ubuntu server inside a virtualbox on OSX) but may have some hints.
First, the approach depends entirely on how you've set up the network bridge in vbox. I think you want 'bridged' not 'NAT' because your two machines really should have different IPs.
Next, your client machine needs visibility of the host+server.
Quickest way is to find your Ubuntus IP, and enter that into the browser on your client. If your client has a working network, that will work.
OK, but no fun for name-based hosts, or multisites.
You mention hosts.txt (it's not called that btw) so I gues you are progressing as far as name resolution. Well, that's called DNS. For names hosted on one machine to be visible fro the other ... you need DNS or a trusted third party.
Quick answer: skip that and hack the HOSTS file on your guest the same way you (?) already did. /windows32/drivers/etc/HOSTS IIRC.
Real answers are hugely harder - you need to set up a DNS server on Ubuntu, and get your network to trust it. It requires some learning. Read the Ubuntu tutorials on bind, named, resolv, and setting up your own zones.
http://www.ubuntugeek.com/dns-server-setup-using-bind-in-ubuntu.html
Bonus is you can set up wildcard DNS also - which is a good win for rapid development.
*If* you do all that, then you can tell your guest to use your host as a DNS server - which means you will always be able to find the named dev sites. Or you can tell your local router to use your ubuntu as a (one of the possible) DNS server - which means your whole LAN can find your local named sites from now on. That may be beyond scope for now ... but works.
Oh, and if you haven't already, tweak your LAN router so your Ubuntu gets a static IP, not DHCP. You'll never get anywhere on DHCP.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
DNS stress ...
Thanks mate. Appreciate your effort.
I'll check out the Bind/local-DNS option. That way I can test from my Mac, my XP PC, my Ubuntu, my Win 7 VM ...
:) S.