Friday, June 21, 2019

vRealize Operations Manager 7.5 - Part2 - Configure vCenter adapter and dashboards overview

In this post, I will explain how to configure the vCenter adapter and will also walk through some of the native dashboards.

Configuring vCenter adapter


  • Login to vROps.
  • Click the Administration tab.
  • Select the vCenter Adapter. 
  • Click the gears icon.



  • Provide necessary details.


  • Test connection.




  • Click save settings and close.
  • Once the above steps are done, in a few seconds you can see "Adapter Status" as Data receiving and "Collection State" as Collecting.  

Note: After configuring the vCenter adapter you should actually wait for few days for all the data to get collected and populated.

Dashboards


This is the place where most of the System administrators/ Operations Engineers spend their time for understanding/ evaluating the operational aspects of their virtual infrastructure, capacity planning, troubleshooting various issues, performance optimizations, etc.  vROps has many pre-canned dashboards that you get out-of-the-box. Below screenshot shows how to select/ navigate multiple dashboards that are available in vROps.


Now, I will just briefly explain some of my favorite dashboards. 

Operations Overview


This dashboard provides data center summary. It provides info about the total number of clusters, hosts, total VMs, running VMs, datastores, etc. This dashboard also has widgets showing details about the top VMs experiencing CPU contention, memory contention, and disk latency.


Utilization Overview


This dashboard provides a summary of the environment based on the selection. In this case, I selected a cluster. It shows the total (CPU/ memory/ storage) capacity of the selected environment, usable capacity, used capacity, remaining capacity, etc. This will be very useful for capacity planning of resources.  

Cluster Utilization


This dashboard shows the CPU, memory, disk IOPS and network usage trends at the cluster level.


Datastore Utilization


This dashboard provides detailed info on datastore usage trends and heatmap based on datastore capacity/ utilization.


Heavy Hitter VMs


This dashboard provides cluster-level CPU, memory, IOPS and network throughput. It also gives a list of VMs which has generated the highest CPU demand, memory demand, highest IOPS and network throughput. This is very useful for identifying the VMs that has the highest resource consumption. 



Hope it was useful. Cheers!

Saturday, June 15, 2019

vRealize Operations Manager 7.5 - Part1 - Installation


For evaluation, you can download a trial version of vROps 7.5.

Installation


  • Log in to VCSA.
  • Select an ESXi host and Deploy OVF Template.
  • Browse and select the vROps 7.5 OVA file.
  • Provide a name and select a location.
  • Select a host and click next.

Now, if you are using a Chrome browser and if you haven't opened your VCSA with FQDN name, you might face the below error, "Transfer failed: The OVF descriptor is not available".


A workaround for the above issue is to open and login VCSA with FQDN using Firefox browser.

  • Perform the above same steps and this time you will not get the above error.

  • Accept the license agreements.
  • Select a deployment configuration.

  • Select storage.

  • Select a destination network.
  • Provide time zone and network details (You can leave network properties blank if you have a DHCP server configured in the destination network selected in the above step). Click next and finish.
  • Once the OVF template deployment is completed you can power on the VM.
  • Open the console to view installation progress. It will take a few minutes.

  • Once the installation is complete you will get the console screen as below. To proceed to the next stage of the installation process open the IP in a web browser.


  • You will get the below options. As it is a fresh installation I prefer to go with Express Installation as it is the fastest way to deploy it with minimal inputs.

  • Click next on the getting started page.
  • Set the admin account password, click next and finish.


  • Accept EULA.
  • Enter a product key or you can continue in evaluation mode.
  • Click next and finish.

Hope it was useful. Cheers!


Related posts

References



Friday, June 7, 2019

VMware PowerCLI 101 - Part3 - Basic VM operations

Previous posts of this blog series talked about how to install PowerCLI, connecting to ESXi host and basics of working with the vCenter server. In this article, we will go through basic VM operations.

Get basic VM details:
Get-VM -Name <name of the virtual machine>

To view all properties of a VM object:
Get-VM -Name <name of the virtual machine> | Get-Member

To start a VM:
Get-VM -Name <name of the virtual machine> | Start-VM

To restart a VM:
Get-VM -Name <name of the virtual machine> | Restart-VMGuest

To shut down a VM:
Get-VM -Name <name of the virtual machine> | Shutdown-VMGuest

To delete a VM permanently:
Get-VM -Name <name of the virtual machine> | Remove-VM -DeletePermanently

Let's have a look into the "ExtensionData" property of a virtual machine.

Status related details of a VM:
(Get-VM -Name <name of the virtual machine>).ExtensionData | select GuestHeartbeatStatus,OverallStatus,ConfigStatus


CPU, Memory config details of a VM:
(Get-VM -Name <name of the virtual machine>).ExtensionData.Config.Hardware



CPU, Memory hot add/ remove features:


Layout details of a VM:
(Get-VM -Name <name of the virtual machine>).ExtensionData.LayoutEx.File | sort Key | ft


VM tools status and other guest details:
(Get-VM -Name <name of the virtual machine>).ExtensionData.Guest




Network related info of a VM:
(Get-VM -Name <name of the virtual machine>).ExtensionData.Guest.Net


Hope this was useful. Cheers!

Friday, May 24, 2019

VMware PowerCLI 101 - Part2 - Working with vCenter server

In my previous blog, we discussed how to install PowerCLI module and connect to a stand-alone ESXi host. Now let's start with connecting to the vCenter server.

Connect-VIServer <IP of vCenter server>

Get the list of data centers present under this vCenter server: Get-Datacenter


Get the list of clusters under a datacenter: Get-Datacenter DC01 | Get-Cluster

To verify the status of HA, DRS, and vSAN of a cluster:
(Get-Cluster Cluster01) | select Name,DrsEnabled,DrsAutomationLevel,HAEnabled,HAFailoverLevel,VsanEnabled


Get the list of ESXi hosts part of a specific cluster: 
Get-Datacenter DC01 | Get-Cluster Cluster01 | Get-VMHost


To get the list of VMs hosted on a specific ESXi host:
Get-Datacenter DC01 | Get-Cluster Cluster01 | Get-VMHost 192.168.105.11 | Get-VM


To get a list of powered on and powered off VMs:
(Get-Cluster Cluster01 | Get-VM).where{$PSItem.PowerState -eq "PoweredOn"}
(Get-Cluster Cluster01 | Get-VM).where{$PSItem.PowerState -eq "PoweredOff"}


An efficient way of doing it in a single go is given below:
$vmson, $vmsoff = (Get-Cluster Cluster01 | Get-VM).where({$PSItem.PowerState -eq "PoweredOn"}, 'split')

$vmson will have the list of VMs that are PoweredOn and $vmsoff will have the list of VMs that are PoweredOff.


Cluster level inventory:
Get-Cluster | Get-Inventory

Datastore details of a cluster:
Get-Cluster | Get-Datastore | select Name, FreeSpaceGB, CapacityGB, FileSystemVersion, State


Hope this was useful. Cheers! In the next post, we will talk about performing basic VM operations using PowerCLI.

Friday, May 17, 2019

VMware PowerCLI 101 - Part1 - Installing the module and working with stand-alone ESXi host

This blog post series is for all those who would like to kickstart and learn VMware PowerCLI from the very basic level. Let's start with installing the PowerCLI module.

First, verify whether VMware.PowerCLI module is already installed on your machine.







Get-Module VMware.PowerCLI -ListAvailable


In this case, as shown above, VMware.PowerCLI module is not installed. Now let's find the latest version of the module available from PowerShell gallery.

Find-Module VMware.PowerCLI



11.2.0.12780525 is the latest version that is available in PSGallery.

To install this module use: Install-Module VMware.PowerCLI




Installation of this module may take a couple of minutes as this is the very first time. Once successfully installed you can verify using: Get-Module VMware.PowerCLI -ListAvailable

To list all the available cmdlets: Get-Command -Module VMware*

Now, let's go ahead and connect to an ESXi host.

Connect-VIServer <IP of ESXi server>

Provide the necessary credentials and once connected successfully you will see the below.


To get basic details of the ESXi host: Get-VMHost <IP of ESXi server>


To get more information about a cmdlet you can make use of the PowerShell Help System.

You can find all the properties and methods available for an object using: Get-Member

Example: Get-VMHost 192.168.105.1 | Get-Member

To retrieve specific properties of an ESXi host object: 

$h1 = Get-VMHost 192.168.105.1

Model detail: $h1.Model
Processor type: $h1.ProcessorType


Another very useful property is "ExtensionData". Let's have a detailed look at this property.


This property provides you a lot of info regarding system runtime, hardware health status, etc.


System and hardware health status:


Memory and CPU health status:


Configuration status: $h1.ExtensionData.ConfigStatus
Configuration issues: $h1.ExtensionData.ConfigIssue

Few more useful details that are available under "ExtensionData" are given below.


There is a property called "RebootRequired" which actually shows whether there is any pending reboot for the system.

System uptime and resource utilization are available under "QuickStats" property.


Note:
"OverallCpuUsage" is in MHz, "OverallMemoryUsage" is in MB and "Uptime" is in Seconds.

List of all system capabilities: $h1.ExtensionData.Capability

BIOS version: $h1.ExtensionData.Hardware.BiosInfo


In the next article, we will discuss connecting to the vCenter server using PowerCLI and performing day-to-day operations. Hope this was useful. Cheers!

Related posts:


Friday, April 19, 2019

Cisco switch configuration backup using PowerShell

In this article, I will briefly explain how to back up the running configuration of Cisco switches to a TFTP server location using PowerShell.

Prerequisites
  • A TFTP server should be configured and running.
  • PowerShell module Posh-SSH should be installed on the node from which the script is running.

Workflow
  1. Collect credentials to SSH into the switch
    $creds = Get-Credential
  2. Create a new SSH session to the first switch in the list
    $sw_ssh = New-SshSession -ComputerName <Management IP of Cisco switch> -Credential $creds -Force -ConnectionTimeout 300
  3. Invoke the command to backup running config to TFTP server over the SSH session
    $cmd_backup = "copy running-config tftp://<IP of TFTP server>/config_backup.txt vrf management"
    Invoke-sshcommand -Command $cmd_backup -SSHSession $sw_ssh

You can schedule this PS script using a task scheduler so that the running configuration of switches can be backed up automatically on a daily basis or as per requirements. Hope this was useful. Cheers!

Complete project reference
https://github.com/vineethac/cisco_switch_backup

Related article
Dell EMC switch configuration backup using PowerShell

Friday, April 12, 2019

VMware VVols: Integrating Dell EMC Unity with vSphere environment

This article provides the step by step procedure to configure a Virtual Volume (VVol) based vSphere environment using Dell EMC Unity SAN storage. You can go through my previous post to get an understanding of the differences between VMFS and VVol.

Step1: Register a new storage provider in vCenter

Note: Registering a storage provider exposes all the array capabilities to vCenter through VASA API.

Select: vCenter server -> Configure -> Storage providers -> Register a new storage provider (+)

Register new storage provides in vCenter

After successful registration of storage provider


Step2: Create a VVol datastore on the storage array (Unity)

Create VVol datastore (storage container)

Provide a name

Select capability profiles for the VVol datastore

Note: Each pool has its own characteristics and is associated with a specific capability profile. Adding capability profiles to a VVOL datastore basically adds the corresponding pools to that VVOL construct. In the above figure we have added 3 capability profiles, which means pool_01/02/03 are now part of VVOL_Datastore_01.

Configure access to ESXi hosts

Summary

VVol datastore (storage container) creation completed

The storage container (VVOL datastore) has been created on the array and the next step is to add it to ESXi hosts.

Step3: Add a new datastore in the vSphere environment through vCenter

Add new VVol datastore

Select the VVol datastore and provide a name

VVol datastore creation complete

VVol datastore

Step4: Create VM storage policies

Select VM Storage Policies

Create VM storage policy

Select vCenter and provide a name



Storage type and rule

Select service level

Select the compatible storage


Now the storage policy (Platinum) has been created. Similarly, I have created Silver and Bronze policies which are shown below.

Sample storage policies

Step5: Migrate virtual machines to VVol datastore

Migrate VM01 to VVol datastore

While migrating the VM, you can choose the disk format and the VM storage policy and it will display the compatible VVOL datastores.


Select compatible storage


If you would like to apply storage policies at disk level you can edit the VM storage policies setting of the VM and apply policy as per the requirement as shown below.


Select VM storage policy per VMDK
Hope this was helpful. Cheers!

References: