VMware Cloud Community
n2246
Contributor
Contributor

How does a guest Windows VM to connect to a VLAN?

Hello,

How do I get a guest Windows vm to connect to a VLAN?

I am trying to connect to an ISCSI volume (SAN) through the guest VM. 

The second NIC needs to be tag to the VLAN ID.


Thanks in advance for any help or suggestion.

0 Kudos
3 Replies
mars0077
Enthusiast
Enthusiast

Not sure why you would want to do it this way but if you are trying to access iSCSI based storage from within the guest OS, then you will need to configure the iSCSI initiator from within Windows and connect to the iSCSI target, using the correct VLAN.

The iSCSI VLAN would need to be accessible to the ESX and VM environment. This would be by the means of physical links that are connected to iSCSI network. You would also need a dedicated portgroup that is tagged or not (depeds on VLAN setup) in a existing vSwitch.

0 Kudos
n2246
Contributor
Contributor

Mars0077, Thank you for reply.

The reason I am accessing iSCSI storage from within the guest OS is because I need to mount a cloned snapshot volume to recover data.

The part I am not familiar with is how to get a portgroup tagged to my vSwitch. I have the standard VM Network vSwitch 0.  Do I need to add another NIC?


Thanks,


0 Kudos
mars0077
Enthusiast
Enthusiast

"The reason I am accessing iSCSI storage from within the guest OS is because I need to mount a cloned snapshot volume to recover data."

Are not able to mount this snap directly to the ESX host and then browse the newly mounted VMFS and retrieve what it is your looking for? I have a similar process and that's what I do when I need to restore a VM or perform a file level restore. Once the restore is done, we just unmount the snap and rescan all storage adapters.

"The part I am not familiar with is how to get a portgroup tagged to my vSwitch. I have the standard VM Network vSwitch 0.  Do I need to add another NIC?"

How are VLANS being advertised to the ESX host from the switch? Trunk or access mode? If it is trunked, then you need to find out what VLAN ID is dedicated for iSCSI. If it is access, then you would NOT specify a VLAN ID on the portgroup dedicated for iSCSI.


On the ESX side, I'm assuming you are using virtual switch tagging so therefore as long as you know what the VLAN ID is you would then used the same VLAN ID/Number for the portgroup dedicated to iSCSI.

Can you share what your topology looks like and include all NICs and switches?

Here's the official doc on this.


Sample configuration of virtual switch VLAN tagging (VST Mode) (1004074) | VMware KB



0 Kudos