After converting a physical machine to a virtual machine, it is considered a best practice to remove unneeded applications, software, services, and device drivers which were tied to the physical machine but no longer applicable to the present day virtual machine. Performing this task from time to time manually isn’t too bad but at large scale, a manual process becomes inefficient. There are tools available which will automate the process of removing unneeded device drivers (sometimes referred to as ghost hardware). A former colleage put together a scripted solution for Windows VMs which I’m sharing here.
Copy the .zip file to the virtual machine local hard drive, extract it, and follow the instructions in the readme.txt file. I have not thoroughly tested the tool. No warranties – use at your own risk. I would suggest using it on a test machine first to become comfortable with the process before using it on production machines or using on a large scale basis.
Download: remnonpresent.zip (719KB)
Jason
A very big thank you for sharing this.
Andy
Thanks for sharing – was looking at the logic:
REM Remove non-present devices
devcon find * > .\find.txt
devcon findall * > .\findall.txt
comm -3 .\find.txt .\findall.txt > .\nonpresent.txt
– how safe is this?
I see it generated 328 items to be removed from my test VM including vmware convertor – is this for an old version?
ROOT\LEGACY_VMWARE-CONVERTER000 : VMware Converter Enterprise Service
ROOT\LEGACY_VMWARE-CONVERTER-AGENT000 : VMware vCenter Converter Standalone Agent
ROOT\LEGACY_VMWARE-CONVERTER-SERVER000 : VMware vCenter Converter Standalone Server
ROOT\LEGACY_VMWARE-CONVERTER-WORKER000 : VMware vCenter Converter Standalone Worker
ROOT\LEGACY_VMWARE-DR000 : VMware Site Recovery Manager Service
thanks
I’m sorry, I cannot provide any warranties & I would recommend that you test on some scrap inventory to gain a level of comfort before unleashing on production workloads. I can say this has been used on Windows 2003 Servers in the past with success albeit it was a few years ago.
thanks for Sharing this. I’ve been wanting to script this portion of the p2v for a long time. Now I don’t have to.
Hi,
This should work in a x64 machine?? I’ve tried it in few x64 machines with no luck… 🙁
Hi,
For x64 systems devcon has an specific version, that could be obtained downloading Windows Driver KITS
https://msdn.microsoft.com/en-US/windows/hardware/gg454513