Powered by System Center
Sharing an iSCSI network between the host and a guest
At one of our customers site we’ve deployed a Hyper-V cluster (HP Proliant BL460c G7 servers) with two HP (LeftHand) P4000 SAN systems (spread over two locations). We’re using iSCSI for SAN connections. Network adapters are configured through HP VirtualConnect. Each server has 8 NICs (4 from LOM1 and 4 from LOM2):
- 2 adapters in a team for the parent partition
- 2 adapters in a team for the CSV nework
- 2 adapters in a team for the virtual machine network
- 2 adapters for iSCSI connections (teamed through MPIO)
The iSCSI network is isolated trough a VLAN from the other networks.
The storage guy requested a virtual machine with direct connection in the iSCSI network. This virtual machine will service as a FailOver Manager (FOM) for the SAN system and therefore it need to be placed in the iSCSI network. Beside of this example I can imagine some other situations where you would give your VM direct access to the iSCSI network.
When you don’t using VirtualConnect this is no problem at all. In the most ideal situation you ad a NIC to your server. Connect the NIC to a switch port which has access to the iSCSI VLAN and create a virtual network in Hyper-V which is linked to this new NIC. If, for any reason, you can’t add a NIC to your server you can permit the iSCSI VLAN on your physical switch ports which is connected with the virtual machine network NIC(s) and configure the iSCSI VLAN on your virtual machine NIC properties.
However when you’re using VirtualConnect with only a LAN On Motherboard (LOM) you cannot permit the iSCSI VLAN on more than one interface per LOM. Because it’s already assigned to the iSCSI interface it is not possible to assign it also to the virtual machine network. Adding a NIC means adding a SFP, InterConnect and Mezzanine card. That’s a very expensive solutions for just one virtual machine.
Luckily we’ve another option available, so let’s look at that option:
The option is to share an iSCSI interface between the host OS and the virtual machine by creating a new external virtual switch. We can achieve this by following these steps (Be aware that when you have active iSCSI connections on your server you first need to disconnect this sessions!):
- Open the Hyper-V manager and go to the Virtual Network Manager;
- Select ‘New virtual network’ and select ‘External’ type;
- Select the iSCSI adapter under ‘External:’
- Select the option ‘Allow management operating system to share this network adapter;
- Select ‘OK’ or ‘Apply’
Because you’ve select the option ‘Allow management operating system to share this network adapter’ the physical adapter which you have just selected will be ‘cloned’ to a virtual adapter on the host OS. Configuration of the physical adapter is automatically transferred to this virtual adapter. Connection to your SAN can now be made through the virtual adapter. After the virtual adapter is created and the configuration is transferred to this adapter only the ‘Microsoft Virtual Switch protocol’ is enabled on the physical adapter.
Please give the new virtual switch (which is a physical adapter) a descriptive name. This This makes life easier for your next and last step: connect the virtual machine to your new virtual network. This can be done on the properties of your virtual machine –> hardware –> Network adapter –> Network.
Now your iSCSI network is shared between your host and a virtual machine on that host. By applying this option it is not needed to spend a lot of money for just one virtual machine!
| Print article | This entry was posted by Peter Noorderijk on July 18, 2011 at 18:34, and is filed under Hyper-v, Peter Noorderijk. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |









Twitter
RSS
about 1 year ago
That’s a good solution and one that we leverage extensively in labs. Another lab use case is to install Windows Storage Server 2008 R2 or now just the iSCSI target 3.3 (or any other free one to your liking) as a virtual machine so the entire iSCSI network is virtual. Not great for max performance but it does work.
about 1 year ago
Doesnt this have a performance impact on on the underlying iSCSI network that is used by the host? When sharing the adapter with the managment OS hyper-v creates a virtual adapter and then assigns this to the host. So what you are infact doing is sending all the hosts iSCSI traffic over a virtual adapter.
Paul
about 1 year ago
Hi Paul,
Sharing in this case does not mean that all iSCSI traffic will flow over this adapter. The regular iSCSI traffic for entering the volumes will flow through the dedicated iSCSI adapters. These adapters will not be shared with anything. The only thing we did was give the VM direct access to the iSCSI network.