Creating a VM for high I/O applications

I've been asked from time to time to show the process I use to build a VM that will be used for as a SQL, Exchange, or SCCM server. I recently had to build a new SQL server, so I decided to document the steps. Hope this is helpful for someone.

Steps in building a SQL Virtual Machine

There are two parts to building a well performing high I/O SQL Virtual Machine. This document will walk you through that process.  

Build the Virtual Machine.

1.  Right-click the cluster, host or folder where the VM will be built and select New Virtual Machine from the drop down menu.

2. When the New Virtual Machine Wizard window appears, from the Select a creation type choose Create a new virtual machine:

  1. Name the VM and select the folder where the virtual machine will be stored. Click Next.
  2. Select The cluster object . click next.

5. Select the datastore, click next.

  1. On the compatibility page select the latest level
  1. Select the OS. This will be a Windows Server 2016. Click next.

  1.  On the Customize hardware section fill in the following items:

           a.  Select the number of virtual CPU from the CPU drop down menu.

           b.  Define the amount of memory for the virtual machine by filling in the Memory text box and selecting the size allocation unit from the drop down menu.

           c.  Define the amount of storage for the virtual machine by filling in the New Hard disk text box and selecting the size allocation unit from the drop down menu.

           d.   Select the desired network from the New Network drop down menu and ensure the Connect… checkbox is selected.

           e.  Select the ISO file you will use to load the operating system in the New CD/DVD Drive drop down menu and ensure the Connect…checkbox is selected.

  1. Ready to complete. Verify all the settings are correct before selecting Finish.
  1. Power on the Virtual Machine.
  2. Install the Windows OS.
  3. After the build is complete. On the summary screen of the VM in the vsphere client there will be a Yellow warning letting you know that vmtools has not installed on the VM. click the link to Install VMtools. then select Mount to connect the ISO
  4. Log into the Windows server to install vmtools. Then reboot the VM

Configure the Virtual Machine for SQL

At this point we are ready to add the remaining drives for the SQL server. According to the configuration max documents for virtual machines. We can add up to 4 SCSI controllers. Each controller can up to 15 drives attached. So, each virtual machine can have up to 60 drives. Using this theory,we can take advantage of the number of SCSI controllers to split out the I/O of the SQL server. For the following steps, we will add an additional 3 high I/O drives(one for transaction logs, one for the database drive, and one for the temp db).  Each drive will have its own SCSI controller. For any SQL, Exchange, or any other high I/O server, VMware commends that we use the VMware paravirtual SCSI controller.

Install the VMware Paravirtual SCSI Controllers

  1. Right-click the VM you created in the previous step and select Edit Settings from the drop down menu.

    At the bottom of the Edit Settings windows, click the drop down menu and select SCSI Controller then click the Add button.

  1. Next to the SCSI controller you just added, click the arrow to the left to expand the options.
  1. In the Change Type drop down menu, select VMware Paravirtual from the options.
  1. Repeat steps 1-3 two more times until you have a total of 3 VMware Paravirtual SCSI adapters.
  1. In the Edit Settings window, select OK to complete this task.  

Be sure that VMtools is installed on the virtual machine as Windows will need to install the paravirtual adapter drivers for the virtual machine to take advantage of the new SCSI adapters.

Assign the Data Drives

  1. Right-click the VM you created in the previous step and select Edit Settings from the drop down menu.
  1. At the bottom of the Edit Settings windows, click the drop down menu and select New Hard Disk then click the Add button
  1. On the New Hard disk that was just added, click the arrow on the left side to expand all the settings and make the following changes:

           a.  Define the amount of storage filling in the text box and selecting the size allocation unit from the drop down menu.

           b.  From the Limit-IOPs drop down select Unlimited.

           c. From the Disk Mode drop down, select Independent Persistent.

           d. From the Virtual Device Node drop downs, select SCSI controller 1 this will automatically set the second drop down to SCSI(1:0).

                * This step is extremely important as you are telling the operating system which SCSI controller to assign the disk to and what the disks SCSI ID is                    going to be.

  1. Repeat step 3 to add the remaining drives to the virtual machine making sure to change the Virtual Device Node option to utilize all three of the VMware Paravirtual SCSI controllers.

    *If you are adding more than 3 extra drives continue to rotate them through the VMware Paravirtual SCSI controllers and insuring that the SCSI ID for each disk is increased each time. On the virtual machine, the VMware Paravirtual SCSI controllers will be identified as SCSI controllers 1, 2, and 3. SCSI Controller 0 is the standard LSI logic SCSI controller that Windows recommends for the OS to be installed on.

  2. Click OK when all the drives have been added
  1. Open the VMware console and log into the virtual machine.
  1. In the virtual machine, open Disk Management (you should notice the new drives that were added show up as offline).
  1. Right-click each disk and from the menu that appears, select Online.
  1. The Disks now show Not Initialized now.
  1. Right-click each disk and from the menu select Initialize Disk

MBR will work on for all three of these drives. If the drive was to be over 2TB then use the GPT format. Click OK to complete the initialization process.

  1. At this point all the new disks should be online. On the first drive right-click the unallocated space and select New Simple Volume from the menu.
  1. When the New Simple Volume wizard opens select Next
  1. On the volume size page, select Next.
  1. Assign the drive letter and select Next
  1. On the Format Partition page fill in the following values:

          a. File system: NTFS

          b. Allocation unit size: 64K

          c. Volume label: A descriptive label for the drive usually based on purpose

  1. Select Next.
  1. Verify the settings then select Finish.
  1. Repeat step 11 – 17 for the remaining drives that need to be formatted.

At this point the VM and Windows installation is ready for the application software.