Clean up Virtual Machine after Physical to Virtual migration – P2V

Posted by on April 30, 2010 in Performance, VMware | 2 comments

By now I’m sure that you know how to do a P2V or Physical to Virtual migration. There are several quality tools available including VMware Converter available as a Free download. But after you have converted your physical machine there will be some further clean up to do on your new virtual machine. This clean up is necessary to make sure you will have a stable and error free VM.

What exactly do you need to clean up? Well since a migration to virtual is a exact copy of the physical machine there will be left over applications, device drivers and non present devices left over. These all can affect the performance and stability of your virtual machine.

The first step you can perform is to remove and vendor specific applications or device drivers installed. You can remove these as you would any installed applications. These could be video drivers, nic teaming applications or management agents. They should all be removed as they will no longer work in your virtual machine and are likely to cause issues.

The next step is to remove any old devices that are no longer present and are not showing up in Device Manager. To do this you will have to enable the ability to see non present devices. I have list two methods below to enable this ability on Windows servers. These commands must be run from your newly created virtual machine.

Method 1:
Open a command prompt
Set devmgr_show_nonpresent+devices=1
Then open up Device Manager
Click View and then click Show Hidden Devices
Expand each section and look for devices that are dimmed
You can then right click them and choose Uninstall to remove

Method 2:
Right click on My Computer icon and select Properties
Click the Advanced tab
Click the Environment Variables button
In the lower part of the window just below the System variables box click on the New button
Variable Name = devmgr_show_nonpresent_devices
Variable Value = 1
then click OK to create the new variable
Click on OK buttons on remaining windows to close out of them
Now you will be able to start removing old devices
Then open up Device Manager
Click View and then click Show Hidden Devices
Expand each section and look for devices that are dimmed
You can then right click them and choose Uninstall to remove

Hope this gives you a start on your clean up process for freshly converted virtual machines. There are sure to be some other tasks that might be worth doing also, take these and create a process that works for your environment.

About Brian Suhr

Brian is a VCDX5-DCV and a Sr. Tech Marketing Engineer at Nutanix and owner of this website. He is active in the VMware community and helps lead the Chicago VMUG group. Specializing in VDI and Cloud project designs. Awarded VMware vExpert status 6 years for 2016 - 2011. VCP3, VCP5, VCP5-Iaas, VCP-Cloud, VCAP-DTD, VCAP5-DCD, VCAP5-DCA, VCA-DT, VCP5-DT, Cisco UCS Design

2 Comments

  1. To do this you will have to enable the ability to see non present devices.

  2. Excellent post! – this helped me with the command for my recent cleanup. Was going to write something on my blog about this but you beat me to it. 😛

    my blog: http://www.G15IT.com

Leave a Reply

%d bloggers like this: