In this article, I’m going to show you How to Build vSphere Infrastructure on Windows Server 2008 R2 vStorage. In my previous posts, I explained that how to make domain controller, vCenter Server and Install vCenter Server. Once we’ve done those steps then it’s time to build virtual storage to store our data and VMs on the shared storage.
vStorage is a virtual storage that you can store your data inside in Virtual Environment. In fact, it’s shared storage among your ESXi hosts which is really good for high availability, fault tolerance, redundancy and vMotion. When you create vStorage and you share it with you All ESXi hosts. When one of the ESXi host shutdown or breakdown then all your VMs automatically transfer to your another ESXi host by the help of High Availability. If you don’t have HA feature on your vSphere Server, then the transfer process won’t work.
- Related: How to Build vSphere Infrastructure on Windows Server 2008 R2 ESXi -Part3
- Related: How to Build vSphere Infrastructure on Windows Server 2008 R2 -Part2
For the sake of this demonstration, I’ll use iSCSI target software to build up a shared storage so you can use lefthand, UberVSA or OpenFiler.
Let’s get started to create vStorage on our vCenter server. Follow the guide step by step to avoid any error or mistakes.
Note: Do not start your VMs yet especially ESXi hosts.
Build vSphere Infrastructure on Windows Server 2008 R2 vStorage
Before you start your VMs add a new Hard Disk (minimum 200GB) to your VC VM. Also, add 1 network Adapters on your VC machine.
Step #1. Go to your VC VM Setting and click on Add. Select the Hard Drive and click Next.
Step #2. Select SCSI > Create a new virtual disk > Store virtual disk as a single file > Finish.
Step #3. Now add a new network adapter to your VC virtual machine. Follow the same process as you added a new hard drive but this time select Network Adapter from Hardware Type. Your network Adapter should be VMnet3.
Initialize New Hard Drive
Initialization is a very easy process. When you add a new hard drive to your PC or VM then by default it doesn’t show up on your file explorer so you need to initialize it.
Assign IP Address
In step #3. You’ve added three network Adapter so you need to Rename vmnet3 to iSCSI and assign an IPV4 address. If you’re following my labs, then you should assign 10.0.1.3/24 IP address to the iSCSI network adapter.
Download & Install Microsoft iSCSI Software Target
Once everything is done up to this stage then it’s time to Download and install Microsoft iSCSI software target. Once you’ve downloaded the software, drag and drop it into your vCenter VM.
Step #1. Extract it and navigate to X64/iscsitarget_public.msi. Double click on iscsitarget_public and install the software. Set everything to default and just click Next and Next.
Step #2. Open the Microsoft iSCSI Software target console.
Right-click on Microsoft iSCSI software target and select Properties. Enable only IP 10.0.1.3 to listen for iSCSI sessions. This ensures we only use the dedicated iSCSI network (VMnet3).
Step #3. Right click on Devices and select Create Virtual Disk.
Step #4. If you remember we’ve added a new hard drive to our VC VM and initialized with letter E: so now you’ve to point your data storage to that drive. Simply type E:\iSCSI\DataStore1.vhd and it’ll create a storage by the name of DataStore1.
Step #5. Your hard drive should have around 200GB so you need to split it in half. Just type 95000 (95 GB) and click next.
Create a second virtual disk and name it Datastore2.vhd. Repeat step #4 and #5 and create another data store.
Connect ESXi Host to vStorage
Step #1. If you’ve already started your ESXi hosts then you need to shut down all and Add 2 Network Adapters to each. Put your network adapters on VMnet3 to communicate with your iSCSI storage.
Step #2. Power on the ESXi1 and ESXi2 hosts. Open your vSphere Client and select ESXi1. Go to Configuration> Networking and click Add Networking to add a new switch. Select VMKernel as the type and click Next.
Step #3. Under “Create a vSphere standard switch” select vmnic2 & vmnic3 and click Next.
Step #4. Name it iSCSI_1 and click Next.
Step #5. Use the IP 10.0.1.10 with the subnet mask of 255.255.255.0. Click Next and Finish.
Step #6. Open the Properties of Swtich1 and select Add. Select VMkernel and click Next.
Step #7. Now we’re creating another VMkernel to our switch1 and this time name it iSCSI_2.
Step #8. Use the IP 10.0.1.11 with the subnet mask of 255.255.255.0.
Step #9. Change the NIC Teaming Failover order of both iSCSI_1 & iSCSI_2. Set vmnic2 active for iSCSI_1 where vmnic3 becomes unused. Change it the other way around for iSCSI_2.
Step #10. On your ESXi1 host under Configuration tab > Storage Adapters add a new storage Adapter.
Tip: if you are using ESXi4 then the iSCSI adapter is already added and you need to enable it under Properties.
Step #11. Go to the newly added iSCSI HBA (vmbha33) and click Properties. Copy the iSCSI Name (you can change this name to something more readable if you want).
Step #12. Get back to the Microsoft iSCSI Software Target console. Right click on iSCSI Target and select Create iSCSI Target.
Step #13. Name it ESXi1.wikigain.com (you can select your domain) and click Next. Now Paste IQN Identifier that you copied in step #11.
Step #14. Now that the Target is created, let’s assign our two LUNs to it. Right-Click it and select Add Existing Virtual Disk to iSCSI Target. Select both Virtual Disks and click OK.
Step #15. Now let’s go back to our vCenter and select iSCSI HBA (vmhba33) and click Properties. Under Network Configuration tab click Add.
Step #16. Add both iSCSI_1 and iSCSI_2 to the HBA.
Step #17. Once you’ve added iSCSI_1 and iSCSI_2 then go to Dynamic Discovery tab and click Add. Now add 10.0.1.3 as a new iSCSI Target.
Close the Window and Rescan the vmhba33 adapter. Your 2 LUNs should appear and it should be 4 paths meaning 2 per LUN.
Step #18. Under ESXi1 host go to Configuration > Storage. Click Add Storage. Go according to the following settings.
- Storage Type: Disk/LUN
- Disk/LUN: MSF ISCSI Disk 0 / 1
- File System: VMFS-5
- Data Store name: iSCSI1
Note: Repeat this step once again and create another Storage and name it iSCS2.
Your Final work should look like the snapshot below.
Open the Properties of your Cluster and enable vSphere HA if it’s not enabled.
Tip: If you’ve got any error then your shared storage is not configured correctly.
Important Notice: We’ve only connected our ESXi1 to the shared storage and you should exactly follow “Connect ESXi Host to vStorage” steps to ESXi2. For ESXi2 use the following IP addresses and Name.
- Step #5. IP Address: 10.0.1.20/24
- Step #8. IP Address: 10.0.1.21/24
- Step #13. ESXi2.wikigain.com
- Step #17. Same IP of ESXi1 (10.0.1.3)
Other steps are the same so do not skip any step including notes and tips because every step is very important.
In this guide, I’ve shown you how to Build vSphere Infrastructure on Windows Server 2008 R2 vStorage step by step with screenshots and for more clarification just see the following objectives.
- Initialize a New Hard Drive
- Assign IP Address to iSCSI Network Adapter
- Download & install Microsoft iSCSI Software Target
- Connected ESXi Hosts to vStorage
I hope you guys have learned something useful from this post and if you stuck at any step just let us know via comment section down below this post.
Next Guide: How to Build vSphere Infrastructure on Windows Server 2008 R2 VMs
Leave a Reply