P2V

Remove Hidden Devices From Servers

One of the things I do after a successful P2V of a server is do some cleanup on the newly virtualized server. Cleaning up involves uninstalling any software , such as Broadcom  and Dell Open Manage software, that is no longer needed for the server. I also perform clean up of the any old or removed devices through the servers Device Manager that may still be lingering around. Removing these hidden or ghost devices can prevent or  fix any issues you may have with the vm.

To remove the hidden devices you will need to go to Device Manager and tell it to Show Hidden Devices, the devices will be displayed in a lighter shade than the installed devices. However, after performing many P2Vs , I found out that Device Manager doesn’t display all the devices that server may have had at one point.

Fig1.Hidden

Fig1.Hidden

 

 

 

 

 

 

 

Fig2.Hidden

Fig2.Hidden

 

 

 

 

 

 

 

 

 

 

 

One would think by selecting this view everything would magically appear based on the fact that we just told Device Manager to “show hidden devices”. Since we are dealing with Windows and something that would be logical isn’t, we can the modify the registry  to see these “hidden” devices . Once the registry value has been added ,reboot the server then you will be able to see all those hidden devices that were never uninstalled and you can properly uninstall them.

Add the following Registry Settings

Registry Settings
System Key: [HKEY_LOCAL_MACHINE\SYSTE\CurrentControlSet\Control\Session Manager\Environment]
Value Name: DEVMGR_SHOW_NONPRESENT_DEVICES
Data Type: REG_SZ (String Value)
Value Data: (1 = show all hidden devices)

Fig3. Hidden

Fig3. Hidden

 

After Rebooting the server go back into Device Manager < Select Show Hidden Devices again and you will now see the hidden devices shaded lighter.

Fig4. Hidden

Fig4. Hidden

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To remove a device , right click on the device and select uninstall.

Fig5. Hidden

Fig5. Hidden

 

 

 

 

 

 

You may be prompted to confirm that you want to remove the device , select OK and the device will be removed.

Fig6. Hidden

Fig6. Hidden

 

 

 

 

 

 

 

You can remove hidden devices  on VMs or even physical servers  that has been running for a while as part of overall server maintenance plan to keep your servers running in tip top shape.

Advertisement

P2V’d VM fails to boot with incorrect disk controller

VMware converter tool is a really nice tool to convert physical server to virtual machines. It’s free and fairly simple to use. The majority of time that I have used it I have not had any issues but a recent issue where a P2V’d vm failed to boot inspired me to write this blog posting.

Back in 2010 when I was first implementing virtualization at my company, I ran into an issue with a P2V of aW2K8 server that wouldn’t boot up after completion. The VM would go into a continuous loop of blue screens and reboots. This was very annoying and made it difficult to determine the source of the problem.

The blue screen error gave the generic error that hardware on the server changed. DUH…I just P2V’d you from a Dell M610 blade so of course your hardware has changed, you silly server. The fun part was finding out what the server didn’t like about this change to cause it to blue screen.

The blue screen error code indicated something with the disk had been changed. With that lead I started looking at all of the VM settings, in particular the disk settings.  I noticed that the SCSI controller was set to Paravirtualized SCSI which was different from all of the other VMs I had P2V’d that day.  Their controllers were set as LSI Logic controllers.

I figured something must have become confused during the conversion of this blade, so I changed the SCSI controller on the VM to LSI Logic SAS within the vSphere client. The settings change worked, and the VM powered up normally.

Fast forward to August 2013 when I encountered a similar problem. This time I was converting a Dell 1855 blade running Windows Server 2003 R2 which also suffered from the infamous blue screen reboot loop. Having seen this issue before, I checked the SCSI controller setting and found that it had been converted as an IDE controller. Server operating systems are not compatible with IDE controllers so this VM was not going to boot unless I changed the adapter controller. When I attempted to change the disk type using the vSphere client, however, the option was not available.

ide1

A quick search on the internet led me to VMware KB article 1016192 (Converting a virtual IDE disk to a virtual SCSI disk).According to the article, if no controller is selected during the conversion process, the VM is created with an IDE controller for the VM’s system drive.

To fix the issue you have two options:

1.      Re-run the conversion, making sure you select a controller type. Do not leave it set to the default of auto-select.

2.      Manually change the adapter type inside the vmdk file.

I was under a time constraint and did not have time to re-run the P2V, so I opted to manually change the controller type. Using the instructions from the article, I was able to successfully change the controller.

To manually change the disk controller type I used the following steps:

Login to the host where the VM resides. If SSH is not enabled, you will need to enable that option before you can connect.

  1. Once logged onto your server navigate to the datastore path of the VM.

# cd /vmfs/volumes/<datastore_name>/<vm_name>/     ide8

  1. Using the vi editor, open the vmdk file of the VM with the following command.

vi nameofserverfile.vmdk

  1. Find the line that says :ddb.adapterType = “ide”ide6
  2. Change the adapter type to LSI Logic,

(type r over a letter then the replacement character until all the characters have been replaced with)
ddb.adapterType = “lsilogic” ide7

  1. Press the ESC key, then :wq to save the file.
  2. From vSphere Client:
    1. Click Edit Settings on the VM.
    2. Select the IDE virtual disk and remove it from the VM but DO NOT delete the disk.  ide2
  1. After the disk has been removed, you will need to go back into settings and re-add the disk.
    1. Click Add > Hard Disk > Use Existing Virtual Disk. ide3
    2. Navigate to the location of the disk you just removed and select to add it to the VM.
    3. Choose the same controller type from step 4. The SCSI ID should read SCSI 0:0. ide4 ide5