I'm working in a manufacturing environment where we have aged computers controlling expensive production devices. Currently, we have an ancient HP desktop running Windows XP that connects to one of these devices via Ethernet. I've set up a VM in Hyper-V that replicates this HP desktop, but I'm unsure about how to replace the old physical machine with the VM, particularly regarding networking. The HP desktop uses a static IP address and is isolated from the company's main network. How can I ensure the VM uses the same settings as the HP? I've set the VM's IP to match, but is there a way to connect it directly to the host's network port rather than going through a virtual switch? I'm looking for any insights or experiences from other sysadmins who have worked in manufacturing. Thanks!
3 Answers
For Hyper-V, if you want a dedicated NIC for your VM, you should consider installing an additional NIC on the host. However, using the External switch can bridge your VM with the host's NIC resources effectively without needing an extra physical NIC.
It’s been a while since I used Hyper-V, but you can have the VM control the host’s NIC directly. It's usually a simple setting in the GUI, so you shouldn't need to dive into PowerShell for this.
It's best not to bind a physical NIC to your VM directly; while it can be done, it can cause issues like breaking features such as vMotion. Instead, consider setting the MAC address of the VM's virtual NIC to match that of the old HP desktop. The static IP address is controlled by Windows, so as long as the MAC matches, you should be good. This way, you can still easily move your VMs around for maintenance without problems.

Thanks for the advice! I understand about avoiding the physical NIC binding. The MAC address idea is great; I’ll definitely try that!