VMware Connection Issue
brupala Posted messages 111174 Registration date Status Member Last intervention -
Hello,
I am using VMware (the latest version) to connect to industrial automation systems.
When I connect to a device, I set my network card on my VM to a static IP on the same range as my device and connect.
However, every time I have to restart my PC to make it work.
I tried disabling/enabling the network card but it doesn't change anything.
I checked my configuration in VMware and it seems correct:

I also tried disabling the firewall on my Windows PC, but it doesn't change anything either.
It's like Windows is blocking me; I can't connect to the host, but I am sending and receiving packets when I ping!
It could also be Hyper-V blocking me, but that exceeds my skills...
Does anyone know how to help me solve this problem?

Thank you in advance
Best regards
Fabien
5 answers
-
Hello,
I don't know anything about your automated story; it may have some specifics. I have a Windows 11 host with several clients, and I chose Windows 10, why not.
I'm not sure if it affects anything, but Hyper V doesn't need to be enabled; it's only useful for virtualization with Windows, not with third-party software, but of course, virtualization must be enabled in the BIOS.
I assumed that your troubles came from the fact that you hadn't checked Replicate under Bridged, lost, according to my clients it either is or isn't, but it won't hurt to try.
On the client side, there is a virtual network card in the settings of which there is strictly nothing, left by default.
On the host side (my Box is at 192.168.1.1) the PC has its fixed IP 192.168.1.65, mask 255.255.255.0, gateway 192.168.1.1, DNS of my choice (Cloudflare), VMWare Bridge protocol checked.
VMWare creates 2 virtual adapters, VM1 and VM8, the first at 192.168.72.1/255.255.255.0, the second at 192.168.92.1/255.255.255.0, both without a gateway and VMWare Bridge protocol unchecked.
Both the client and the host are on a private network, with file and printer sharing enabled.
However, I notice that on the host, the physical network card and the virtual ones are not in the same segment, which is perhaps what is causing the firewall to fail. It should either be disabled on both sides for testing purposes or configured with 2 trusted local IP zones, Tartempion1 and Tartempion2, corresponding to each of these segments, and allow everything that transits between these IPs.
Apart from the connection itself and despite the famous Shared Folders, sharing files between heterogeneous systems (for example, Linux-Windows) outside of simple copy-paste is not possible without a bit of twisted configuration on the Linux client side.
-
Hello,
you’re talking about Hyper-V and VMware, but we should really know which hypervisor you're actually using.
And there you go ....
But goodness, the line spacing is so annoying!! -
Hello,
Thank you for your feedback.
I use VMWare. I mention Hyper-V because, without knowing too much about it, I know that before the latest version of VMWare, Hyper-V caused issues and you had to do some "hacks" to manage to start my VMs.
I will take the time to look carefully and run tests based on what Brucine replied.
I will keep you updated as soon as I have completed these tests, and if you have any other ideas or comments in the meantime, don't hesitate.
Thank you and have a good end of the weekend.
-
Hello,
I’ve done some tests and made progress in the analysis.
I checked the VMs that didn’t have the VMWare Bridge Protocol enabled. It didn’t change anything. Had to try...
The bottleneck is on my PC, not on my VMs.
I will explain the architecture again and then explain what’s blocking so you can help me properly.
I’m a new freelancer, so I work with my personal laptop at clients' locations to make changes to automation systems on production machines.
In these conditions, I generally plug an RJ45 cable directly into the port of the automation system, which has a fixed address (sometimes there’s an unmanaged local switch that serves as a connection point) to the RJ45 port of my PC, which has an automatic IP. And I connect to the automation system from my VM, which has a fixed IP.
Example of addressing:
Automation system IP: 192.168.12.1
PC IP: automatic (manual tests at 192.168.12.250 but that changes nothing)
VM IP: 192.168.12.245 (automatic doesn’t always work)
In my last tests, if I only do that, it works every time.
However, I also need internet at the same time. So I set up a hotspot on my mobile phone and connect via Wi-Fi on my PC.
And that’s where it gets stuck.
If I connect to the internet via Wi-Fi before connecting to the automation system => KO
If I connect afterwards => OK
So there’s definitely some setting to manage on my PC, in the firewall or the network card?
Do you know how to manage that?
-
Hello,
If I understood correctly, and unless the programmable logic controller is to be considered as a Box for one reason or another, the PC via Ethernet will obtain its WAN network connection not from the controller but from the Box it is connected to, thus not being in the same addressing segment (more likely 192.168.1.X).
To reproduce the setup that works for me, the IP of the connected PC would need to be statically set to 192.168.1.Y with the gateway as 192.168.1.X.
But under these conditions, and since the segment is not the same, independently of the virtual machine, the PC will not see the controller. I did this at work in the past (fixed controller and PC), and I believe the subnet mask needs to be changed (255.255.0.0?) and the gateway accordingly; I'm not an expert in this area.
In any case, one thing is for sure: on a PC, you cannot have both an active Ethernet connection and an active Wi-Fi connection at the same time; you need to disconnect one to activate the other. -
Hello,
Okay, nothing to do with virtualization, so it's just a routing priority issue.
The company's DHCP should assign you a default gateway with a certain priority; in terms of routing, priority is represented by the metric in route print, the lower it is, the more priority the route has.
You need to either increase the metric of the default route (0.0.0.0) over Ethernet, or decrease that of the Wi-Fi card.
You can also adjust the interface priority, but it seems to me that this only matters when they are connected to the same IP network, which is not your case.
You can change the metric either by using the route change command or route delete to possibly remove the default route.
You can also do it via netsh: netsh interface set route or through PowerShell:
https://www.lecoindunet.com/modifier-priorite-cartes-reseaux-filaireswifi-windows-143
-
-
