Basically it goes like this...
Currently I have a complicated setup where a Linux guest on a Windows host mounts a physical raw ext4 Linux disk (dual-boot system here) and then uses Samba to provide it as a network drive to Windows so I can read my Linux files there... (yes, there are no ext4 drivers for Windows available, and this is the best I could come up with).
This is done using a host-only network with both the Windows host-only adapter and the Linux adapter having a static IP (there's only two of them, so that's not so difficult to maintain).
However. Recently (well, since several months actually) I have found that Windows can't connect to the guest anymore. Now, I'm not sure, but I think this is because the VirtualBox host-only adaptor IP address doesn't match the Windows adaptor IP address (it says something like 169.254.71.67 where it should be 192.168.56.1 - but host-only networking is so badly documented I have no idea as a matter of fact). Changing it to match the Windows adaptor IP temporarily solves the problem. Temporarily, because every single time VirtualBox restarts, the IP address resets to its old (default?) value. Worse, sometimes I can't even save the address, it resets after every save, so it is impossible to connect to the guest, ever. Which is a problem.
So yeah. By now you should have figured out what my problem is and how I can solve it. Port forwarding may be an option, though I have no idea how it works...
Also, for reasons personal and of arrogance, I refuse to use bridged networking.
No host-only networking... (adapter IP resets)
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: No host-only networking... (adapter IP resets)
APIPA addresses (169.254.x.x) are allocated in Windows if the machine is set to get its network config automatically but no DHCP server can be found. If it is set to Host Only mode it should get a 192.168.56.x address through VirtualBox.
If you set a manual config and it resets to an APIPA address, something odd is happening. Windows will not reset to automatic if you have configured an IP address manually. A manual config overrides DHCP. You would have to manually reset to automatic (by clicking the radio button).
If you set a manual config and it resets to an APIPA address, something odd is happening. Windows will not reset to automatic if you have configured an IP address manually. A manual config overrides DHCP. You would have to manually reset to automatic (by clicking the radio button).
Bill
Re: No host-only networking... (adapter IP resets)
I was having a problem with my host-only address constantly resetting back to 169... This was on a host of Win7 64 bit.
I had deleted and recreated the host-only adapter in [VirtualBox | File | Preferences | Network] but each time I exited and restarted Virtualbox, the new adapter would return to 169...
Then, with Virtualbox shut down, on the host I accessed [control panel | network and sharing center | change adapter settings | VirtualBox host-only adapter | properties ] and then [Internet protocol version 4 | properties] and reset it back to "obtain an IP/DNS address automatically".
After this I found that the server settings in [VirtualBox | File | Preferences | Network] remained as I set them. I even deleted the host-only adapter from within [VirtualBox | File | Preferences | Network] and re-created it again. I then checked the new adapter from [host | control panel] and found that the newly created adapter was dynamic again - but crucially - it didn't return to 169... It stayed as I set in Virtualbox.
So the fix for me was to "temporarily" set the ip properties to dynamic on the host-only adapter.
I had deleted and recreated the host-only adapter in [VirtualBox | File | Preferences | Network] but each time I exited and restarted Virtualbox, the new adapter would return to 169...
Then, with Virtualbox shut down, on the host I accessed [control panel | network and sharing center | change adapter settings | VirtualBox host-only adapter | properties ] and then [Internet protocol version 4 | properties] and reset it back to "obtain an IP/DNS address automatically".
After this I found that the server settings in [VirtualBox | File | Preferences | Network] remained as I set them. I even deleted the host-only adapter from within [VirtualBox | File | Preferences | Network] and re-created it again. I then checked the new adapter from [host | control panel] and found that the newly created adapter was dynamic again - but crucially - it didn't return to 169... It stayed as I set in Virtualbox.
So the fix for me was to "temporarily" set the ip properties to dynamic on the host-only adapter.
-
mikebounds
- Posts: 3
- Joined: 15. Mar 2014, 21:38
Re: No host-only networking... (adapter IP resets)
None of above solutions worked for me, so below is what worked for me on Windows 7:
I found that Vbox would set the IP in [File | Preferences | Network | Host-only Networks] to whatever the IP was set to in Windows, but for some reason in Windows the IP was set to 192.168.56.1 in the control panel in network adapters, but running ipconfig from cmd showed it was set to a 169 auto dhcp address. I tried different IPs in TCP/IP in network adapters from control panel and any 192.168.56.x address would reflect in ipconfig output, except for 192.168.56.1 and the other strange thing is that even if I deleted 192.168.56.1 in control panel, then it would come back when I went back in. So I set address to 192.168.56.254 and 192.168.56.1 got added back in and this is the address you see on the "General" tab in "TCP Properties", but you see both 192.168.56.1 and 192.168.56.254 in "Advanced" and crucially I have 192.168.56.254 shown by ipconfig. So now when I reboot 192.168.56.254 in ipconfig when I start vbox it shows 192.168.56.254 in Host-only Networks and I can connect to my VMs from Putty.
Mike
I found that Vbox would set the IP in [File | Preferences | Network | Host-only Networks] to whatever the IP was set to in Windows, but for some reason in Windows the IP was set to 192.168.56.1 in the control panel in network adapters, but running ipconfig from cmd showed it was set to a 169 auto dhcp address. I tried different IPs in TCP/IP in network adapters from control panel and any 192.168.56.x address would reflect in ipconfig output, except for 192.168.56.1 and the other strange thing is that even if I deleted 192.168.56.1 in control panel, then it would come back when I went back in. So I set address to 192.168.56.254 and 192.168.56.1 got added back in and this is the address you see on the "General" tab in "TCP Properties", but you see both 192.168.56.1 and 192.168.56.254 in "Advanced" and crucially I have 192.168.56.254 shown by ipconfig. So now when I reboot 192.168.56.254 in ipconfig when I start vbox it shows 192.168.56.254 in Host-only Networks and I can connect to my VMs from Putty.
Mike