• No results found

In order to implement most of the cool features from VMware vSphere, like vMotion, HA, the VMs must

“live” on shared storage. If you’re new to virtualization I should explain a bit. Shared storage is basically datastore visible from every host of your cluster. When you install a new VM, the destination space of that VM is that shared storage. The VM’s hard disk VMDK files are stored there, together with VMX (conf files) and Swap files as well.

Every single host must see that shared storage in order to implement vMotion or HA.

To implement shared storage in a small lab like the one I’m describing, there is several choices. You can download and configure Openfiler or FreeNAS, which both provides Virtual Appliances and are quite

“lightweight”, but this, would Add another VM which consume memory and disk space in my small virtual

“infrastructure”. So the option I’m taking is that I will implement the shared storage by my vCenter VM (yes that’s another role).

We will use the vCenter VM as an iSCSI target with free edition of Starwind iSCSI SAN. You can download it from Starwindsoftware.com: http://www.starwindsoftware.com/starwind-free

It’s very easy to install and setup to implement the shared storage. I’ll first add a second virtual hard drive and another vNIC for storage network, to my vCenter VM. Like this, I keep the number of VMs relatively low because my 8Gigs of RAM in my laptop will get consumed very fast.

Ok, Let’s move on. First, power down the vCenter VM and Add second vNIC which will be configured with VMnet2 (our iSCSI network). The vCenter VM should have 2 vNICs.

First, we will add additional disk drive to this VM.

Chapter: Shared Storage

3 6

Right click the vCenter VM, you go to the settings > add new hard drive. Choose 10 gigs, but this time choose allocate the disk space now. We might be able to get better performance with thick disk.

Start the VM. The newly added disk must be initialized and formatted in the storage snap-in.

Chapter: Shared Storage

3 7

That’s it concerning the volume. Now we’ll need to add another NIC card to the vCenter VM. This vNIC will be used for the storage network.

Configure this network card with this IP address: 10.10.3.1/24 (mask: 255.255.255.0)

Next, install Starwind iSCSI SAN, do a full installation.

Connect to your host via your IP address or via FQDN. And install the free license which you got when you downloaded the product.

Chapter: Shared Storage

3 8

Add new starwind Server

Then connect to the server by double clicking the vCenter.lab.local

Chapter: Shared Storage

3 9

Add new device..

Don’t forget to check the Allow multiple concurrent iSCSI connections (clustering), otherwise you’ll be able to connect only with One single ESX/ESXi host….

-.

Name the target alias.

When I look at the space we have on the drive, I can see that the maximum img file I can create is 9.9Gigs, because in VMware Workstation I chose to only add 10Giga hard drive.

If you do have more space, you would probably want to add more space.

The 10 Gigs is bare minimum though since if you want to test VMs running FT, you’ll have to use eagezerothick disks to do so in VMware vSphere. And so the disk is obviously not thin provisioned.

The VMDK file which will lay on that shared datastore will

Chapter: Shared Storage

4 0

take the entire place that the VM will require multiplied by 2, since when VM is protected by FT, there are actually 2 VMs running….

One principal and one secondary VM following the principal one with the vLockstep technology… But I think you can find plenty of information about FT all around the Internet. I have also done a blog post about it if you want to look here:

http://www.vladan.fr/troubleshooting-fault-tolerance-in-vsphere/

http://www.vladan.fr/fault-tolerance-vmware-and-marathontechnologies/

And that’s what I choosed here.

That’s is it for Starwind. The target is now running.

Chapter: Shared Storage

4 1

Start both vESXi 5 servers now (if not already running), open your vSphere client and connect to vCenter.

Go to the storage adapters and Add software iSCSI adapter (in vSphere 5 it’s not present by default).

You’ll see the vmhba33 appear as on the image below…

Now, right click the iSCSI software adapter and choose properties. Add an iSCSI server address.

For now do not rescan, if prompted.

First we’ll add our 2 new network adapters to the iSCSI VMkernel port.

Go and select one of the hosts in vSphere, and then select

Configuration > Networking > add networking > VMkernel

The next step you should Add new VMkernel port group which will be used for the iSCSI storage.

Chapter: Shared Storage

4 2

Select the radio button and check both checkboxes to Add 2 NICs at the same time when creating new vSwitch with the iSCSI vmkernel port group.

Put a name for this Port Group. For example iSCSI1.

Configure the IP address as this (don’t change the VMkernel default gateway):

Chapter: Shared Storage

4 3

Now add a second VMkernel – ISCSI2, configure 10.10.3.12 as an IP address.

As for the second ESXi host, I’ll use the 10.10.3.21 for ISCSI1 and 10.10.3.22 for ISCSI2.

You should end up with the vSwith1 configured like this:

Now, click on the vSwitch properties and double click iSCSI1 port group and configure the NICs as on the image below.

Then, do the same (the other way around) for the iSCSI2. You should end up with the ISCSI2 being setup as on the image below.

Chapter: Shared Storage

4 4

Go to the configuration > iSCSI > Add > and choose one NIC card present in the list.

Then, one after another add both NICs – vmnic2 and vmnic3

Chapter: Shared Storage

4 5

Like this both vNICs are binded to the VMkernel port group. Validate, and rescan. Next you’ll have to check if the firewall ports are opened for the iSCSI connection. Go to Configuration > Security profile > Properties

Then, check the checkbox for software iSCSI client….

Chapter: Shared Storage

4 6

Then, rescan the iSCSI adapter. You should see the paths to the iSCSI target like this one…

Now, go to storage > add storage – to add and create VMFS volume.

Choose the fiesystem… name and format the datastore

Chapter: Network design of nested ESXi hosts – part 2

4 7

And here you goes… we have a shared storage..--. New Datastore.

Related documents