Hello to everyone,
I have a bridged Win7 VM (set up with IP 192.168.0.51) on a Debian host (whose IP is 192.168.0.50).
Win7 is accessed through RDP from others PC in the lan and is meant to share an application that operates on files stored on the host.
As the application on Win7 points to IP 192.168.0.50 in order to get to the needed files, I figure it out that this data traffic goes through the lan to the router and back to the same physical machine.
Is there any option to avoid this redundancy and get this specific traffic routed interally in the same machine?
Or am I wrong and this connection already works the way I want?
Is it possible internal connection from VM to Host while bridged network?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Is it possible internal connection from VM to Host while bridged network?
I don't believe that's how it should work. AFAIK the bridged driver attached to the local NIC acts like a switch. As such it should route the packet back without it ever reaching the physical network beyond.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Is it possible internal connection from VM to Host while bridged network?
In addition to Mpack's thoughts above (maybe Virtualbox Networks: In Pictures: Bridged Adapter might help you visualize the extra Bridged "switch"):
You are able to access the data now, in the normal fashion that two physical PCs would do it. The only difficulty I could see with your existing setup is if the data going through the LAN is swamping the LAN and slowing other things down.
There is a Host-Only network you can add to the VM on a different VM network adapter. But the Host-Only network cannot be merged into the LAN network, it must remain separate, with different IP address range than the LAN. You'd have to change the service running on the VM to point to the host's Host-Only network adapter (defaults to 192.168.56.1) instead of the 192.168.0.50 you have now. Whether that's easy or difficult depends on your service, and whether that gives you faster access to the data can only be told by trying it.
If the VM accesses the data only by opening host files, not by reading/writing into host databases, you might be able to use Virtualbox Shared Folders, which is a separate data transfer channel through Guest Additions that does not go through the network. Again the speed will have to be experimentally determined. And the type of access to the host files may be a problem: Though Virtualbox Shared Folders are intended to act like a real shared folder, experience shows that they're only solidly reliable for copying files into and out of the VM.
If you're trying to solve a LAN speed problem, a faster switch may help, too, with less experimental setup.
(I'm not sure how this could be done, but a Wireshark trace on what's going through your LAN switch might be able to tell if the data is making it out to the LAN switch or only staying inside the Bridged "switch" generated by Virtualbox.)
You are able to access the data now, in the normal fashion that two physical PCs would do it. The only difficulty I could see with your existing setup is if the data going through the LAN is swamping the LAN and slowing other things down.
There is a Host-Only network you can add to the VM on a different VM network adapter. But the Host-Only network cannot be merged into the LAN network, it must remain separate, with different IP address range than the LAN. You'd have to change the service running on the VM to point to the host's Host-Only network adapter (defaults to 192.168.56.1) instead of the 192.168.0.50 you have now. Whether that's easy or difficult depends on your service, and whether that gives you faster access to the data can only be told by trying it.
If the VM accesses the data only by opening host files, not by reading/writing into host databases, you might be able to use Virtualbox Shared Folders, which is a separate data transfer channel through Guest Additions that does not go through the network. Again the speed will have to be experimentally determined. And the type of access to the host files may be a problem: Though Virtualbox Shared Folders are intended to act like a real shared folder, experience shows that they're only solidly reliable for copying files into and out of the VM.
If you're trying to solve a LAN speed problem, a faster switch may help, too, with less experimental setup.
(I'm not sure how this could be done, but a Wireshark trace on what's going through your LAN switch might be able to tell if the data is making it out to the LAN switch or only staying inside the Bridged "switch" generated by Virtualbox.)
Re: Is it possible internal connection from VM to Host while bridged network?
That's really fantastic!scottgus1 wrote: ↑24. Nov 2023, 14:20 (maybe Virtualbox Networks: In Pictures: Bridged Adapter might help you visualize the extra Bridged "switch"):
I'll give a try and verify if this has benefits or not
Actually I don't know much about this "management software" behaviour, not even the reason to develop Linux data handling and Windows user GUI, but I'm quite sure it's more complex than just "copying files"
Clever suggestion!
Thanks so much!
Re: Is it possible internal connection from VM to Host while bridged network?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Is it possible internal connection from VM to Host while bridged network?
There will be a benefit to being on an SSD, but no benefit at all to being "raw". Raw I/O bypasses host file caching, why would that be a good thing?
In any case SSD can have a huge number of outstanding parallel I/O transaction (there being no seek latency), so the issue of "sharing the drive" is a non-sequiter.