Switching Disk Controllers on an ESX VM

There may be times where you find it necessary to switch the system disk controller on an existing Windows VM to a different type, in order to try to get additional performance. This can be done fairly easily, but requires some downtime on the VM.

Switching from LSI Logic SAS to VMware Paravirtual

With the machine running, edit the settings of the VM and add a new SCSI Controller
Set the type to ‘VMware Paravirtual’


Confirm the change
Confirm that Windows installs the ‘VMware PVSCSI Controller’ driver in the Device Manager

Shut down the VM

Edit the VM settings
Change the type of SCSI Controller 0 to VMware Paravirtual
Remove SCSI Controller 1 which was just added


Confirm these changes

Power on the VM

The controller has now been switched to Paravirtual

Switching from VMware Paravirtual to NVMe Controller

With the machine running, add a new NVMe Controller – this just appears as ‘New NVMe Controller’ in the VM Settings page
Confirm the change
Confirm that Windows installs the ‘Standard NVM Express Controller’ driver in the Device Manager

Shut down the VM

Edit the VM settings
Expand the ‘Hard disk 1’ section and change the Virtual Device Node to the ‘NVME controller’


Confirm this change
If you have no other disks using the SCSI Controller, this can be removed


Confirm this change
(Note: It is not possible to switch the disk to the NVMe controller, and remove the SCSI controller at the same time. You must switch the disk, confirm this and then remove the controller in a second edit of the VM.)

Power on the VM

The controller is now switched to NVMe

Troubleshooting

If the VM fails to boot with a “STOP: Inaccessible Boot Device” error, try the following:
Allow the VM to continue rebooting itself after the STOP error. At the third boot attempt, it should launch Startup Repair automatically.
Choose the option to Repair the computer, and launch a Command Prompt.
Enter the following to enable safe mode on the next boot: bcdedit /set {default} safeboot minimal
Reboot the VM. It should start successfully in safe mode.
After logging in, launch an Administrative Command Prompt.
Remove the safe mode boot with: bcdedit /deletevalue safeboot
Reboot the VM. It should now start normally.

A note about disks connected to NVMe controllers

Source: https://kb.vmware.com/s/article/2147574
Guest OS does not detect hot add, remove, or extend disk changes to the NVMe Controller (2147574)

Due to the NVMe 1.0 spec, the guest OS does not recognise dynamic (or online) changes such as increasing the capacity of an attached hard disk. For example, if you have a 50GB disk attached to an NVMe controller and it’s running out of disk space, you can increase the size to 60GB in VMware while the VM is running, but the guest OS will not see the extra space.
In order to extend the existing partition into the free space, it is recommended to reboot the VM. Unloading and reloading the driver may work, but this could require a reboot anyway.