Virtaul Machines in VPC

Associate
Joined
31 Jan 2007
Posts
1,860
Hello,
I am using Virtual PC 2007 and MUST for certain reasons stick wiht this software. I have got Windows XP running in a VPC and have Firefox 3 Beta 5 installed. Is there anyway to set the vpc copy of xp so when I type in "localhost" in a web browsers address bar it points to "localhost" on the host machine instead of the virtual machine. I know I can just use the IP address but I need to use "localhost"

Thanks

Neil
 
You could maybe modify the hosts file to point to the IP address you want rather than 127.0.0.1 for localhost. I've not tried it but I think it should work.
 
Yep, on the guest VM browse to %windir%\system32\drivers\etc and open the file called hosts with a text editor (notepad will be fine).

There's already a line in there that says:

Code:
127.0.0.1       localhost
Change this to the different IP address that you want to use, e.g. if the IP address of the host machine is 192.168.10.1 then use this in the hosts file instead

Code:
192.168.10.1       localhost
 
Can anyone help with this?

I am in desperate need to sort this out. I have changed the hosts file and when i type localhost into the browser on the guest machine it searches windows live search for "localhost". If I type the ip address I want itno the browser then it's fine but for what I need to do I MUST 100% be using localhost
 
I've just tried this on one of my VMs.

I've changed an entry in the hosts file so that localhost is directed to my server.

Code:
192.168.0.2   Localhost

When you ping it, it seems fine (although it comes up with the local machines FQDN). However, when you try any other service like HTTP, it times out.

Weird.

Burnsy
 
How do you mean, I am just using ahome network with a Linksys router and several PC's. I am running WAMP Server 2 on my pc whcih is the server I am trying to gain access to from the virtual pc but MUST use localhost and not an ip address
 
I'm only suing the vpc to testa website and I'm using a gallery script whcih is written someway and doesn;t work with it ahving the ip address but does work when it says localhost whcih is why it must say localhost
 
You could always alter the script files and replace localhost with your desired IP address.
 
how do you do that?

I wouldn't have a clue for your particular application. Best bet would be to see if the script creators have a web site with support and maybe forums. Ask other users of the gallery software how thay do it.
 
Back
Top Bottom