Troubleshooting
Why KepServerEX reads bad quality on a Hyper-V VM
Short answer
Bad quality from a trial KepServerEX on a Server 2019 Hyper-V guest, while the same project reads the PLC on a Windows 11 PC, has three likely causes: the two-hour demo timer, a failed TCP path to the PLC port, or ECN that the PLC's older stack rejects. Test them in that order: restart the runtime service, run Test-NetConnection against the driver's port, then disable ECN and restart the runtime.
On this page
- What does bad quality on every tag actually tell you?
- Is the trial's demo timer the cause?
- Can the Hyper-V guest reach the PLC's TCP port?
- Should you disable ECN on the Server 2019 guest?
- How do you prove where the packets stop?
- What else quietly breaks a trial VM on Hyper-V?
- Which fix applies to your case?
- Questions asked
Your trial KepServerEX reads the Mitsubishi PLC cleanly on a Windows 11 PC and shows Bad quality on the Windows Server 2019 Hyper-V guest, with antivirus and firewall already off. That leaves three causes, and you test them in order of cost: the trial's demo timer, which a runtime service restart resets; the TCP path from the guest to the PLC's port, which one PowerShell command proves or disproves; and Explicit Congestion Notification on the 2019 guest, which an older PLC stack can reject. Work down the list and stop at the first test that changes the result.
What does bad quality on every tag actually tell you? #
Bad quality means the server holds no valid value to give the client: the channel has no working connection to the PLC, or the trial runtime has stopped serving data — it is not a tag-addressing fault when the same project reads clean on another machine. A wrong address is caught when the item is configured, so it does not fit this symptom. The same one-works-one-doesn't pattern appears when commissioning software fails on one Windows PC but not another: the project is constant, so the difference lives in the machine. If live values read Good while only stored values fail, that is the separate fault where an OPC server cannot pull archived tags from a historian, not this one.
| Observation | Likely layer | Next check |
|---|---|---|
| Same project Good on the Windows 11 PC, Bad on the guest | Guest runtime state or network path, not addressing | Run the three tests below in order |
| Every tag Bad at the same moment | A whole-runtime cause: demo window or channel down | Restart the runtime service first |
| One device Bad, the rest Good | That device's connection or addresses | Check its port and connection, not the VM |
| Live values Good, only stored values Bad | The historian read path | The archived-tags fault, not this one |
Is the trial's demo timer the cause? #
It is the first thing to rule out: the trial serves data for a two-hour stretch, then every tag goes Bad at once, and the documented reset is to stop and start the KEPServerEX runtime service, which costs a minute and changes nothing else. Kepware's own trial description says the runtime can be restarted repeatedly to keep evaluating, so this reset is the supported procedure, not a workaround.
- On the guest, open the Services console with administrative rights and find the KEPServerEX runtime service.
- Stop it, wait until it shows as stopped, then start it again.
- Watch a live tag in the OPC Quick Client: if the timer was the cause, quality returns within seconds.
Worked example, with illustrative times: you install the trial and start the runtime service at 09:04. At 11:11 every tag turns Bad at once. Elapsed: 11:11 − 09:04 = 2 h 07 min, past the two-hour demo window. You stop and start the service at 11:13, and the same tags read Good again by 11:14 with no network change. The timer was the cause, the guest's path to the PLC is fine, and the decision is to license the server for continuous service rather than touch the network.
One caution: the window lapses without warning, so keep the trial runtime off anything the plant relies on, from production displays upward. The service restart is the vendor's documented way to keep evaluating; continuous operation needs an activated license on that server, verified on the deployed target before you promise data to any consumer.
Can the Hyper-V guest reach the PLC's TCP port? #
Test it with PowerShell's Test-NetConnection from inside the guest, against the PLC's address and the exact port in the KepServerEX device properties: TcpTestSucceeded True means the path is open and the fault is in the protocol exchange, False means pure networking. Read both values from the channel's device properties rather than assuming a default port — the driver's port is whatever the configuration says. Run it in the guest, not on the host:
Test-NetConnection <PLC address> -Port <driver port>
With a PLC at, for example, 192.168.1.20, the command begins Test-NetConnection 192.168.1.20 -Port followed by the configured port number. Ping alone proves nothing here: the port result is the evidence.
TcpTestSucceeded : True— the path is open end to end. The fault is in the protocol exchange, so move to the ECN test.TcpTestSucceeded : False— networking, and no amount of server configuration will fix it. Check in this order:- The virtual switch: it must be external and bound to the physical adapter that reaches the PLC's subnet; an internal or private switch never leaves the host.
- The VLAN set on the guest's network adapter against the PLC's switch port.
- The guest's IP address and subnet mask against the PLC's subnet, plus the default gateway if the PLC sits on another subnet.
A Windows 11 PC on the same LAN succeeding while the guest fails usually means the guest is on a different switch or VLAN, so start with the first two items. It is the same split you meet when an edge gateway is online but the PLC is offline: the server side is healthy and the device path is dead.
Should you disable ECN on the Server 2019 guest? #
Yes, when the port test succeeds and a freshly restarted runtime still reads Bad: with Explicit Congestion Notification enabled, the guest marks TCP packets with ECN bits, and older device stacks — common in PLC Ethernet modules — drop or reject those packets, so the channel never connects. Kepware documents the behavior in its support note on how ECN network settings affect communications to devices. Check the guest's current state first, from an elevated prompt:
netsh int tcp show global
Read the ECN Capability line, then disable it:
netsh int tcp set global ecncapability=disabled
Restart the KEPServerEX runtime service afterward, so the channel opens its socket under the changed setting. Run the same show command on the working Windows 11 PC: if the two machines report different ECN Capability values, that difference is your lead. The change is guest-wide and persists across reboots.
How do you prove where the packets stop? #
Capture on the VM with Wireshark while the runtime service starts, filtered on the PLC's address, and capture the same startup from the working Windows 11 PC: the first packet that differs between the two is the fault.
| In the guest's capture | What it means | What to do |
|---|---|---|
| SYN to the PLC, no reply | Path blocked or the PLC not accepting | Fix switching and VLAN first; then check the PLC module's open-connection settings |
| SYN, then RST from the PLC | The PLC refuses that port or is out of connections | Verify the port in device properties; check the PLC's simultaneous-connection limit |
| SYN carrying ECN bits, no SYN-ACK | The PLC rejects ECN | Disable ECN as above and restart the runtime |
| Connection established, requests sent, no or error replies | Protocol or addressing mismatch | Compare against the Windows 11 capture, then open a ticket with the server vendor's support |
Read the first few packets of each capture side by side; the first difference is the fault. If neither capture explains it, stop changing settings and open the ticket — both captures plus the channel and device configuration are what support asks for first.
What else quietly breaks a trial VM on Hyper-V? #
Two things: a virtual switch bound to the wrong physical adapter, which passes ping to some hosts while the PLC's port stays closed, and the PLC's simultaneous-connection limit, which the Windows 11 instance can occupy while you test the guest.
- Bind check: in the Hyper-V management console, confirm the guest's switch is the external one bound to the adapter that actually reaches the plant network; a host with several adapters is where this goes wrong.
- Connection budget: stop the Windows 11 instance's runtime service while you test the guest, so the PLC's limited connections are free, and restart it afterward.
- Clock note: write down each runtime service restart time, so a later Bad can be checked against the demo window before anyone touches the network.
- One change at a time: after every network change, rerun the port test, then restart the runtime and check quality, or you cannot say which change fixed it.
Which fix applies to your case? #
The one matched to the first test that changes the result: quality returning right after a service restart is the demo timer, a failed port test is the virtual network, and a passed port test with ECN still enabled is the PLC's TCP stack.
- A service restart brings Good back within seconds: the demo timer. Network and ECN are fine; activate a license for continuous service and stop restarting.
- The port test returns False: the virtual network. Fix the switch binding, VLAN or guest address, leave ECN alone, and re-test until True.
- The port test returns True, the runtime is freshly restarted and quality is still Bad: disable ECN, restart the runtime. Good means done; keep ECN disabled on that guest.
- All three done and still Bad: capture both machines as above and open the vendor ticket with both captures and the channel and device settings attached.
Confirmation is a single check: runtime freshly restarted, port test True, ECN disabled, and a live tag reading Good in the OPC Quick Client from the guest.
Questions asked
Does the demo timer turn every tag Bad, or only some?
The whole runtime goes Bad together, because the trial stops serving data as one unit. If some tags stay Good while others turn Bad, the timer is not the cause: look at the affected device's connection and its addresses instead. That all-at-once pattern is the quickest way to separate the timer from a network fault.
Does restarting the runtime service change the project or its settings?
No. The restart only cycles the runtime process: channels, devices and tags stay exactly as saved, and connected clients reconnect on their own, usually within seconds. Note each restart time somewhere, so a later Bad can be checked against the demo window before anyone touches the network.
Is it safe to leave ECN disabled on that guest?
Yes, for this role. Turning ECN off only stops the guest from negotiating congestion marking in TCP headers; it does not limit bandwidth or break applications, and on the LAN segment that talks to PLCs the loss is negligible. Everything on that VM then runs without ECN, which is normal for a dedicated OPC server guest.
Does an activated license change the network or ECN behavior?
No. A license removes the demo timer and changes nothing else: the virtual switch, VLAN, guest address and ECN setting stay as you left them. Fix the network first, then license the server, because a licensed runtime on a broken path serves Bad quality just as dependably as a trial one.