VMware Training and Certification. Year 2025. Part 3. Introduction. Authorized Training: Datacenter Virtualization. VMware vSAN 8. Brief Summary.

Introduction


Hello to all readers of the blog about IT Architecture and Training!

In the previous article of the “VMware Training and Certification. Year 2025” series, we explored the Authorized Training: Datacenter Virtualization learning domain with a focus on VMware vSphere 8, its training structure, learning objectives, and certification alignment.

Today, we continue this series by turning our attention to VMware vSAN – one of the core technologies of modern software-defined datacenter architectures.

The VMware vSAN training direction includes a small but well-structured set of training programs focused on software-defined storage. They cover vSAN architecture, deployment models, storage policies, performance optimization, availability, scalability, and operational best practices in enterprise environments.

In this article, we will concentrate on the current VMware vSAN training offerings, their structure, learning outcomes, and alignment with VMware certification paths.

vSAN 8


VMware vSAN 8 – This is the next generation of hyperconverged infrastructure software from VMware, which provides uncompromised performance to meet the needs of today’s business, while enabling the data center to be ready for any future challenges.

vSAN 8 introduces vSAN Express Storage Architecture, a new optional storage architecture on the vSAN platform. The vSAN Express storage architecture is the industry’s first single-tier HCI storage solution designed to optimize the use of high-performance storage devices, delivering performance gains. Advanced compression algorithms provide better compression, increasing storage efficiency and contributing to lower total cost of ownership. The vSAN Express Storage Architecture includes scalable native snapshots for enhanced backup and a storage pool architecture that reduces fault domains and improves data availability.

Customers who choose to stay with the original storage architecture will also see the benefits of vSAN 8, including increased performance for demanding workloads and proactive intelligence to avoid compatibility issues before they occur.

Key ongoing vSAN 8 training programs:

● VMware vSAN: Install, Configure, Manage [V8]

  • Course code: VSANICM8.
  • Duration: 4 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: Storage and virtual infrastructure consultants, solution architects, and administrators who are responsible for production support and administration of VMware vSAN.
  • Prerequisites: Completion of the following course is required:
    • VMware vSphere: Install, Configure, Manage or equivalent knowledge

During this four-day course, you will gain the knowledge, skills, and tools to plan and deploy a VMware vSAN cluster. You will learn about managing and operating vSAN. This course focuses on building the required skills for common Day-2 vSAN administrator tasks such as vSAN node management, cluster maintenance, security operations, troubleshooting and advanced vSAN cluster operations. You will learn these skills through the completion of instructor-led activities and hands-on lab exercises.

● VMware vSAN: Troubleshooting [V7]

  • Course code: VSANTS8
  • Duration: 2 days.
  • Level of difficulty: Advanced (L400+).
  • Target audience: Storage and virtual infrastructure administrators who want to be able to perform initial troubleshooting on their software-defined storage with vSAN.
  • Prerequisites: Before taking this course, students should take the following courses or have equivalent knowledge and experience:
    • VMware vSphere: Install, Configure, Manage;
    • VMware vSAN: Install, Configure, Manage.

This two-day, hands-on training course provides the knowledge to troubleshoot VMware vSAN™ clusters.

In this course, you will learn the best practices to maintain a healthy vSAN environment and mitigate potential issues that may occur with operation of the software. You will learn the GUI and CLI vSAN monitoring and troubleshooting tools.

The course provides a logical framework for a systematic troubleshooting approach. You will learn how to troubleshoot vSAN common issues with examples. The labs provided in the course simulate real-world problems to evaluate and enhance your troubleshooting skills.

Brief Summary


In this article, we reviewed the VMware vSAN Authorized Training learning domain as part of the “VMware Training and Certification. Year 2025” series. The focus was placed on the compact but well-structured set of vSAN training programs that form the foundation for working with software-defined storage in enterprise environments.

The article outlined the core learning objectives, including vSAN architecture, deployment models, storage policies, performance optimization, availability, scalability, and operational best practices. Particular attention was given to how these training programs align with VMware certification paths, supporting the development of practical skills required for modern software-defined datacenter architectures.

In the next article, we will move beyond storage and focus on Datacenter Virtualization: VMware Site Recovery Manager (SRM). The upcoming publication will explore training programs dedicated to disaster recovery and business continuity, covering recovery planning, orchestration, testing, and integration with VMware vSphere–based environments.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Education, Storage, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , | Leave a comment

VMware Training and Certification. Year 2025. Part 2. Introduction. Authorized Training: Datacenter Virtualization. vSphere 8. Brief Summary.

Introduction


Hello to all readers of the blog about IT Architecture and Learning!

In the previous article of the “VMware Training and Certification. Year 2025” series, we reviewed the structure of VMware Authorized Training, the main learning domains, and the role of certification paths in professional development.

Today, we will focus on the Authorized Training: Datacenter Virtualization learning domain, which forms the foundation of enterprise VMware infrastructure.

The Datacenter Virtualization training direction includes educational programs covering VMware vSphere technologies, such as ESXi, vCenter Server, resource management, availability, scalability, and operational best practices

The number of training programs within this domain is quite extensive. Therefore, in this article we will concentrate specifically on VMware vSphere 8, highlighting their training structure, learning objectives, and certification alignment..

VMware vSphere 8


New version of VMware vSphere 8 is the enterprise workload platform that brings the benefits of cloud to on-premises workloads. It supercharges performance with DPU and GPU based acceleration, enhances operational efficiency through the VMware Cloud Console, seamlessly integrates with add-on hybrid cloud services, and accelerates innovation with an enterprise-ready integrated Kubernetes runtime that runs containers alongside VMs.

The main current training programs for vSphere 8 technologies are:

● VMware vSphere: What’s New [V8]

  • Course code: VSWN8.
  • Duration: 2 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: System architects, system administrators, IT managers, VMware partners, and individuals responsible for implementing and managing vSphere architectures who want to deploy vSphere 8.0 into their existing vSphere environment.
  • Prerequisites: This course requires completion of one the following courses or equivalent knowledge and administration experience with ESXi and vCenter Server:
    • VMware vSphere: Install, Configure, Manage
    • VMware vSphere: Optimize and Scale
    • VMware vSphere: Fast Track
    • VMware vSphere: Troubleshooting.

In this 2-day course, you will explore the new features and enhancements in VMware vCenter 8.0, VMware ESXi 8.0, and VMware vSphere 8.0. Through use-case scenarios, demonstrations, labs, and simulations, you develop skills to implement and configure vSphere 8.0.

● VMware vSphere: Install, Configure, Manage [V8]

  • Course code: VSICM8.
  • Duration: 5 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: System administrators, System engineers.
  • Prerequisites: System administration experience on Microsoft Windows or Linux operating systems.
  • Certification: Attending this course meets the training requirement to achieve the following certification: VMware Certified Professional – Data Center Virtualization (VCP-DCV).

This five-day course features intensive hands-on training that focuses on installing, configuring, and managing VMware vSphere 8, which includes VMware ESXi 8 and VMware vCenter 8. This course prepares you to administer a vSphere infrastructure for an organization of any size. This course is the foundation for most VMware technologies in the software-defined data center.

● VMware vSphere: Operate, Scale and Secure [V8]

  • Course code: VSOSS8.
  • Duration: 5 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: Senior Administrators, Implementers and Consultants, Architects.
  • Prerequisites: Understanding of concepts presented in the VMware vSphere: Install, Configure, Manage [V8] course, OR Equivalent knowledge and administration experience with ESXi and vCenter, Experience with working at the command line is highly recommended.
  • Certification: Attending this course meets the training requirement to achieve the following certification: VMware Certified Professional – Data Center Virtualization (VCP-DCV).

This five-day course teaches you advanced skills for configuring and maintaining a highly available and scalable virtual infrastructure. Through a mix of lecture and hands-on labs, you configure and optimize the VMware vSphere 8 features that build a foundation for a truly scalable infrastructure. You also discuss when and where these features have the greatest effect. Attend this course to deepen your understanding of vSphere and learn how its advanced features and controls can benefit your organization.

● VMware vSphere: Troubleshooting [V8]

  • Course code: VSTS8.
  • Duration: 5 days.
  • Level of difficulty: Advanced.
  • Target audience: System architects and system administrators.
  • Prerequisites: VCP-DCV certification or VMware vSphere: Install, Configure, Manage or VMware vSphere: Operate, Scale and Secure.

This five-day training course provides you with the knowledge, skills, and abilities to achieve competence in troubleshooting the VMware vSphere 8 environment. This course increases your skill level and competence in using the command-line interface, VMware vSphere Client, log files, and other tools to analyze and solve problems.

● VMware vSphere: Fast Track [V8]

  • Course code: VSFT8.
  • Duration: 5 days.
  • Level of difficulty: Advanced (L400+), Intermediate (L300).
  • Target audience: System administrators, System engineers.
  • Prerequisites: System administration experience on Microsoft Windows or Linux operating systems.
  • Certification: Attending this course meets the training requirement to achieve the following certification: VMware Certified Professional – Data Center Virtualization (VCP-DCV).

This five-day, extended hour course takes you from introductory to advanced VMware vSphere 8 management skills. Building on the installation and configuration content from our best-selling course, you will also develop advanced skills needed to manage and maintain a highly available and scalable virtual infrastructure. Through a mix of lecture and hands-on labs, you will install, configure, and manage vSphere 8. You will explore the features that build a foundation for a truly scalable infrastructure and discuss when and where these features have the greatest effect. This course prepares you to administer a vSphere infrastructure for an organization of any size using vSphere 8, which includes VMware ESXi 8 and VMware vCenter Server 8.

● VMware vSphere: Design [V8]

  • Course code: VSD8.
  • Duration: 3 days.
  • Level of difficulty: Advanced (L400+).
  • Target audience: Experienced system integrators and consultants responsible for designing and deploying vSphere environments.
  • Prerequisites: Completion of the VMware vSphere: Install, Configure, Manage [V8] and VMware vSphere: Operate, Scale, and Secure [V8] courses.
  • Certification: This course is recommended if you aim to achieve the following certification: VMware Certified Advanced Professional – Data Center Virtualization (VCAP-DCV) Design.

This three-day course equips you with the knowledge, skills, and abilities to design a VMware vSphere 8 virtual infrastructure. You follow a proven approach to design a virtualization solution that ensures availability, manageability, performance, recoverability, and security. The approach presented follows VMware best practices. This course discusses the benefits and risks of available design alternatives and provides information to support making sound design decisions.

● VMware vSphere with Tanzu: Deploy, Configure, Manage [V8]

  • Course code: VSTDCM8.
  • Duration: 3 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: vSphere administrators and platform operators who are responsible for deploying and managing workloads and services in vSphere with Tanzu.
  • Prerequisites:
    • Experience deploying and managing vSphere;
    • Understanding of Kubernetes and the Kubernetes cluster architecture;
    • Attending one of the following courses is recommended:
      • VMware vSphere: Install, Configure, Manage;
      • Kubernetes Fundamentals and Cluster Operations.

During this three-day course, you focus on deploying and managing VMware vSphere® with VMware Tanzu in a VMware vSphere 8 environment. You learn how vSphere with Tanzu provides services to deploy and manage virtual machines, vSphere Pods, Supervisor Services, and VMware Tanzu® Kubernetes Grid clusters. You will also gain experience with day 2 operations and life cycle management of a vSphere with Tanzu environment.

● VMware vSphere: Advanced Administration [V8]

  • Course code: VSAA8
  • Duration: 5 days.
  • Level of difficulty: Advanced (L400+).
  • Target audience: System administrators, System engineer.
  • Prerequisites: This course requires completion of the following prerequisites:
    • VMware vSphere: Install, Configure, Manage;
    • VMware vSphere: Operate, Scale, and Secure;
    • Working knowledge of VMware vSAN™
    • System administration experience on Microsoft Windows or Linux operating systems.
  • Certification: Attending this course is recommended to achieve the following certification: VMware Certified Advanced Professional – Data Center Virtualization Deploy (VCAP Deploy).

This five-day course provides hands-on training to equip students with a range of skills, from performing routine VMware vSphere 8 administrative tasks to complex vSphere operations and configurations. Through lab-based activities, students are immersed in real-life situations faced by VMBeans, a fictitious company. These situations expose students to real-life scenarios faced by companies that are building and scaling their virtual infrastructure.This course uses scenario-based lab exercises and does not provide guided step-by-step instructions. To complete the scenario-based lab exercises, you are required to analyze the task, research, and deduce the required solution. References and suggested documentation are provided. This course utilizes labs to teach students how to effectively navigate and manage vSphere. The course aligns fully with the VMware Certified Advanced Professional – Data Center Virtualization Deploy exam objectives.

Brief Summary


In the second article of the series “VMware Training and Certification. Year 2025”, we reviewed training programs in Datacenter Virtualization: VMware vSphere 8. The article provided a detailed overview of key courses for administrators and engineers, covering both foundational and advanced training on deployment, configuration, and management of virtualized infrastructure. We also highlighted certification pathways that help professionals validate their skills with vSphere 8 and expand their career opportunities.

The next article will focus on Datacenter Virtualization: VMware vSAN, a modern software-defined storage solution. Readers will learn about training programs and courses that cover deployment, optimization, and management of vSAN, as well as certification preparation to demonstrate competencies in VMware software-defined storage.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Education, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

VMware Training and Certification. Year 2025. Part 1. Introduction. Authorized Training. VMware after the Broadcom acquisition: Implications for training. Why VMware Authorized Training? Core VMware Authorized Training Domains. VMware Certification as part of the learning journey. Target Audience. Brief Summary.

Introduction


Hello to all readers of the blog about IT Architecture and Learning!

In previous years, we published a series of articles: “VMware Learning. Year 2023”, “VMware Learning. Year 2022”, “VMware Training. Season 2021–2022”, and “VMware Learning. Year 2020”.

We are now starting a new series called “VMware Training and Certification. Year 2025”, in which we will explore all current educational directions of VMware, update information about previous courses, and consider changes in the platform after VMware’s acquisition by Broadcom.

To begin with, let us recall the features of authorized training, the main learning domains, and how certification paths are integrated into professional development.

Authorized Training


VMware technologies have long served as a foundation of enterprise IT infrastructure — from classic server virtualization to modern hybrid and multi-cloud architectures. Even in the context of significant corporate changes resulting from VMware’s acquisition by Broadcom, the platform continues to play a strategic role in data centers and remains a key building block for scalable, secure, and automated environments.

For organizations and professionals who design, operate, or transform such solutions, practical experience alone is no longer sufficient. A critical factor is structured, vendor-authorized training, built according to the official methodology of the technology owner.

VMware Authorized Training is not a collection of isolated courses, but a cohesive learning ecosystem. Each learning domain corresponds to a specific technology area and professional role – from administrators and support engineers to infrastructure, cloud, and application architects.

VMware after the Broadcom acquisition: Implications for training


Following VMware’s integration into Broadcom, the platform’s development focus has shifted toward enterprise customers, large-scale data centers, and mission-critical workloads. This shift is also reflected in the training model: courses have become more architecture-oriented, scenario-driven, and closely aligned with real-world operational practices.

In this context, authorized training serves a dual purpose. It delivers up-to-date product and platform knowledge while also establishing consistent approaches to infrastructure design, lifecycle management, and long-term operational stability.

Why VMware Authorized Training?


VMware authorized courses are developed directly by the platform vendor and:

  • are based on real-world architectural scenarios, not simplified lab exercises;
  • align with current and strategic VMware (Broadcom) product directions;
  • build competencies required for VMware certification programs;
  • establish a common terminology and methodology for design, operations, and troubleshooting.

As a result, authorized training is an optimal starting point both for professionals new to VMware and for experienced engineers seeking to structure their knowledge or progress to an architectural level.

Core VMware Authorized Training Domains


Core VMware Authorized Training Domains:

  • Datacenter Virtualization: Compute virtualization based on vSphere: ESXi, vCenter, resource management, high availability, scalability, and data center operations.
  • Cloud Management and Automation: Infrastructure and service lifecycle management, monitoring, and automation using VMware Aria (vRealize).
  • Network Virtualization: Software-defined networking with VMware NSX: switching, routing, microsegmentation, and integrated security.
  • Application Modernization: Platforms for modern applications and containers: Kubernetes, Tanzu, and hybrid application architectures.
  • End-User Computing: Virtual desktops, endpoint management, and secure access using Horizon and Workspace ONE.
  • Security: VMware Carbon Black Cloud, VMware NSX Security, Device Security.

Each learning domain – Datacenter Virtualization, Cloud Management and Automation, Network Virtualization, Application Modernization, End-User Computing, Security – has its own certification track, enabling a structured and long-term professional development path.

Each of these learning domains has its own training paths — from foundational courses for administrators to advanced programs for architects and consultants.

VMware Certification as part of the learning journey


VMware Authorized Training is closely integrated with the official VMware certification framework, which validates a professional’s technical readiness to work with enterprise environments. VMware certifications are not an end in themselves – they serve as indicators of proven competencies gained through structured learning and hands-on experience.

Depending on the technology domain and professional role, training paths align with the following certification levels:

  • VMware Certified Professional (VCP): Core professional level for administrators and operations engineers, validating installation, configuration, and daily operations skills.
  • VMware Certified Advanced Professional (VCAP): Advanced level focused on solution design or deployment and optimization, requiring deep architectural understanding.
  • VMware Certified Implementation Expert (VCIX): A combined credential demonstrating both design and implementation expertise within a specific domain.
  • VMware Certified Design Expert (VCDX): The highest architectural certification, confirming the ability to design complex, large-scale, mission-critical VMware solutions.

Target Audience


This series of articles is intended for:

  • VMware infrastructure engineers and administrators;
  • architects of on-premises, hybrid, and cloud solutions;
  • technical leaders and consultants;
  • participants of mentoring and corporate training programs;
  • organizations planning the development or transformation of their infrastructure.

In the following publications, each VMware Authorized Training domain will be reviewed separately, with explanations of roles, skill levels, typical use cases, and the logical progression between courses.

Brief Summary


This article opens the “VMware Training and Certification. Year 2025” series and provides an overview of VMware Authorized Training in the context of VMware by Broadcom. It explains the structure of official learning domains, the role of authorized courses, and how certification paths (VCP, VCAP, VCIX, VCDX) support long-term professional development for administrators, engineers, and architects working with enterprise VMware platforms.

The next article in the series will focus on Authorized Training: Datacenter Virtualization, covering VMware vSphere 8.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Certification, Education, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

VMware Training. Year 2023. Part 18. Introduction. Authorized Training: Virtual Cloud Network: VMware HCX. Brief Summary.

Introduction


Hello to all readers of my blog!

In the previous article of the series “VMware Training. Year 2023″ we considered a list of training programs in the direction of Virtual Cloud Network: vRealize Network Insight.

Today we will talk about the main training programs in the field Virtual Cloud Network: VMware HCX.

VMware HCX


VMware HCX is an application mobility platform designed for simplifying application migration, rebalancing workloads, and optimizing disaster recovery across data centers and clouds.

Key current VMware HCX technology training programs are:

VMware HCX: Management and Operations

  • Duration: 4 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience:
    • System administrators;
    • System engineers;
    • Migration engineers;
    • Migration architects.
  • Prerequisites: This course has the following prerequisites:
    • VMware NSX-T: Install, Configure, Manage [V3.0] or equivalent strong networking experience;
    • VMware vSphere: Install, Configure, Manage [V7];
    • Disaster recovery and business continuity fundamentals.

This four-day course gives you knowledge and practical exercises sufficient to manage VMware HCX and to migrate virtual machines using VMware HCX. The course focuses on configuration and management of VMware HCX. The course equips system administrators with the knowledge, skills, and abilities to achieve competence in migrating virtual machines.

VMware HCX: Deploy, Configure, Manage

  • Duration: 3 days.
  • Level of difficulty: Intermediate (L300).
  • Target audience: System administrators, system engineers, migration engineers, and migration architects.
  • Prerequisites: This course has the following prerequisites:
    • VMware NSX: Install, Configure, Manage [V4.0] or equivalent strong networking experience;
    • VMware vSphere: Install, Configure, Manage [V8];
    • Disaster recovery and business continuity fundamentals.

This three-day training course provides you with the knowledge, skills, and abilities to achieve competence with VMware HCX. This course teaches you how to deploy the different architectural components of HCX, and perform the tasks required to migrate and rebalance workloads across data centers and clouds.

Brief Summary


In this article, we got acquainted with the main training programs in the field of Virtual Cloud Network: VMware HCX.

In the next publication of the cycle “VMware Training. Year 2023″ we will talk about training programs in the field of Anywhere Workspace: Horizon 8.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Cloud, Education, Technology, Training, Virtualization, VMware | Tagged , , , , , , , , , , , | Leave a comment

Anything as Code: Check Uploaded File Hash. Introduction. Function Check-UploadedFileHash. Brief Summary.

Introduction


Hello to all readers of the SDDC and Architecture, Solution, Implementation and Operations as Code blog.

Today, I will continue to talk about such a conceptual approach as Operations as Code as a component of the Anything as Code strategy.

In the previous post, Anything as code: Upload File to ESXi Datasore, I talked about the function that performs the task of uploading a file to the ESXi datasore. Functions are passed to the input the necessary parameters in the form of a variable, changing which you can also use a code reuse strategy.

Today we will take the next step and consider the following situation: The file is uploaded to the datastore of the hypervisor, but during operation we observe some errors. So I want to be sure that the file was uploaded correctly. To do this, you need to calculate the hash of the file and compare it with the correct one.

Moreover, for the efficiency of the work process, this action should be performed on the hypervisor side with the appropriate built-in tools.

So, for your attention, the PowerShell function Check-UploadedFileHash.

Check-UploadedFileHash


So let’s look at the code for the Check-UploadedFileHash function:

Function Check-UploadedFileHash {

<#
.SYNOPSIS
    Check file Hash Uploaded to ESXi datastore.  

.DESCRIPTION
    Check file Hash Uploaded to ESXi datastore. 

.PARAMETER Target
    Name or IP Address of the VMware ESXi.

.PARAMETER File
    Name of file.

.PARAMETER Datastore
    Name of ESXi Datastore.

.PARAMETER Folder
    Name of ESXi Datastore Folder.

.PARAMETER Algorithm
    Algorithm for calculate Hash.

.PARAMETER Hash
    Reference File Hash.

.NOTES
    Version:        0.1
    Author:         Andrii Romanenko
    Website:        blogs.airra.net
    Creation Date:  10.08.2023
    Purpose/Change: Initial script development

    Version:        0.2
    Author:         Andrii Romanenko
    Change Date:    02.01.2024
    Purpose/Change: Purpose/Change: Reorganize Function. Add Workflow Time Measuring External Function: Get-CalculateWorkingTime.
                                                         Add ValidateSet $Algorithm in Input Parameters
                                                         Add Case Algorithm Command and Output
    Version:        0.3
    Author:         Andrii Romanenko
    Change Date:    08.01.2024
    Purpose/Change: Purpose/Change: Reorganize Function. Rename function name to Check-UploadedFileHash and some variables.

.EXAMPLE

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA256"
        Hash      = "23DCCB255FA73CE6E93B12FEFEEFB7204C1681B9A343B51126D3D79F3A34BCD3"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "MD5"
        Hash      = "f104b78019e86e74b149ae5e510f7be9"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA1"
        Hash      = "bc2f7ff5c91c9f0f8676e39e703085c65072139b"
    }
    Check-UploadedFileHash @Parameters

    $Parameters = @{
        Target    = $ESXiHost
        Datastore = $ISODatastore
        Folder    = "ISO\"
        File      = "en_windows_8_1_x64_dvd_2707217.iso"
        Algorithm = "SHA512"
        Hash      = "25446f98ea6cf35e95ecb0cb3ff9584e67c252d78ca0ac98f08e97d9aa62ddf537ea9c55f6e730abfa09b5759c16d4d2a6ad64ff356a62db914495f203b92807"
    }
    Check-UploadedFileHash @Parameters
#>

param ( 
    [Parameter(Mandatory)][string]$Target,
    [Parameter(Mandatory)][string]$File,
    [Parameter(Mandatory)][string]$Datastore,
    [Parameter(Mandatory)][string]$Folder,
    [Parameter(Mandatory)][ValidateSet('SHA1','SHA256','SHA512','MD5')][string]$Algorithm,
    [Parameter(Mandatory)][string]$Hash
)

# Get start time of the Check File Hash operation
$StartTime = Get-Date           
$Message = "Begin Check Hash: "  + $Image + " on Datastore: " + $Datastore + " on Target:" + $Target + "."
Write-Host -ForegroundColor Green $Message

# Check if SSH service on ESXI is running
$SSHServiceStatus = Get-VMHost | Get-VMHostService | Where { $_.Key -eq "TSM-SSH" }
If ($SSHServiceStatus.Running -eq "True")
{
$Message = "SSH Service is running. Nothing To Do."
Write-Host -ForegroundColor Green $Message
}
Else
{
$Message = "SSH Service is NOT running. Starting Service"
Write-Host -ForegroundColor Red $Message
Get-VMHost | Get-VMHostService | Where { $_.Key -eq "TSM-SSH" } | Start-VMHostService
}

# Open SSH session
$Message = "Open SSH Session to host: " + $Target + "."
Write-Host -ForegroundColor Green $Message
$SSHSession = New-SSHSession -ComputerName $Target –AcceptKey -Credential $Script:ESXISessionCredentials

# Check File Hash
$Message = "Begin Calculate Hash of file: " + $File + " on Datastore: " + $Datastore + "." 
Write-Host -ForegroundColor Green $Message

# Get Datasore ID
$DataStoreID = (Get-VMHost | Get-Datastore -Name $Datastore)
$DataStoreID = $DataStoreID.ID.Substring(10)

# Case AlgoritmCommand
Switch ($Algorithm) {
    "SHA1" { $AlgorithmCommand = "sha1sum"}
    "SHA256" { $AlgorithmCommand = "sha256sum"}
    "SHA512" { $AlgorithmCommand = "sha512sum"}
    "MD5" { $AlgorithmCommand = "md5sum"}
}

$SSHCommand = $AlgorithmCommand
$SSHCommand += ' /vmfs/volumes/'
$SSHCommand += $DataStoreID
$SSHCommand += '/'
$SSHCommand += $Folder.Replace("\", "/")
$SSHCommand += $File

$Result = Invoke-SSHCommand -SSHSession $SSHSession -Command $SSHCommand
#Write-Host $Result.Output

# Case Algoritm Output
Switch ($Algorithm) {
    "SHA1" { $HashResult = $Result.Output.Substring(0,40)}
    "SHA256" { $HashResult = $Result.Output.Substring(0,64)}
    "SHA512" { $HashResult = $Result.Output.Substring(0,128)}
    "MD5" { $HashResult = $Result.Output.Substring(0,32)}
}

$Message = "End Calculate Hash of file: " + $File + " on Datastore: " + $Datastore + "." 
Write-Host -ForegroundColor Green $Message

# Check Result
$Message = "Begin Check Hash of file: " + $File + "." 
Write-Host -ForegroundColor Green $Message

$Result=$HashResult.ToUpper().Equals($Hash.ToUpper())

If ($Result -eq "True")
{
$Message = "Hash Valid"
Write-Host -ForegroundColor Green $Message
}
Else
{
$Message = "Hash Not Valid"
Write-Host -ForegroundColor Red $Message
}
$Message = "End Check Hash of file: " + $File + "." 
Write-Host -ForegroundColor Green $Message

# Remove SSH Session
$Message = "Close SSH Session to host: " + $Target + "."
Write-Host -ForegroundColor Green $Message
Remove-SSHSession $SSHSession | Out-Null

# Get end time of the operation
$EndTime = Get-Date

# Calculate Elapsed Time of the operation
Get-CalculateWorkingTime -StartTime $StartTime -EndTime $EndTime
}

The function accepts the following mandatory parameters as input in the form of the @Parameters variable:

  • Target – Name or IP Address of the VMware ESXi;
  • File – Checked File Name;
  • Datastore – Name of ESXi Datastore;
  • Folder – Name of ESXi Datastore Folder;
  • Algorithm – Algorithm for calculate Hash;
  • Hash – Reference File Hash.

At the beginning of work, the start time is fixed in the form of the $StartTime variable.

The function will use the Posh-SSH Powershell module for its work to connect to the ESXi hypervisor and execute commands in the SSH environment. Therefore, the next step is to check whether this service is running on the hypervisor side, and if not, to start it.

This action is performed by standard PowerCLI cmdlets Get-VMHost, Get-VMHostService, Start-VMHostService.

Next, open an SSH session to the ESXi host New-SSHSession. This cmdlet is already from the Posh-SSH module.

For the algorithm to calculate the hash of the file, you will need to specify the path to the location of the file on the ESXi datastore. To do this, you should get a datastore identifier:

$DataStoreID = (Get-VMHost | Get-Datastore -Name $Datastore)

$DataStoreID = $DataStoreID.ID.Substring(10)

Different algorithms can be used to calculate the hash of a file. Their list is limited to the input variable $Algorithm and contains the following values: ‘SHA1′,’SHA256′,’SHA512′,’MD5’.

Depending on the value of the variable, the appropriate command will be used: sha1sum, sha256sum, sha512sum, md5sum. The Switch ($Algorithm) Powershell structure helps in this.

The $SSHCommand variable forms a command that should be sent to the SSH session. The result of the SSH Command goes into the $Result variable.

Depending on the hash calculation algorithm, the variable will contain a text fragment of different lengths. Therefore, depending on the $Algorithm variable, the required number of characters will be allocated. What will correspond to the calculated hash: sha1sumSubstring(0.40), sha256sumSubstring(0.64), sha512sumSubstring(0,128), md5sumSubstring(0,32).

Finally, the calculated hash is compared with the reference value from the $Hash variable. The result is displayed as Hash Valid or Hash Not Valid in green and red, respectively.

At the end of the work, we delete the SSH Session and calculate the duration of work with the Get-CalculateWorkingTime function, which I talked about in the previous post.

The result of the function is shown in the following figure:

Figure 1. The result of the execution of the Check-UploadedFileHash Powershell function

Brief Summary


So, in today’s post, I’ve shared with you some code snippets that demonstrate the strategy and practice of Operations as Code.

I note that you can use this code at your discretion, adding there, for example, verification codes and handling of exceptional situations, etc.

Also, don’t forget that the function requires the presence of the VMware PowerCLI and Posh-SSH.

That’s all for today. Follow the next publications of this direction.

Follow the news until the meeting is on air in a few days.
Sincerely, AIRRA.

Posted in Code, Programming, Technology, Virtualization, VMware | Tagged , , , , , , , , , , , , | Leave a comment