VMware Cloud Community
mk_ultra
Contributor
Contributor

How to simulate a Windows logon to install VMware Paravirtual SCSI controller drivers

Hello,

I am working on a script to automate this process in order to change SCSI controller 0 to Paravirtual:

https://kb.vmware.com/s/article/1002149

I nearly have a full working script, but the only part I'm struggling with is simulating a Windows logon event in order to install the Paravirtual SCSI controller drivers.

Currently what I am trying is using a New-PSSession to invoke commands in the guest OS that might rescan for device drivers. So far I have tried invoking the following commands:

Get-PnPDevice
pnputil.exe /scan-devices
pnputil.exe /enum-drivers
$Disks = (Get-Disk).number
Update-Disk $Disks
rundll32.exe advpack.dll,LaunchINFSectionEx "C:\Program Files\Common Files\VMware\Drivers\pvscsi\Win8\pvscsi.inf",,"C:\Program Files\Common Files\VMware\Drivers\pvscsi\Win8\pvscsi.cat",4,N
 
None of these seem to get the drivers installed. Any ideas?
 
Thanks!
0 Kudos
3 Replies
LucD
Leadership
Leadership

I assume the boot disk is on SCSI Controller 0?
Afaik, Windows does not support the boot disk on a Paravirtual SCSI Controller.

If you add a data disk to the PV Controller, the Windows Guest OS should after a reboot install the driver.
Provided the driver is available through the VM ware Tools


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
mk_ultra
Contributor
Contributor

Yes, the boot disk is on 0. I got one VM to boot successfully running Paravirtual on SCSI 0 by using the linked KB article. Is it best practice not to use Paravirtual for Windows boot disks? Everywhere I'm reading says Paravirtual is essentially the new gold standard for VM SCSI controllers.

0 Kudos
LucD
Leadership
Leadership

No, you can use it for the boot disk, but make sure to check the compatibility guide.
It will not work for older ESXi or older Windows versions.
Also never uninstall the VMware Tools or the VM will not boot anymore.

Btw, there is a more recent KB1010398

I
f the VMware Tools are installed, a simple power off/power on of the VM should suffice.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos