Saturday, May 13, 2023

ESXI-check multiple ports using one command

 [root@ESXI:~] nc -w 1 -z IP 80-902

Connection to IP 80 port [tcp/http] succeeded!

Connection to IP 88 port [tcp/kerberos] succeeded!

Connection to IP 389 port [tcp/ldap] succeeded!

Monday, April 24, 2023

HCX : Ports required to open while deploying the HCX on prem site.

HCX deployment  on prem site ports required to open on vcenter, esxi, cloud gateway, L2C and remote cloud gateway,remote L2C and HCX managers on both sites.



Wednesday, April 19, 2023

Check ESXi host license, features and expiration date using command line

SSH the ESXi host using putty.
Type " vim-cmd vimsvc/license --show
will display with  ESXi host license, features and expiration date.

Tuesday, March 28, 2023

Create custom reports for vm's IOPS min/max/avg iops for 30 days

 Create custom reports for vm's IOPS min/max/avg iops for 30 days

After name 

Add vm's min/max/avg iops view in the views and dashboard that’s it, report will be ready to generate.








Sunday, March 12, 2023

Managing HCX service using the HCX CLI

SSH into the HCX Manager

Switch user to root: su –

Type systemctl <action> <service name>

    Action can be status, stop, start, restart
    Service name: Web-engine or app-engine




Example: systemctl status web-engine

    systemctl status web-engine

    systemctl stop web-engine

    systemctl restart web-engine

Saturday, February 11, 2023

Here is a handy bit of PowerCLI to return the VMhost Name, Product, ESXi build, Serial number of all hosts in vCenter.

 

Run below syntax on powercli to get the VMhost Name, Product, ESXi build, Serial number of all hosts in vCenter.



Get-Vmhost | Get-View | Sort-object Name |
select Name,
@{N='Product';E={$_.Config.Product.FullName}},
@{N='Build';E={$_.Config.Product.Build}},
@{Name="Serial Number"; Expression={($_.Hardware.SystemInfo.OtherIdentifyingInfo | where {$_.IdentifierType.Key -eq "ServiceTag"}).IdentifierValue}}




OR


Get-VMHost | Get-View | Select Name, @{l=”SerialNumber”; e={$_.Hardware.SystemInfo.OtherIdentifyingInfo.IdentifierValue.split(“,”)[0]}}

Thursday, February 9, 2023

Create NSX-T segments using the terraform


Export the template from GitHub  https://github.com/vmware/terraform-provider-nsxt and modify the template as mentioned below.


“`variables.tf“` file mention the manager IP, user name, password

# NSX Manager
variable "nsx_manager" {
  default = "IP here"
}


# Username & Password for NSX-T Manager
variable "username" {
  default = "user name here"
}

variable "password" {
    default = "password here"
}

 

This is the “`main.tf“` file:

# Prerequisites: 
# 1. Add NSX-T License

# Data Sources we need for reference later
data "nsxt_policy_transport_zone" "overlay_tz" {
    display_name = "Overlay-TZ"
}

data "nsxt_policy_transport_zone" "vlan_tz" {
    display_name = "VLAN-TZ"
}

# NSX-T Manager Credentials
provider "nsxt" {
    host                     = var.nsx_manager
    username                 = var.username
    password                 = var.password
    allow_unverified_ssl     = true
    max_retries              = 10
    retry_min_delay          = 500
    retry_max_delay          = 5000
    retry_on_status_codes    = [429]
}


# Create NSX-T VLAN Segments
resource "nsxt_policy_vlan_segment" "vlan100" {
    display_name = "VLAN100"
    description = "VLAN Segment created by Terraform"
    transport_zone_path = data.nsxt_policy_transport_zone.vlan_tz.path
    vlan_ids = ["11"]
}



ESXI-check multiple ports using one command

  [root@ESXI:~] nc -w 1 -z IP 80-902 Connection to IP 80 port [tcp/http] succeeded! Connection to IP 88 port [tcp/kerberos] succeeded! Conne...