Thursday, October 19, 2017

Migrating Existing Virtual Machines to NVMe in VMWare Workstation 14

Today, I downloaded a trial version of VMWare Workstation 14. The release notes mention a new "NVMe" hard disk controller. Having had hard disk performance issues in the past, I was excited to try it out. I decided to port one of my development virtual machines to the new controller. I was able to do so successfully. To do this, follow the instructions below:

To begin, "upgrade" the virtual machine hardware version from the Settings tab:



In the wizard, select Workstation 14.x:


Once the virtual machine has been upgraded, ensure the new drivers are loaded into Windows. To do this, add a second hard disk, that uses the NVMe controller. You can delete the hard disk when the upgrade is complete. But, add it for now. Start by clicking, Edit virtual machine settings:

From there, click the Add button:


Choose Hard Disk:


Choose NVMe:


Choose Create a new virtual disk:


If you want the disk to be a single file, be sure to select Store virtual disk as a single file:


Finally, give the disk a name and click the Finish button:



Click the OK button in the Virtual Machine Settings page to save your changes. Turn on the virtual machine. Once it has turned on, log into Windows. In VMWare Workstation, select VM->Upgrade VMWare Tools. A virtual CD will be inserted into the CD-ROM drive. Run the setup.exe program to install the new drivers. Allow the virtual machine to reboot.

Once the virtual machine has rebooted, the new NVMe drivers will have been loaded. At this point, shut down Windows. Then, close the virtual machine in VMWare Workstation. The next step is to hand edit the .vmx file for the virtual machine. Make a backup of the file. Then, open it in a text editor, such as Notepad++.

In the text editor, search for scsi0. Remove all lines for the scsi0 controller. Take note of the name of the hard disk file, you will need it later. It will end with the .vmdk extension. In the screenshot below, mine is BRN-CLIENT02.vmdk:


 Now, scroll to the bottom of the file. You will find the new NVMe hard disk:


Change any occurrences of nvme0:0 to nvme0:1 to make that drive the second hard disk on the NVMe controller. Then, insert your original hard disk on nvme0:0:


Save the file. Open the virtual machine in VMWare Workstation. Boot it up. You are now using the NVMe controller for your hard disk!

NOTE: If you are using shared virtual machines, the VMWare Workstation Server service caches the .vmx file once you load it. Be sure to also stop that service prior to editing the .vmx file. Stopping the service will not shut down any running virtual machines. Start it back up once the file has been modified.




No comments:

Post a Comment