Pages

Wednesday, August 1, 2018

No Virtual Disk in WinPE or WinRE on VMware Virtual Machine


No Virtual Disk in WinPE or WinRE on VMware Virtual Machine.

Being System administrators, sometimes we are in a situation to repair or boot a Windows machine into WinRE (Windows Recovery Environment) or WInPE (Windows PreExecution Environment) to troubleshoot.

I was working with a Server which was hosted on VMware in a firewalled environment with no domain access and unfortunately the Server/Application owner had forgotten the password of local account (Administrator) and reached out to me seeking if there is a way to recover the lost password or regain access to the server by any means.

Well.. there are so many trusted and untrusted ways available to help you regain access to the system but I rely on a way which does not require any third party tool or ISOs to do it and I have documented it in one of my previous posts (https://adminthing.blogspot.com/2016/12/windows-password-recovery.html)

I had previously created a stripped down ISO of Windows Server 2008 of ~300 megs using WAIK (Windows Automated Installation Kit) just to boot such windows machines in WIN PE instead of using a ~4 Gigs ISO of any other Windows OS. After booting the server from that Windows ISO, there were no disks being shown on it though there were two disks on the server and when booted normally it was booting up just fine to the OS (Windows Server 2012 R2) but we had no logon access to it. Lets go through it step by step here:

⦁    I booted the VM with the Stripped down ISO of Windows Server 2008.

 VM Booted with an ISO containing stripped down version of Windows Server 2008.

VM showing no disks attached to it.

⦁    I tried booting the machine with a complete Windows OS ISO too to see if that is able to detect the disks but with no luck.

⦁    I was sure that it is definately a driver issue and because of missing drivers of the Disk and SCSI controllers the VM in WINPE was unable to detect any hard disk to it.

⦁    Now I copied the drivers folder from a Windows machine where VMwareTools was installed from ("C:\Program Files\Common Files\Vmware\Drivers") and added it to the ISO image that I was using to make sure those drivers are available to me in the WinPE session. (this Drivers folder contains all the drivers that VMwareTools provides to the OS so we can use any other driver like network adapter vmxnet3 as well if needed). If you want you can download the ISO with added drivers in it from here.

⦁    After adding the Drivers folder from C:\Program Files\Common Files\Vmware\Drivers to the ISO, I rebooted the server again from updated ISO image.

⦁    Now the drivers have just been made available to me in the WinPE session but they are not yet loaded so the disks will still not be shown unless they are loaded.

 There is a folder named DRIVERS inside the CD-ROM.

⦁    Microsoft provides a small utlity called "drvload.exe" in the WinPE images which enables you to load drivers for any devices that you want which are attached to the Server.

It shows different drivers available inside the folder which contains all the drivers VMtools provides

⦁    We will now load the drivers found in PVSCSI folder found under C:\Program Files\Common Files\Vmware\Drivers which is for the SCSI controller attached to the VM on which the Hard drives are connected.

We loaded the driver (.inf) file called PVSCSI.INF using drvload

⦁    Now we will have to do a rescan of attached hard disks on the server to be able to see it, We will use Diskpart to rescan for the Hard Drives now.

Launch diskpart and rescan for hard disks

⦁    Now we can see that there are disks available so we can proceed with further troubleshooting which requires disks to be available on the server. I had to do a password reset for my existing local ID so I followed my article https://adminthing.blogspot.com/2016/12/windows-password-recovery.html to reset and I was done.

Happy Troubleshooting :)

Please let me know your comments or feedbacks to this article if you have any :)






No comments:

Post a Comment