Connect via ISCSI a VM - Help!

Francisco Aguero 1 Reputation point
2020-11-24T19:22:42.897+00:00

Hello everyone!
I have a Hyper-V server connected to a SAN via iSCSI and I want to assign a set of VMs hosted on that same Hyper-v server to the same SAN.

I do not know what is the technical name of what I want to do, therefore I do not know how to find information about it.

Could you pass me information on how to do it?

Some initial doubts:

Do I have to share ISCSI NICs with vswitch? or is it recommended a couple of specific NICs for vswitch?
If I assign a LUN to a VM, do I have to assign that LUN to the hyper-v server?

Thanks in advance for your answers!

PS: text translated into English!

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,796 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,735 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Xiaowei He 9,906 Reputation points
    2020-11-25T07:24:59.207+00:00

    Hi,

    Based on my understanding, you would like to store the Hyper V VMs on the iSCSI connected SAN storage. If I misunderstood, please feel free to let me know.

    Please follow the steps below to deploy it:

    1. On the SAN storage, we need to create virtual disks, and create ISCSI target, combine virutal disk to ISCSI target for the Hyper V host to connect. This part you need to turn to SAN storage vendor to consult how to create virtual disk and ISCSI target.
    2. After creating the ISCSI target and virtual disk, on the Hyper V host, please open ISCSI intiatior, then enter the ISCSI target and connect:
      42594-image.png
    3. After connecting to the ISCSI target, we may see the virtual disk in Disk management on the Hyper V host:
      42583-image.png
    4. Then, please online the disk and initialize the disk and create a volume on the disk:
      42579-image.png
    5. After we create a volume on the disk, when we create Hyper V VM, we can store the VM on the volume.

    Thanks for your time!
    Best Regards,
    Anne

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. francisco jose aguero martinez 1 Reputation point
    2020-11-25T15:10:38.617+00:00

    Hello, thanks for answering
    I think I did not explain correctly. I already have the server connected via iSCSI to the SAN, hosting the VMs on a LUN.

    What I want is to assign a different LUN to a specific VM. I want to share the ISCSI Nics to generate a link between the VMs and the SAN.

    Can I explain myself better?

    0 comments No comments

  3. Xiaowei He 9,906 Reputation points
    2020-11-27T06:43:06.463+00:00

    Hi,

    As I understand, you want the VM to connect to the ISCSI LUN directly, if I misunderstood, please feel free to correct me.

    If so, I think we have two methods to do it:

    1. We may connect the VM to the external virtual switch, and make the VM has network connection to the ISCSI target server. Then we may use the same method to create ISCSI target and virtual disk for the VM, and use ISCSI initiator in VM to connect the ISCSI target.
    2. We may use Pass-through disk to make the ISCSI target LUN which connects to the Hyper V host pass through to the VM. In this way, we need to make the ISCSI target LUN offline in disk manager in Hyper V host.

    https://thesolving.com/virtualization/how-to-configure-a-pass-through-disk-with-hyper-v/

    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)

    If we use method 2, we may get some issues when live migrate the VM to other hosts due to the pass-through disk, so if we need to migrate the VM, I would suggest method 1.

    Thanks for your time!
    Best Regards,
    Anne

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Alex Bykovskyi 2,166 Reputation points
    2020-11-29T17:28:59.183+00:00

    Hey,

    As mentioned, you can configure a separate external switch and configure a VM iSCSI initiator to connect to a specific LUN on your SAN.
    https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/create-a-virtual-switch-for-hyper-v-virtual-machines

    As an alternative use configure a VM to use a specific LUN. Might help you:
    https://social.technet.microsoft.com/Forums/en-US/de70de2a-b5a0-4712-9eec-c0aee8f756b3/hyperv-guest-iscsi?forum=winserverhyperv

    You can compare performance between two options and decide which suits you best. We have benchmarking best practices. Might be helpful:
    https://www.starwindsoftware.com/best-practices/starwind-virtual-san-starwind-benchmarking-best-practices/

    Cheers,

    Alex Bykovskyi

    StarWind Software

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.