Under Hyper-V we have two kinds of disk controller that you can add to a virtual machine – IDE disks and SCSI disks. A rough list of the differences between these controllers is as follows:
- Works on operating systems without integration services installed / available
- Can be used to boot a virtual machine
- Supports hot add / remove of virtual hard disks
The type of disk controller that you use in the virtual machine has nothing to do with the type of disk that you are using in your physical computer. SCSI VHDs can be stored on IDE disks, and IDE VHDs can be stored on SCSI disks.
Why can’t you boot Hyper-V virtual machines off of SCSI disks?
Well, calling our SCSI controller “SCSI” is somewhat of a misnomer.
When we were working on Virtual Server we heard, loud and clear, that servers had SCSI disks – so virtual servers needed to have virtual SCSI disks. To this end we invested in the emulation of an Adaptec SCSI controller for Virtual Server. Unfortunately, this SCSI controller is a very advanced piece of hardware – and as a result was actually slower to emulate than the more simplistic IDE controller that we were already emulating.
In the end we had to extend our emulated Adaptec controller and write custom drivers for our supported operating systems in order to get good performance for SCSI in a virtual machine.
With Hyper-V we dropped the emulation of an Adaptec controller altogether. Instead we implemented our traditional emulated IDE controller and a new completely virtual, VMBUS based, storage controller – with no traces of emulation present.
It is this virtual storage controller that you are adding to a virtual machine when you choose to add a SCSI controller to a virtual machine.
The problem is that the BIOS that is used by our virtual machine has no knowledge of VMBUS and is only able to boot to emulated devices. This is why you can boot to an IDE controller and a legacy network adapter – but not to a SCSI controller or network adapter.
Why you should not care about not being able to boot off of SCSI disks in Hyper-V.
When talking to users about needing to boot off of SCSI disks in a virtual machine – there were two reasons that came up.
The first one was that SCSI could support larger virtual hard disks than IDE could. To address this we made the IDE controller in Hyper-V use 48-bit LBA. This allows you to attach virtual hard disks that are up to 2TB in size to an IDE controller.
The second reason was performance. But that too is not an issue.
Let me start by grabbing an architectural diagram I have on file (you can tell that this is an old diagram because it uses our codename – Viridian – which means it was originally drawn before we had been given “Hyper-V” as our name). Now, the parent partition diagram is not 100% correct for Windows Server 2008 R2 – but the child partition diagram is accurate for both Windows Server 2008 and Windows Server 2008 R2, and that is where I want to focus.
The first thing to notice in the child partition side of things is the “Virtual Storage Minport (VSC)”. The is essentially the driver that gets loaded when you attach a SCSI controller to a virtual machine. It connects to VMBUS and allows us to perform Disk I/O without any emulation involved in a very high performance manner.
The next thing to notice is the “Fast Path Filter”. This is a filter driver that gets installed on all disk objects in the virtual machine – whether they are IDE or SCSI. It allows us to pass directly to the VMBUS based path for everything except low level disk operations (like partitioning a disk).
What this means is that once the integration services are installed the same code path is used for disk I/O whether you use an IDE disk or a SCSI disk. There are two limitations that remain for IDE disks:
- Disk commands to IDE disks on the same controller are serialized by the guest operating system (note that you can only have two IDE disks on a single controller)
- The IDE disk is limited to I/O block sizes of 512kb or less – while the SCSI controller can go up to block sizes of 8mb
However I have yet to see a test where either of these limitations resulted in a noticeable performance difference between IDE and SCSI.