Translate

Total Pageviews

My YouTube Channel

Saturday, 6 September 2014

Use a Host as a Template to Create a Uniform Networking Configuration on a vSphere Distributed Switch in the vSphere Web Client



If you plan to have hosts with a uniform networking configuration, you can select a host as a template and apply its configuration for physical NICs and VMkernel adapters to other hosts on the distributed switch.







Procedure:-

1. Right Click on distributed vSwitch > Click on Add and Manage Hosts

 
2. Select Manage Host Networking > Next

 
3. Select all those ESXi hosts where you want to apply the new configuration

 
4. Then select the check box configure identical network settings on multiple hosts (template mode) > Next


5.


6. Select Manage VMkernel adapters (template mode) > Next


7. Click on New Adapter


8. Click on Browse > Select Port Group > OK


9. Click on Next


10. Select the Approriate Check Box (For example: Virtual SAN traffic) > Next

 

11. Configure the IP address for VMkernel Port > Next
 

12. Click on Finish
 

13. Now click on Apply to all
 

14. Then configure the IP addresses for VMkernel Port 1 and VMkernel Port 2 as required  > OK
 

15. Click on Next


16. Click on Next


17. Click on Finish

 
Now Monitor the Recent Tasks window on the left side of VMware vSphere Web Client to verify that the task completes successfully

Wednesday, 3 September 2014

Why VAAI?

Originally this article is available here http://storagegaga.com/tag/hardware-assisted-locking/ Thanks Chin-Fah for sharing such a good information on your blog. I am re-publishing it on my blog because i want to keep this article as a Bookmark on my blog.
Why is VAAI important? What does it do that makes it so useful and important to the hypervisor?
VAAI is about a set of new SCSI commands. And there are 3 important ones:
  • WRITE-SAME
  • XSET
  • ATS
What exactly do these SCSI commands do?
WRITE-SAME is a SCSI command that instructs the storage array to zeroes the virtual VMDK disks or VMFS LUNs. This usually happens when guest OS require a brand new set of virtual disks and initializing the virtual disks is required. In the past (before VAAI), the hypervisor has to repetitively send 0s to the storage to perform the disks zeroing. As shown in the diagram below, you can see that each zero operation is sent from the hypervisor to the storage.
This back-and-forth of sending 0s and acknowledgments between the hypervisor and the storage is not efficient. With VAAI, the command WRITE-SAME  is sent from the hypervisor to the storage array and the storage array will do the zeroing on the disks and LUNs. The hypervisor will not intervene with the process until it gets and acknowledgment of its completion. See diagram below of how VAAI helps in bulk-zeroing of disks and LUNs in the storage array.
The animated GIFs are the taken from Luke Reed’s blog, a fantastic read.
The second VAAI SCSI command is XSET and it performs hardware accelerated full copy. This command is also known as  XCOPY and it offloads the process of copying the blocks of data that makeup a VMDK file. Such copying operations occur when the hypervisor is doing things like VM cloning, Storage vMotion or VM creation from templates (bulk copying to create many similar VMs in one go).
Again with the courtesy of Luke Reed’s animated GIFs, the diagram below shows a full copy without VAAI
and after implementing VAAI, where the full, bulk copy operations is offloaded to the storage array to execute.
The third and last SCSI command of VAAI is ATS or hardware-assisted locking. ATS stands for Atomic, Test and Setand the command allow the hypervisor to lock only the required blocks rather than the entire LUN.
Without VAAI, the entire LUN temporarily could be locked by the numerous VMFS operations of one single hypervisor and this prevents other hypervisors from accessing the shared LUNs. The ATS API offloads lock management from the host to the storage array and keeps the LUN available by locking only required blocks, not the entire VMFS file system. Please see the pleasing diagrams below of
(without VAAI ATS)
(with VAAI ATS)
And if you want to see the VAAI Hardware Accelerated Full Copy (aka XSET) in action, here’s a little video showing how it is done in an EMC environment.
 The primary significance and noticeable benefit is definitely performance. The secondary benefit, though not so obvious, is allowing VMware and its hypervisor to scale because it does not get bogged down by some of the I/O functions that it is not meant to do.
There were some new additions in vSphere 5.0 for VAAI. From its FAQ, it listed in ESX5.0, support for NAS Hardware Acceleration is included with support for the following primitives:
  • Full File Clone – Like the Full Copy VAAI primitive provided for block arrays, this Full File Clone primitive enables virtual disks to be cloned by the NAS device.
  • Native Snapshot Support – Allows creation of virtual machine snapshots to be offloaded the array.
  • Extended Statistics – Enables visibility to space usage on NAS datastores and is useful for Thin Provisioning.
  • Reserve Space – Enables creation of thick virtual disk files on NAS.
So, there you have it folks. Why VAAI? Here’s why.

Some Helpful PowerCLI Commands


Here are some helpful PowerCLI Commands:-
1. Sometimes when you are using the PowerCLI commands output of that commands is listed completed on Screen then how to get the output completely:-

(a.)  Complete Output is not Visible through this command

 
(b.)  Complete Output is Visible through this command
 

 (c.) Even with this command complete Output is Visible

 
2. How to Check the Alias of Any Command in PowerCLI:-
 
Get-Alias -definition Command
 
 
 
3. How to Create Variable in PowerCLI
(a.) How to create variable for command:-
$VariableName=command
Ex:-
$a=get-credential
(b.) How to create variable for Particular Object (For example:- VM)
$VaribaleName="ObjectName"
Ex:-
$b="Win01"
 
4. How to Count the Lines those are available in Output
$VariableName.count
Ex:-
$a.count
 
 
5. How to Change the Column Name in the Output
 

 



Frequently Asked Questions for vStorage APIs for Array Integration (1021976)

Purpose

This article provides answers to frequently asked questions about vStorage APIs for Array Integration (VAAI).

Resolution

vStorage APIs for Array Integration is a feature introduced in ESXi/ESX 4.1 that provides hardware acceleration functionality. It enables your host to offload specific virtual machine and storage management operations to compliant storage hardware. With the storage hardware assistance, your host performs these operations faster and consumes less CPU, memory, and storage fabric bandwidth.

For more detailed information about vStorage APIs for Array Integration and when it is used, see the Storage Hardware Acceleration section of the Configuration Guide for your version of ESXi/ESX.

What does VAAI require?

VAAI requires:
  • ESXi/ESX 4.1 or later
  • Enterprise or Enterprise Plus licensing for ESXi/ESX hosts
  • Storage arrays that support VAAI storage-based hardware acceleration

    Notes:
    • ESXi/ESX 4.1 does not support hardware acceleration with NAS storage devices.
    • Support for NAS storage devices was introduced in ESXi 5.x.

How do I know if my storage array supports VAAI?

To determine if your storage array supports VAAI, see the Hardware Compatibility List or consult your storage vendor. To enable the hardware acceleration on the storage array, check with your storage vendor. Some storage arrays require explicit activation of hardware acceleration support.

Notes:
  • VMware HCL version 1 specifies VAAI support with the footnote, 'VAAI primitives "Full Copy", "Block Zeroing" and "Hardware Assisted Locking" are supported' and may identify other prerequisites.
  • In VMware HCL version 2, there are options under the Features Category and Features fields where arrays can be searched against to verify if they are VAAI-certified.

What are the fundamental operations used by VAAI and what are their corresponding Advanced Settings?

VAAI uses these fundamental operations:
  • Atomic Test & Set (ATS), which is used during creation and locking of files on the VMFS volume
  • Clone Blocks/Full Copy/XCOPY, which is used to copy or migrate data within the same physical array
  • Zero Blocks/Write Same, which is used to zero-out disk regions
  • Thin Provisioning in ESXi 5.x and later hosts, which allows the ESXi host to tell the array when the space previously occupied by a virtual machine (whether it is deleted or migrated to another datastore) can be reclaimed on thin provisioned LUNs.
  • Block Delete in ESXi 5.x and later hosts, which allows for space to be reclaimed using the SCSI UNMAP feature. For more information on Block Delete/SCSI UNMAP, see Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs (2014849).
The fundamental operations are controlled by these advanced settings:

Advanced Parameter nameDescription
HardwareAcceleratedLockingAtomic Test & Set (ATS), which is used during creation of files on the VMFS volume
HardwareAcceleratedMoveClone Blocks/Full Copy/XCOPY, which is used to copy data
HardwareAcceleratedInitZero Blocks/Write Same, which is used to zero-out disk regions

Note: For Thin Provisioning, enabling/disabling occurs on the array and not on the ESXi host.


What improvements have been made to VAAI for ESXi 5.x?

To encourage customers to use larger and fewer datastores, support for Thin Provisioning VAAI primitive has been added in ESXi 5.0.

In ESXi 5.x, support for NAS Hardware Acceleration is included with support for these primitives:
  • Full File Clone – Like the Full Copy VAAI primitive provided for block arrays, this Full File Clone primitive enables virtual disks to be cloned by the NAS device.
  • Native Snapshot Support – Allows creation of virtual machine snapshots to be offloaded to the array.
  • Extended Statistics – Enables visibility to space usage on NAS datastores and is useful for Thin Provisioning.
  • Reserve Space – Enables creation of thick virtual disk files on NAS.

    Note: Previously, the only supported VMDK type that could be created on NAS was thin.
Support for Block Delete to reclaim space use on thin provisioned LUNs on support arrays is also included in ESXi 5.x. For more information on Block Delete/SCSI UNMAP, see Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs (2014849).


How do I know if VAAI is enabled?

To determine if VAAI is enabled using the vSphere Client:
  1. In the vSphere Client inventory panel, click the host.
  2. Click the Configuration tab, then click Advanced Settings under Software.
  3. Check that these options are set to 1 (enabled):

    DataMover.HardwareAcceleratedMove
    DataMover.HardwareAcceleratedInit
    VMFS3.HardwareAcceleratedLocking


    Note: These options are enabled by default.
On ESXi/ESX 4.x hosts, to determine if VAAI is enabled using the service console in ESX or the vCLI in ESXi, use the esxcfg-advcfgcommand to check if the options are set to 1 (enabled):

# esxcfg-advcfg -g /DataMover/HardwareAcceleratedMove
# esxcfg-advcfg -g /DataMover/HardwareAcceleratedInit
# esxcfg-advcfg -g /VMFS3/HardwareAcceleratedLocking


On ESXi 5.x hosts, to determine if VAAI is enabled, run these commands and check if Int Value is set to 1 (enabled):

# esxcli system settings advanced list -o /DataMover/HardwareAcceleratedMove
# esxcli system settings advanced list -o /DataMover/HardwareAcceleratedInit
# esxcli system settings advanced list -o /VMFS3/HardwareAcceleratedLocking


You see output similar to:

   Path: /VMFS3/HardwareAcceleratedLocking
   Type: integer
   Int Value: 1           <-- set to 1 if enabled
   Default Int Value: 1
   Min Value: 0
   Max Value: 1
   String Value:
   Default String Value:
   Valid Characters:
   Description: Enable hardware accelerated VMFS locking (requires compliant hardware)


Note: For Thin Provisioning, enabling/disabling occurs on the array and not on the ESXi host.


What happens if I have VAAI enabled on the host but some of my disk arrays do not support it?

When storage devices do not support or provide only partial support for the host operations, the host reverts to its native methods to perform the unsupported operations.


Are there any caveats that I should be aware of in ESXi 5.x?

Use of the ATS (Atomic Test-and-Set) primitive depends on the type of filesystem:

On VAAI HardwareNew VMFS-5Upgraded VMFS-5VMFS-3
Single-extent datastoreATS only [1]ATS, but fall back to SCSI-2 reservationsATS, but fall back to SCSI-2 reservations
Multi-extent datastoreOnly allow spanning on ATS hardware [2]ATS, except when locks on non-headATS, except when locks on non-head

Notes:
  • [1] If a new VMFS-5 is created on a non-ATS storage device, SCSI-2 reservations will be used.
  • [2] When creating a multi-extent datastore where ATS is used, the vCenter Server will filter out non-ATS devices, so that only devices that support the ATS primitive can be used.

Are there any caveats that I should be aware of in ESXi/ESX 4.x?

There are a few reasons why a hardware-accelerated operation may fail.

For any primitive that the array does not implement, the array returns an error, which triggers the ESX data mover to attempt the operation using software data movement. In the case of ATS, it reverts to using SCSI Reservations.

VAAI hardware offload cannot be used when:
  • The source and destination VMFS volumes have different block sizes
  • The source file type is RDM and the destination file type is non-RDM (regular file)
  • The source VMDK type is eagerzeroedthick and the destination VMDK type is thin
  • The source or destination VMDK is any kind of sparse or hosted format
  • Cloning a virtual machine that has snapshots because this process involves consolidating the snapshots into the virtual disks of the target virtual machine.
  • The logical address and/or transfer length in the requested operation is not aligned to the minimum alignment required by the storage device (all datastores created with the vSphere Client are aligned automatically)
  • The VMFS datastore has multiple LUNs/extents spread across different arrays
Note: 


What do I need to know about the Hardware Acceleration Support Status?

If you go to Host > Configuration > Storage, you can see the Hardware Acceleration Status in the panel on the right side.

For each storage device and datastore, the vSphere Client displays the hardware acceleration support status in the Hardware Acceleration column of the Devices view and the Datastores view.

The status values are Unknown, Supported, and Not Supported. The initial value is Unknown. The status changes to Supported after the host successfully performs the offload basic operations. If the offload operation fails, the status changes to Not Supported.

To determine if your storage device supports VAAI, test the Full Copy VAAI primitive:
  1. Using the vSphere Client, browse the datastore and locate a virtual disk (VMDK) of at least 4 MB that is not in use.
  2. Copy the virtual disk to a new file.
  3. Check the Hardware Acceleration status to verify that it changes from Unknown to either Supported or Not Supported.
Note: VAAI primitives can also be tested by creating a virtual machine with at least one new virtual disk, or cloning a virtual machine.


Can I check the VAAI status from the command line?
  • On ESXi 5.x

    To check the VAAI status, run the command:

    # esxcli storage core device vaai status get

    You see output similar to:

    mpx.vmhba1:C0:T1:L0
       VAAI Plugin Name:
       ATS Status: unsupported
       Clone Status: unsupported
       Zero Status: unsupported
       Delete Status: unsupported

    mpx.vmhba1:C0:T0:L0
       VAAI Plugin Name:
       ATS Status: unsupported
       Clone Status: unsupported
       Zero Status: unsupported
       Delete Status: unsupported
  • On ESXi/ESX 4.x

    To check the VAAI status, run the command:

    # esxcfg-scsidevs -l | egrep "Display Name:|VAAI Status:"

    You see output similar to:

    Display Name: Local VMware Disk (mpx.vmhba2:C0:T0:L0)
    VAAI Status: unsupported
    Display Name: Local USB CD-ROM (mpx.vmhba32:C0:T0:L0)
    VAAI Status: unknown
    Display Name: Local TEAC CD-ROM (mpx.vmhba3:C0:T0:L0)
    VAAI Status: unknown
    Display Name: DGC Fibre Channel Disk (naa.6006016030801c00f8506073d0d7de11)
    VAAI Status: unknown
    Display Name: DGC Fibre Channel Disk (naa.6006016030801c00f9506073d0d7de11)
    VAAI Status: unknown

Are changes to VAAI settings logged?

Changes to VAAI advanced settings (for example, enabling or disabling VAAI) are recorded in the VMkernel logs at /var/log/vmkernel (for ESXi 5.0 vmkernel.log) or /var/log/messages.

After enabling VAAI using the advanced settings, the VMkernel log contains entries similar to:

cpuN:1234)Config: 297: "HardwareAcceleratedMove" = 1, Old Value: 0, (Status: 0x0)
cpuN:1234)Config: 297: "HardwareAcceleratedInit" = 1, Old Value: 0, (Status: 0x0)
cpuN:1234)Config: 297: "HardwareAcceleratedLocking" = 1, Old Value: 0, (Status: 0x0)


After disabling VAAI using the advanced settings, the VMkernel log contains entries similar to:

cpuN:1234)Config: 297: "HardwareAcceleratedMove" = 0, Old Value: 1, (Status: 0x0)
cpuN:1234)Config: 297: "HardwareAcceleratedInit" = 0, Old Value: 1, (Status: 0x0)
cpuN:1234)Config: 297: "HardwareAcceleratedLocking" = 0, Old Value: 1, (Status: 0x0)



Additional Information

For more information, please refer to the vSphere Storage Guide for your release of vSphere: Here is a list of commonly used SCSI opcodes related to VAAI operations :

0x93WRITE SAME(16)
0x41WRITE SAME(10)
0x42UNMAP
0x89SCSI COMPARE and WRITE - ATS
0x83EXTENDED COPY

Occasionally, failures during VAAI operations would be logged in file vmkernel.log under /var/log as shown in an example below: 
Cmd(0x41248092e240) 0x42, CmdSN 0x13bb23 to dev "naa.xxxxxxxx" failed H:0x0 D:0x2
Source:-
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021976&src=vmw_so_vex_ragga_1012