How to disable windows Eject Network Connection and Eject Balloon Driver?

synman44

New Member
Jun 2, 2025
1
0
1
On windows machines, the Safely Remove Media and Eject Media gives a self destruct option in the way of ejecting the main network adapter. It also offers to eject the Balloon driver and other iSCSI disk controllers. I would like to disable it from offering these options. For reference, I have had several incidents previously for VMware VMs going offline because of remote desktop admin users accidently ejecting the adapter.

I'm in the early progress of migrating away from VMware and I've noticed this problem pop up on Proxmox windows VMs. In VMware there was an advanced setting you could put on each VM which would disable this, however I'm not finding a similar setting on Proxmox. I tried unchecking Hotplugging for Network and rebooting, but still no such luck.

Secondarily, I tested Win Server 2019 by ejecting the network adapter, and now I can't get the Nic to come back, even after reboot. Edit* I turned it off, added a new 2nd Nic adapter, booted, and that showed up this time. However eject is still an option.

Any ideas?
 

Attachments

  • ProxmoxEjectSanity.png
    ProxmoxEjectSanity.png
    5.8 KB · Views: 5
Last edited:
It is a very tedious issue of qemu win guest drivers.
AFAIK the only option is to add a batch script (eg. Disable Virtual HW HotPlug.cmd) as a Computer Startup Script in Windows (via local policy, gpedit.msc).
The script will set the devices as non-hot-plug at every boot.

Content will be like below, but registry paths are VARIABLE!
You need to find out and copy paths from YOUR VM registry.

Or better, write a PS script that dynamically identifies the correct virtio drivers location in registry - and send it to me :D

[Disable Virtual HW HotPlug.cmd]
:: Disable eject controller - original Capabilities value=6
:: FIND YOUR OWN REGISTRY PATH!
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_1AF4&DEV_1004&SUBSYS_00081AF4&REV_00\5&226b9205&0&2808F0" /v Capabilities /t REG_DWORD /d 2 /f

:: Disable eject nic - original Capabilities value=6
:: FIND YOUR OWN REGISTRY PATH!
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_1AF4&DEV_1000&SUBSYS_00011AF4&REV_00\5&226b9205&0&9008F0" /v Capabilities /t REG_DWORD /d 2 /f

:: Disable eject serial - original Capabilities value=6
:: FIND YOUR OWN REGISTRY PATH!
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_1AF4&DEV_1003&SUBSYS_00031AF4&REV_00\5&226b9205&0&4008F0" /v Capabilities /t REG_DWORD /d 2 /f