In this post we will discuss about the different type of scsi controllers that are available with VMware vSphere and when to use which type of controller. We will discuss following topics in this post:
- What is SCSI controller and their types
- Why SCSI controller selection is so important
- Storage Controller Compatibility
- Adding/Changing SCSI controllers in virtual machines
- Changing controller type by modifying virtual machine vmx file
so lets get started.
What is SCSI controller and their types?
SCSI controllers are used by virtual machine to access SCSI disks and other SCSI devices such as CD/DVD ROM. SCSI controllers are added automatically when a VM is deployed. Controllers can be added/modified also post creation of VM.
When a VM is created, the default controller that is assigned to it is optimized for best performance and the controller selection depends purely on the guest OS chosen at the time of VM creation.
Type of SCSI controllers
With vSphere 6.0, we have 5 types of SCSI controllers for virtual machines:
- BusLogic Parallel
- LSI Logic Parallel
- LSI Logic SAS
- VMware Paravirtual SCSI
- AHCI SATA controllers
As we discussed earlier, the default controller chosen for VM, depends on the guest os selected during installation and in most of the cases it just works fine. Problem occurs when you are doing a massive deployments and you need to have some really big VM’s with many disks etc. At that time you may likely to hit the limitation which is there with these controller types.
Below table provides a high level overview of SCSI Controller comparison
Graphic Thanks to Guido Hagemann
Also below table summarizes which controller’s can be used with which version of Esxi.
Each virtual machine can have a maximum of four SCSI controllers. The default SCSI controller is numbered as 0. When you create a virtual machine, the default hard disk is assigned to the default SCSI controller 0 at bus node (0:0).
When you add SCSI controllers, they are numbered sequentially 1, 2, and 3. If you add a hard disk or SCSI device to a virtual machine after virtual machine creation, it is assigned to the first available virtual device node on the default SCSI Controller, for example (0:1).
If you are using more than one SCSI controllers, then as a best practice, the virtual disks should be distributed across those controllers to get performance out of the VM.
Why SCSI controller selection is so important ?
Selection of SCSI controller dictates how the performance of virtual machine. For e.g PVSCSI and LSI Logic Parallel/SAS offers almost same performance but for situation where a VM is generating pretty high number of IOPS, PVSCSI is more efficient in handling those IOPS.
With vSphere 5.5, new controller type ‘AHCI SATA’ was introduced which can be used with VM HW v10. This controller type is best suited for environment where there is a need for many additional disks and where performance is not a key factor.
Storage Controller Compatibility
Adding different types of storage controllers to virtual machines that use BIOS firmware can cause operating system boot problems. In the following cases, the virtual machine might fail to boot correctly and you might have to enter the BIOS setup and select the correct boot device:
- If the virtual machine boots from LSI Logic SAS or VMware Paravirtual SCSI, and you add a disk that uses BusLogic, LSI Logic, or AHCI SATA controllers.
- If the virtual machine boots from AHCI SATA, and you add BusLogic Parallel or LSI Logic controllers.
VM’s that are using EFI firmware are not affected by mix and match of controllers.
Below table summarizes the compatibility among SCSI controllers
Graphic Thanks to VMware.com
For more information about SCSI controller and performance comparison, please read this whitepaper from vmware. Also Guido Hagemann have explained this in detail here.
There is one very good discussion on this topic in VMTN
Adding/Changing SCSI controllers in virtual machines
To add a new SCSI controller in a virtual machine, login to Web Client and select a VM from the inventory and edit settings of the VM.
Click on New device and select SCSI Controller and click on Add button.
Click on ‘Change Type’ to select the type of controller you want to add from the drop down menu.
You can’t modify the type of existing scsi controller for a running VM. Options will be greyed out.
You need to Power-off the VM to change existing controller type
Changing controller type by modifying virtual machine vmx file
This method is usually not recomended as we can easily modify the controller type from Web Client. This is just for knowledge.
Verify the current controller type form vmx file by typing below command:
[root@optimus:/vmfs/volumes/588a3b26-807f53d4-b207-00505603e7b3/Rhel6-Test2] cat Rhel6-Test2.vmx | grep scsi0.virtualDev
scsi0.virtualDev = "lsilogic"
In my case I have only one controller so I searched for scsi0.virtualDev. In case you have more than one controller, searchthe vmx file for scsi keyword
Now suppose you want to change the controller type from LSI Logic parallel to Paravirtual, shutdown the virtual machine and modify the scsiX.virtualDev as below
scsi0.virtualDev = “pvscsi”
When you power-on the VM, virtual machine will pick this change in vmx file and will reflect the same in Web Client
SCSI Adapters vs. Paravirtual SCSI Adapters vs Direct Path I/O