This blog post is in continuation to my first blog in this series which you can read here. In the second and last part of this series I am going to describe the rest of the configuration at Nutanix layer and tie this all back together on the Windows VM again.
Configuration at the CVM/ACLI
Login to any CVM through SSH
Open the ACLI interface by typing acli at the command prompt
List the current Volume Groups , run vg.list command
Create a new Volume Group , run vg.create <vg_name> command
Create a new disk inside the Volume Group residing on a container , run vg.disk_create <vg_name> container=<container_name> create_size=<size_in_gb>
Attach/Map the iSCSI initiator noted in the previous step on the VM configuration to the Volume Group, run vg.attach_external <vg_name> <iscsi_initiator_name>
Confirm and validate all the settings, run vg.get <vg_name>
Back to Configuration at the Virtual Machine
Now lets go back to the Windows OS and perform the remaining steps of the mapping
Open the iSCSI initiator settings
- Go to discovery
- Select Discover Portal
On the Discover Target Portal
- Give the IP address of all the CVMs one by one , or you can just use the “Virtual IP” of the cluster and it will be taken care at the backend
- Specify port 3260 for iSCSI
- Click “OK”
On the iSCSI Initiator Properties
- Click on Discovery
- Verify all the CVM IP addresses
On the iSCSI Initiator Properties
- Click on Targets
- Verify that you are able to see the target
- Click “Connect”
On the Connect to target screen
- Specify the target name
- Select “Add this connection to the list of Favorite Targets”
- Select “Enable multi-path”
- Click on “Advanced” (Detail in next pages)
- Once the advance section gets completed click “OK”
On the Advanced Settings Screen
- Select the Local Adapter
- Select “Initiator IP” , Select the first network card IP on your VM
- Select “Target portal IP”
- Click “OK”
Go back to the iSCSI initiator properties screen
- Select Targets
- Verify that the session is now connected
Add one more session to be used for Multipathing
- Select sessions
- Click on “Add Session”
On the connect to target screen repeat the same process
- Specify the Target name
- Enable Multi-path
- Click on “Advanced”
- Click “OK”
On the Advanced Settings Screen
- Select the Local Adapter
- Select “Initiator IP” , Select the second network card IP on your VM
- Select “Target portal IP” , select a different CVM IP this time
- Click “OK”
On the properties section
- Click on Sessions
- Verify that you can see both the sessions and they are connected
- Click on Devices
On the devices section
- Click on the disk
- Configure the MPIO
- Click “OK” once the MPIO configuration is done
On the MPIO section of Device Details Menu
- Click on “MPIO”
- Select Load balance policy as “Round Robin”
- Repeat the same step for the other disk as well
- Verify the configuration
- Click “OK”
Open Computer Management
- Go to Disk Management
- Verify that you can see the new disk
- The disk will be offline initially and that needs to be changed
Open command prompt and run “diskpart”
Run “san” in the diskpart utility and observe the SAN policy as Offline Shared
Run “san policy=onlineAll” in the diskpart utility , to change the disk status to online
Run “list disk ” in the diskpart utility , to verify the status , at this moment it is still offline
Run “select disk 1” in the diskpart utility , to select the newly added disk
Run “attributes disk” in the diskpart utility , to see the disk attributesRun “attributes disk clear readonly” in the diskpart utility , to clear the readonly attribute
Run “attributes disk” in the diskpart utility , to see the disk attributes now it has changed to “NO”
Run “online disk ” in the diskpart utility , to make the disk online
Open Computer Management
- Go to Disk Management
- Verify that you can see the new disk is showing as online now
Create a new Simple Volume on that disk
On the Simple Volume wizard Click Next
Specify the volume size and click “Next”
Assign Drive letter and Click “Next”
Choose the file system , Volume Label and perform a quick format , Click “Next” and Click “Finish”
Verify that you can see your newly create volume under “My Computer
This is it you have successfully configured iSCSI Volumes from AHV with MPIO on Windows. This concludes the two parts series , thank you for reading.
Great post ! …
Question :
You added 2 of your 4 available CVMs as session holders.
What is the best practice ?
Just add 2 ? Or… you need to add all 4 ?
Thanks !
Thanks !!
2 is a good starting point and should cover you for failure scenarios. You can add more CVMs if you have multiple disks backed by Volumes API for proper load distribution.
Very visual and easy to follow information. I found this entry incredibly helpful with testing this particular feature.
I hope functionality is added for resizing volume groups officially at some point in the future (if it isn’t already).
Thanks.
Cheers,
Tim Longbottom