Hyper-V & iSCSI – in the parent or in the virtual machine?



Here is a good question:

If you are using iSCSI for all of your storage needs; should you use a software iSCSI initiator inside the virtual machine to connect the iSCSI storage directly to the virtual machine, or should you connect the iSCSI storage to the management operating system (in the parent partition) and then store virtual hard disks / use pass through disks?

The answer is (as usual) not that simple.  Generally speaking – you should always connect the iSCSI storage to the management operating system.  The reason for this is that virtual machines can only connect to iSCSI devices with a software iSCSI initiator, where as the management operating system will be able to use hardware host-bus adapters (HBAs).

That said, there is a time when you will want to use a software iSCSI initiator inside the virtual machine and connect the storage directly to the virtual machine.  You will want to do this if you are trying to cluster the guest operating system inside the virtual machine (as opposed to clustering Hyper-V itself).  In this scenario; having iSCSI storage connected directly to the guest operating system is the only option that works.

Some common questions that I have heard around these recommendations include:

 

  • What if I am just using a software iSCSI initiator inside the management operating system?  Does it really make any difference then?

    Yes, it still matters.  At very least a software iSCSI initiator in the management operating system will be able to take full advantage of all of the network offload / acceleration technologies supported by your physical network adapter.  If you run the software iSCSI initiator in the guest operating system, you will only be able to access the subset of network offload functionality that is exposed on our virtual network adapters.

    Furthermore, in the management operating system it is easier to utilize dedicated storage network adapters and network teaming in order to increase your performance.

  • If I connect the iSCSI storage to the management operating system, should I then pass-through the physical disks to the virtual machines – or should I use virtual hard disks (VHDs) stored on the iSCSI device?

    I have discussed this issue in the past – and I strongly believe that everyone should default to using fixed size virtual hard disks over using physical disks directly connected to virtual machines.  The only exception that I would make with iSCSI storage is if you have some external process (e.g. backup software) that will be manipulating the iSCSI storage directly and is not aware of virtual hard disks.

  • How bad is it to use iSCSI connected a software iSCSI initiator inside the virtual machine?

    Not that bad really.  Chances are that if you are running on gigabit networking you will not really notice much of a performance difference between a software iSCSI initiator in the virtual machine and one in the management operating system.  That said, a software iSCSI initiator in the virtual machine will use a lot more CPU power to achieve the same results as a hardware (or software) iSCSI initiator in the management operating system.  This will eventually cause performance problems if / when your physical computer comes under high load.

Cheers,
Ben