Page 1 of 1

Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 12:20
by jcpeden
Setup
Host: OSX
Host webserver: Native apache
Guest: Windows XP
Guest browsers: IE8, Chrome
Network config: NAT

Symptom
Guest can access www sites, local sites e.g. router admin and can ping host IP (10.0.2.2) with 100% success.
Guest cannot access localhost through web browser on 10.0.2.2, request times out.
Firewalls on both host and guest are disabled.

What can I try to fix or diagnose this?

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 15:27
by Perryg
You do realize that localhost means exactly what it implies right?
You need to look at this as two different PCs and not one. Use the guests ip address or define it in DNS if you are running a DNS server.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 15:33
by jcpeden
Followed these instructions:

justinmarsan[dot]com/accessing-localhost-in-mac-osx-from-windows-vm-in-virtualbox/

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 15:48
by Perryg
Why? Why not just give it a name like Mac or Main? Using localhost is going to cause issues since each PC has its own localhost that is defined to 127.0.0.1. This has nothing to do with VirtualBox, its just networking 101.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 16:07
by jcpeden
Ah! I understand what you're saying.

I'm not trying to ping localhost or browse to localhost on the guest machine.

I'm trying to ping and browse to 10.0.2.2. I've also tried mapping my host virtual hosts to this IP in my guest hosts file e.g. website.dev 10.0.2.2

Also times out.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 16:36
by Perryg
From the hosts terminal/command window type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 17:42
by jcpeden
Name: IE8
Groups: /
Guest OS: Windows XP (32 bit)
UUID: 881a5ea1-dc7c-43cc-a373-ea4840f3f7de
Config file: /Users/johnpeden/VirtualBox VMs/IE8/IE8.vbox
Snapshot folder: /Users/johnpeden/VirtualBox VMs/IE8/Snapshots
Log folder: /Users/johnpeden/VirtualBox VMs/IE8/Logs
Hardware UUID: 881a5ea1-dc7c-43cc-a373-ea4840f3f7de
Memory size: 512MB
Page Fusion: off
VRAM size: 32MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 2
PAE: off
Long Mode: on
Synthetic CPU: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
Time offset: 0ms
RTC: local time
Hardw. virt.ext: on
Nested Paging: on
Large Pages: on
VT-x VPID: on
VT-x unr. exec.: on
State: powered off (since 2014-10-16T12:39:26.000000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
IDE Controller (0, 0): /Users/johnpeden/VirtualBox VMs/IE8/Snapshots/{b7a6947e-69c6-49a4-aaf5-89ee2656845f}.vmdk (UUID: b7a6947e-69c6-49a4-aaf5-89ee2656845f)
IDE Controller (1, 0): Empty
NIC 1: MAC: 08002786B154, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: CoreAudio, Controller: AC97)
Clipboard Mode: disabled
Drag'n'drop Mode: disabled
VRDE: disabled
USB: enabled
EHCI: disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups: <none>

Shared folders:

Name: 'Sites', Host path: '/Users/johnpeden/Sites' (machine mapping), writable

VRDE Connection: not active
Clients so far: 0

Video capturing: not active
Capture screens: 0
Capture file: /Users/johnpeden/VirtualBox VMs/IE8/IE8.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25

Guest:

Configured memory balloon size: 0 MB

Snapshots:

Name: clean (UUID: 3bdb07b4-d3eb-4da7-bffe-e77a4c918533) *
Description:
The initial VM state

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 17:52
by Perryg

Code: Select all

NIC 1: MAC: 08002786B154, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
This says you are using the host-only network mode and that mode has a default scheme of 192.168.56.*
Did you by chance change it, and if so why?

Also if you did change it for what ever reason and you are manually assigning the address in the guest you never use a gateway in host-only as it will kill the LAN access.

Note: defaults are for a reason so if you did change them I would suggest that you put them back.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 18:04
by jcpeden
Read some posts saying that the guest and host could only access each other in bridged mode.

I'll change back to NAT. Anything else you can see?

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 16. Oct 2014, 18:12
by Perryg
NAT won't work out of the box and you are not using Bridged you are using host-only.

Look set the guest to use host-only and set the guest to get its address from dhcp. The host will be 192.168.56.1 and the guest will be 192.168.56.101

If you need the Internet in the guest add a second adapter set to NAT

Add the host name you choose and the address of 192.168.56.1 as its address to the guests host file and eliminate what you have already put in it.
Be sure to reboot the guest.

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 17. Oct 2014, 10:35
by jcpeden
Done, the windows host is not getting an IP now:

Name: IE8
Groups: /
Guest OS: Windows XP (32 bit)
UUID: 881a5ea1-dc7c-43cc-a373-ea4840f3f7de
Config file: /Users/johnpeden/VirtualBox VMs/IE8/IE8.vbox
Snapshot folder: /Users/johnpeden/VirtualBox VMs/IE8/Snapshots
Log folder: /Users/johnpeden/VirtualBox VMs/IE8/Logs
Hardware UUID: 881a5ea1-dc7c-43cc-a373-ea4840f3f7de
Memory size: 512MB
Page Fusion: off
VRAM size: 32MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 2
PAE: off
Long Mode: on
Synthetic CPU: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
Time offset: 0ms
RTC: local time
Hardw. virt.ext: on
Nested Paging: on
Large Pages: on
VT-x VPID: on
VT-x unr. exec.: on
State: running (since 2014-10-17T08:33:03.000000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
IDE Controller (0, 0): /Users/johnpeden/VirtualBox VMs/IE8/Snapshots/{b7a6947e-69c6-49a4-aaf5-89ee2656845f}.vmdk (UUID: b7a6947e-69c6-49a4-aaf5-89ee2656845f)
IDE Controller (1, 0): Empty
NIC 1: MAC: 08002786B154, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: CoreAudio, Controller: AC97)
Clipboard Mode: disabled
Drag'n'drop Mode: disabled
Session type: GUI/Qt
Video mode: 1920x835x32 at 0,0
VRDE: disabled
USB: enabled
EHCI: disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups: <none>

Shared folders:

Name: 'Sites', Host path: '/Users/johnpeden/Sites' (machine mapping), writable

VRDE Connection: not active
Clients so far: 0

Video capturing: not active
Capture screens: 0
Capture file: /Users/johnpeden/VirtualBox VMs/IE8/IE8.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25

Guest:

Configured memory balloon size: 0 MB
OS type: WindowsXP
Additions run level: 3
Additions version: 4.2.1 r80865


Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2014/10/17 08:33:12 UTC)
Facility "VirtualBox System Service": active/running (last update: 2014/10/17 08:33:23 UTC)
Facility "VirtualBox Desktop Integration": active/running (last update: 2014/10/17 08:33:31 UTC)
Facility "Seamless Mode": active/running (last update: 2014/10/17 08:33:12 UTC)
Facility "Graphics Mode": active/running (last update: 2014/10/17 08:33:12 UTC)

Snapshots:

Name: clean (UUID: 3bdb07b4-d3eb-4da7-bffe-e77a4c918533) *
Description:
The initial VM state

Re: Windows XP Guest Cannot Access Apache Localhost

Posted: 17. Oct 2014, 14:34
by jcpeden
More hassle than it's worth this!

Just setup a shared drive, installed XAMPP and mapped my htdocs folder to the shared drive.