IMD SolutionComputing LibraryShop main store

Troubleshooting

Using a USB programming cable inside a Hyper-V VM

Remote access and virtualization Published 7 min read

Short answer

Hyper-V gives Generation 1 guests no USB passthrough, so a Siemens USB PPI or MPI cable cannot appear inside the VM. Redirect the cable's host COM port over RDP, or move to an Ethernet-to-PPI adapter with an emulation driver on an isolated subnet; fix host-to-guest networking with an internal virtual switch and static IP addresses.

On this page
  1. The Generation 1 device boundary
  2. Fix the host-to-guest path first
  3. Route 1: redirect the cable's COM port over RDP
  4. Route 2: an Ethernet-to-PPI adapter with an emulation driver
  5. Planning an offline 192.168.50.0/24 subnet for one guest and one adapter
  6. Checks before you program
  7. Questions asked

A Generation 1 Hyper-V guest gets no USB passthrough. No driver, no VM setting and no console option puts a USB programming cable inside that guest, so the question is not how to attach the cable but which transport replaces it. If the cable presents a Windows COM port on the host, redirect that port into a Remote Desktop session and program from inside it. If it does not, use an Ethernet-to-PPI adapter with an emulation driver, reached through an external virtual switch on a subnet that never touches the internet. The failed RDP attempt is a separate, fixable fault: the guest had no host-reachable network path. An internal virtual switch with static addresses gives host-to-guest Remote Desktop with zero internet exposure.

The Generation 1 device boundary #

A USB programming adapter attaches to the host first. The host enumerates it, loads its driver, and exposes whatever that driver implements: usually either a Windows COM port or a dedicated USB device. Hyper-V's documented device model for a Generation 1 guest contains storage, four IDE devices plus SCSI disks, and network adapters. There is no USB host controller in the guest, so the cable appears in host Device Manager and can never appear inside the VM, and no USB setting exists in the guest's Hyper-V configuration to enable.

This also settles two tempting fixes. Installing the Intel USB 3.0 eXtensible Host Controller driver inside the 64-bit Windows 7 guest does nothing, because a host-controller driver can only bind to a controller the operating system physically owns; that driver is for physical Windows 7 machines with USB 3.0 ports. Enhanced session mode, which lets the Hyper-V console redirect devices, needs a guest Windows 7 does not provide, so the console route is closed and a standard Remote Desktop session is the alternative.

Fix the host-to-guest path first #

Two independent faults hid behind the failed connection: the guest had no network path the host could use, and the VM name never resolved. Neither involves USB. Work through the switch, then the addresses:

  • Switch type: an external switch binds the guest to a physical network interface, an internal switch connects the host and guests and nothing else, and a private switch connects guests to each other while excluding the host. A guest on a private switch, or on none, is unreachable from the host whatever address it holds. For offline host-to-guest Remote Desktop, choose internal.
  • Addressing: give the host-side virtual adapter and the guest static addresses in one subnet with the same mask, and leave the guest's default gateway empty. With no gateway the guest has no internet route at all, and nothing on an isolated switch serves DHCP, so static is the only option.
  • Name resolution: on an isolated segment the VM's name does not resolve, and it does not need to. Connect by the guest's IP address.
  • Edition: Windows 7 Home editions cannot host a Remote Desktop session; Professional, Enterprise and Ultimate can. Allow Remote Desktop through the guest firewall.

Internet connection sharing is the wrong tool for this job; the internal switch already provides the connectivity, without the shared internet side. If the goal is broader, a routed path from the guest to PLCs on another subnet, that is a different design, and fixing a VM remote PLC connection with a NAT adapter covers it.

Route 1: redirect the cable's COM port over RDP #

Remote Desktop redirection forwards selected host resources into the remote session, and for this job it forwards a Windows COM port, not raw USB traffic. The test is therefore what the cable enumerates as on the host:

  1. With the cable connected, open Device Manager on the host. Record the device category, the driver, and any COM port number.
  2. A cable that appears under Ports with a COM number is a serial device, and redirection can carry it. A cable that appears as a dedicated USB device with its own driver and no COM number cannot be redirected; skip to Route 2.
  3. Connect Remote Desktop to the guest by IP. Before connecting, open the Local Resources tab, choose More, and tick Ports so the COM port travels into the session. If a policy blocks device redirection the setting will not hold; that is a policy question, not a Hyper-V one.
  4. Inside the guest, set the programming software's interface to the local adapter type and select that COM port.
  5. Prove the path with a read-only identify of the PLC before anything that writes.

Decision: a host COM port present means this route; no COM port means Route 2, or replacement with a cable that presents a serial port.

Route 2: an Ethernet-to-PPI adapter with an emulation driver #

This route moves the boundary from USB to IP. The adapter owns the PLC-side protocol, an emulation driver in the guest presents the programming software with the PPI interface it expects, and Hyper-V supplies the guest a virtual network adapter. Because the adapter is independent of the host's USB stack, the route survives host and laptop changes.

  1. Put the adapter on the segment with the PLC: a small switch or a VLAN with no route to internet-connected infrastructure.
  2. In Virtual Switch Manager, create an external switch bound to the physical network interface that reaches that segment. An internal or private switch cannot reach anything plugged into a physical port.
  3. Install the adapter's emulation driver in the guest, and check its documented protocol support against the PLC's interface.
  4. Give the guest a static address on that segment; leave the gateway empty while the segment stays offline.
  5. Point the driver's destination at the adapter's address, not at the host or the guest. A ping proves only the Ethernet hop; a read-only PLC identify proves the driver and the PLC-side path.

Planning an offline 192.168.50.0/24 subnet for one guest and one adapter #

The addresses below are illustrative example inputs; any private subnet you control works the same way.

Inputs:

  • Host-side network adapter: one address, on the virtual adapter an internal switch creates or the physical port an external switch uses.
  • Guest network adapter: one address, set statically inside the Windows 7 guest.
  • Ethernet-to-PPI adapter: one address, read from its configuration utility and kept if it already suits the plan.
  • Mask: 255.255.255.0, a /24 taken from the 192.168 range reserved for private networks.

Rule: a /24 mask fixes the first 24 of the 32 address bits as the network. Two devices share the subnet exactly when their first three octets match, and the usable host count is 2 raised to the remaining bits, minus the network and broadcast addresses.

Arithmetic:

  • Host bits: 32 - 24 = 8
  • Total addresses: 2^8 = 256
  • Usable addresses: 256 - 2 = 254, since 192.168.50.0 is the network address and 192.168.50.255 the broadcast
  • Needed: 3 addresses, leaving 254 - 3 = 251 spare

Assignment:

  • Host-side adapter: 192.168.50.1
  • Guest: 192.168.50.10, mask 255.255.255.0, default gateway empty
  • Adapter: 192.168.50.20

Check: the first three octets are 192.168.50 on all three devices, so one subnet covers the whole job. Remote Desktop goes to 192.168.50.10, and with the gateway empty the guest stays offline while remaining reachable. Threshold: any address whose first three octets are not 192.168.50 breaks the path, so fix addressing before touching USB settings, drivers or the adapter. That one check resolves most failed-connection reports on this setup.

Checks before you program #

  • From the host, ping the guest address on the internal-switch route, or the adapter address on the external-switch route. No ping means nothing after it will tell you anything.
  • In the session, confirm the COM port appears in the programming software's interface list, then run the read-only identify: port visibility alone does not prove the driver path.
  • On the adapter route, a ping proves only Ethernet; the read-only identify proves the driver and the PLC.
  • Keep the programming subnet physically off internet-connected infrastructure. Offline and reachable are not opposites: a subnet with no default gateway is both.
  • Run the read-only identify before any download. Writing to a running PLC is the one step in this procedure with consequences on the floor.

Questions asked

Does Hyper-V enhanced session mode give Generation 1 guests USB devices?

Enhanced session mode needs a guest that supports it: Windows 8.1, Windows Server 2012 R2 or later. A Windows 7 guest never offers it, on either generation, so console device redirection is out. A standard Remote Desktop connection to the guest's IP address is the supported route for a Generation 1 Windows 7 machine.

Is internet connection sharing a good way to reach the guest?

No. Connection sharing forces its own subnet onto the shared link and starts a DHCP server there, which collides with the static addresses a programming subnet needs. It also builds the internet path you wanted to avoid. An internal virtual switch gives host-to-guest connectivity with addresses you choose and no internet side at all.

The cable enumerates on the host but never in the guest. What does that tell me?

That the boundary, not the cable, is the fault: the host owns the USB controller and its driver, and a Generation 1 guest is never given one. As a fallback, the host itself can run the programming package, because the cable already works there. The VM is what lacks the device, and no guest-side driver changes that.

Can a cable that enumerates without a COM port still be redirected?

Not through RDP. Serial redirection forwards a Windows COM port; it does not tunnel raw USB traffic to a driver inside the session. A cable that appears as its own USB device with no COM number needs the Ethernet-to-PPI route, or replacement with a cable that presents a real serial port on the host.

Will one Ethernet-to-PPI adapter also handle MPI?

Not automatically. PPI (Point-to-Point Interface) and MPI (Multi-Point Interface) are separate Siemens interfaces with different addressing, and an emulator built for PPI does not gain MPI by sitting on Ethernet. Read the adapter's documented protocol list, and confirm the programming package exposes the interface your PLC actually uses.

Keep reading

  • Checklist

    Proxmox for SCADA and PLC engineering virtual machines

    Yes — Proxmox runs Siemens SCADA and PLC engineering VMs; field teams use it for TIA Portal engineering over RDP and in-cabinet dedicated hosts. Commit per workload: pass the support-position, Layer 2 bridge, license and restore tests below before production, and size the host from measured demand.

    Remote access and virtualization

  • Troubleshooting

    Fixing a VM remote PLC connection with a NAT adapter

    Set the guest's virtual adapter to NAT with DHCP, disable every other guest adapter, and keep the remote-access soft key on the host. The failure that repeats is a second bridged adapter pulling the PLC route away from the NAT path. Test the host path first, then the guest, and check that no local subnet matches the plant network.

    Remote access and virtualization

  • Troubleshooting

    Host blue screen during serial VM connection to a PLC

    A host blue screen during a VM serial session to a PLC is a Windows 10 host crash in the USB-serial and virtualization stack, not a PLC or guest fault. Capture the stop code and version stack, check whether Workstation 14 is documented for your Windows 10 build (Broadcom lists Windows 10 1903 hosts from Workstation 15.x upward), then upgrade Workstation, refresh VMware Tools, and retest before touching adapter or PLC settings.

    Remote access and virtualization