Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've managed to set up a Debian server (in a VM) and now I can access it in the Windows 7 host at 192.168.56.101

Is there any way to "map" that IP to a domain name? It doesn't have to be accessible from the internet, just from the host. Because it's annoying to type the IP in the browser every time I want to access it.

share|improve this question
    
Have you tried connecting via \\<vm name>? –  Kruug May 19 '13 at 1:21
    
Are you running nmbd in the guest? –  Ignacio Vazquez-Abrams May 19 '13 at 1:23
    
I'm sorry I don't know what's that :) How do I check if I am? –  melanie May 19 '13 at 1:25
    
What do you mean "access/map?" You mentioned you are using a browser, are you trying to connect to a Web server you have installed? –  not__p May 19 '13 at 1:26
    
Yes. It's apache running on debian, which is running in virtualbox, under windows 7 –  melanie May 19 '13 at 1:26

1 Answer 1

up vote 1 down vote accepted

Very easy to do, find your Windows 7 hosts file and put an entry in it. The Windows 7 system will now be able to resolve the name to the IP. I'm running a similar dev environment as to what you're describing. Windows 7 Host running Virtual Box with an Ubuntu server VM.

Windows\System32\Drivers\etc\hosts

Add a line as follows

92.168.56.101           www.example.dev
share|improve this answer
    
that worked:D thanks –  melanie May 19 '13 at 1:34
    
You're welcome! And a +1 for developing in a native environment through the use of a VM. I've watched people struggle with WAMP environments and the OS conversion misery that follows during going live, but it helps if you are dealing with the same owner/permissions and server setup environment in dev as you will be live. –  Fiasco Labs May 19 '13 at 1:40
    
thanks! Indeed it's much better, at least with PHP and apache. I can install any extension I want, and I can control everything with Putty :D But it's kind of tricky to make the vm run as a service in the background –  melanie May 19 '13 at 1:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.