question

FranciscoAguero-4278 avatar image
0 Votes"
FranciscoAguero-4278 asked AlexBykovskyi answered

Connect via ISCSI a VM - Help!

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-2019windows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered franciscojoseagueromartinez-8901 commented

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.



image.png (68.7 KiB)
image.png (48.1 KiB)
image.png (24.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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 Votes 0 ·
franciscojoseagueromartinez-8901 avatar image
0 Votes"
franciscojoseagueromartinez-8901 answered franciscojoseagueromartinez-8901 published

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered XiaoweiHe-MSFT edited

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlexBykovskyi avatar image
0 Votes"
AlexBykovskyi answered

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://docs.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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.