This technical document provides best practices and configuration guidance for implementing VMware Virtual Volumes (vVols) in a Metro/Stretched Storage Cluster environment using vSphere 8. It explores how to properly configure vSphere High Availability (HA), Distributed Resource Scheduler (DRS), and storage components across two data centers to ensure workload availability and balanced resource usage. The paper also details various failure scenarios and their handling, emphasizing the importance of proper site affinity configuration and VASA Provider availability for optimal cluster performance.
Quicksearch
Tuesday, December 24. 2024
Metro/Stretched Storage Clustering Best Practices with Virtual Volumes (vVols) on VMware vSphere 8
Thursday, December 12. 2024
Protecting and Recovering Mission-Critical Applications in a VMware Hybrid Cloud with VMware Live Site Recovery
This guide provides comprehensive documentation of the considerations and configuration steps required for using VMware Live Site Recovery (VLSR) to protect and recover a reference multi-tiered set of business-critical applications from a source VMware datacenter (on-premises or cloud-based) to a supported target VMware datacenter (on-premises or cloud-based), with the least cost (time, financial, and administrative intervention) possible.
Monday, November 18. 2024
VMware Cloud Foundation Automation ABX Actions for Ansible Automation Platform - User Guide
Overview
The VMware Cloud Foundation (VCF) Automation ABX Actions for Ansible Automation Platform Deployment Guide provides comprehensive instructions for leveraging the sample Aria custom resource to interact with the Red Hat Ansible Automation Platform effectively.
Intended Audience
This guide is designed for experienced data center cloud administrators and automation developers who work with VMware Aria Automation to create automated solutions for their organizations. Familiarity with the following technologies and concepts is essential:
- VMware Aria Automation: Expertise in using and developing with Aria Automation Assembler.
- Red Hat Ansible Automation Platform: Proficiency in managing users, organizations, and integrating with version control platforms like GitLab and GitHub. Understanding Ansible inventories and components, as well as developing and using playbooks for configuration management.
- Python 3: A solid understanding of Python 3 and its associated packages.
- YAML: Familiarity with YAML syntax and data types.
Tuesday, September 17. 2024
Performance Best Practices for VMware vSphere 8.0 Update 3
Introducing Performance Best Practices for VMware vSphere 8.0 Update 3 – a valuable resource packed with expert tips to optimize the performance of VMware vSphere 8.0 Update 3. While it isn’t a comprehensive guide for planning and configuring your deployments, it offers crucial insights into enhancing performance across key areas.
Here’s a quick overview of what you’ll find inside:
-
Chapter 1: Hardware for Use with VMware vSphere (Page 11) – Discover essential tips for selecting the right hardware to get the most out of your vSphere environment.
-
Chapter 2: ESXi and Virtual Machines (Page 25) – Dive into best practices for VMware ESXi™ software and the virtual machines operating within it.
-
Chapter 3: Guest Operating Systems (Page 57) – Learn about optimizing the guest operating systems running on your vSphere virtual machines.
-
Chapter 4: Virtual Infrastructure Management (Page 69) – Gain insights into effective management practices for maintaining a high-performance virtual infrastructure.
Whether you're aiming to fine-tune your setup or just looking for ways to boost efficiency, this book is an excellent reference for ensuring your VMware vSphere environment performs at its best.
Sunday, June 9. 2024
Ensuring High Availability and Disaster Recovery in NSX-T Management Cluster
Introduction
Maintaining the availability of the NSX-T management cluster is crucial for ensuring the stability and performance of your virtualized network environment. This blog post will explore strategies to ensure high availability (HA) of NSX-T managers, outline the recovery process during failures, and discuss best practices for disaster recovery.
NSX-T Management Cluster Overview
The NSX-T management cluster typically consists of three nodes. This configuration ensures redundancy and fault tolerance. If one node fails, the cluster retains quorum, and normal operations continue. However, the failure of two nodes can disrupt management operations, requiring swift recovery actions.
High Availability in NSX-T Management Cluster
- Quorum Maintenance:
- The management cluster needs at least two out of three nodes operational to maintain quorum. This ensures that the NSX Manager UI and related services remain available.
- If a node fails, the remaining two nodes can still communicate and manage the environment, preventing downtime.
- Node Failures and Impact:
- Single Node Failure: The cluster continues to function normally with two nodes.
- Two Nodes Failure: The cluster loses quorum, and the NSX Manager UI becomes unavailable. Management operations via CLI and API will also fail.
Recovery Strategies
When a majority of the nodes fail, swift action is required to restore the cluster to a functional state.
- Deploying a New Manager Node:
- Deploy a new manager node as a fourth member of the existing cluster.
- Use the CLI command detach node <node-uuid> or the API endpoint /api/v1/cluster/<node-uuid>?action=remove_node to remove the failed node from the cluster.
- This command should be executed from one of the healthy nodes.
- Deactivating the Cluster (Optional):
- Run the deactivate cluster command on the active node to form a single-node cluster.
- Add new nodes to restore the cluster to its three-node configuration.
Best Practices for Disaster Recovery
- Regular Backups:
- Schedule regular backups of the NSX Manager configurations to facilitate quick recovery.
- Store backups securely and ensure they are easily accessible during a disaster recovery scenario.
- Geographical Redundancy:
- Deploy NSX Managers across multiple sites to ensure geographical redundancy.
- In case of a site failure, the other site can take over management operations with minimal disruption.
- Proactive Monitoring:
- Use NSX-T's built-in monitoring tools and integrate with third-party solutions to continuously monitor the health of the management cluster.
- Early detection of issues can prevent major failures and reduce downtime.
- Disaster Recovery Sites:
- Prepare a disaster recovery site with standby NSX Managers configured to recover from backups.
- This setup allows for quick restoration and ensures continuity of operations in case of a primary site failure.
Conclusion
Ensuring the high availability and disaster recovery of your NSX-T management cluster is essential for maintaining a robust and resilient virtual network environment. By following best practices for node management, deploying a geographically redundant setup, and maintaining regular backups, you can minimize downtime and ensure swift recovery from failures.
For a deeper dive into the technical details, check out these resources:
- VMware NSX-T Data Center Documentation
- Backup and Restore of VMware Cloud Foundation
- NSX Manager cluster is DOWN or UNAVAILABLE if all nodes part of the the NSX Manager cluster is down or majority nodes are down
In this video, I'll demonstrate these concepts in action, explore various failure scenarios, and discuss disaster recovery strategies in detail. You can obtain a copy of the original Excalidraw whiteboard file along with the presentation slides in both PDF and PowerPoint formats from GitHub.
Friday, April 12. 2024
CoolTool: VirtualC64
Function: Transforms an Apple Macintosh into a Commodore 64.
Emulation Focus: Prioritizes PAL accuracy, supports both PAL and NTSC.
Web Assembly
Compatibility: Designed to run as a WebAssembly, operable directly in browsers.
Access: Enables playing games and viewing demos with a few clicks.
History
Origin: Started as a virtual CPU environment for computer engineering courses.
Evolution: Gained accuracy over time, becoming a comprehensive emulator.
Philosophy
Ease of Use: Bridging the gap between emulated and real machines with a simple interface.
Code Quality: Maintains high standards for system-level functionality.
Open Source: Available freely under open-source principles.
ROMs
Initial Setup: Requires adding four ROM images via drag-and-drop on first launch.
Copyright: ROMs not pre-installed due to ambiguous copyright status but compatible with VICE ROMs.
Free ROM Replacements
Alternative: Free ROMs from the Mega65 project available, installable via the ROM configuration panel.
Input Devices
Joystick Options: Supports keyboard emulation or external USB joysticks (e.g., Speedlink Competition Pro, Sony Dualshock 4).
Additional Support: Compatible with the RetroFun! USB adapter for original Commodore joysticks.
Media Formats
Supported Types: Handles all common C64 formats like D64, T64, PRG, P00, G64, TAP (datasette tapes), and CRT (cartridges).
Continue reading "CoolTool: VirtualC64" »Monday, January 15. 2024
Streamlining vSphere Operations with ChatGPT
In this article, we'll explore how ChatGPT can automate the generation of a Python script for managing the power states of virtual machines within VMware vCenter. To initiate, you need to prompt ChatGPT to generate a script by posing the question:
Could you develop a Python script for VMware vCenter to retrieve the virtual machines and allow the user to control their power states? The server details are: host name 'vc.ntpro.local', username 'administrator@ntpro.local', password 'VMware1!' Please ignore certificate errors and use tls.
ChatGPT's response will be affirmative, recommending the use of the pyvmomi library to interface with VMware vCenter. It will advise on installing the pyvmomi library via pip, if not already done so.
You can find the complete Python code through this link.
For Python project management, I prefer the PyCharm Community Edition. The pyvmomi module is crucial for our tasks and can be conveniently installed via the terminal with 'pip install pyvmomi'
. PyCharm also offers a GUI for handling Python packages.
After generating a new Python file, insert the ChatGPT-provided script into PyCharm's editor. Execution may require some adjustments, like updating TLS versions. Should errors arise, ChatGPT is equipped to troubleshoot and provide solutions. Once the refined script is implemented, it successfully retrieves and manages the power states of the virtual machines from vCenter.
In a subsequent step, I prompted ChatGPT to integrate a basic GUI into the script using the pre-installed TKInter module from Python3. The resulting interface displays a virtual machine list with functional power controls. Despite a minor glitch with the "wait task" during the demonstration, the core functionality was unaffected.
Remember, repeated queries won't yield identical results when soliciting code from ChatGPT. Precision in your inquiries enhances ChatGPT's ability to generate effective code. If your code encounters issues, ChatGPT can help debug and even elucidate the script's workings in depth. Enjoy coding!
Continue reading "Streamlining vSphere Operations with ChatGPT" »
Friday, January 12. 2024
Setting Up ESXi ARM on the Raspberry Pi 5
In this article, we explore the innovative implementation of VMware's ESXi ARM on the Raspberry Pi 5. The focus is on setting up ESXi ARM on the Raspberry Pi 5, which was initially challenged by a lack of UEFI support. This obstacle is surmounted by Mario Bălănică's development of a Raspberry Pi 5-specific UEFI bios. The setup process is detailed, emphasizing the necessity of an external USB network adapter, and the steps from microSD card preparation to management network configuration.
In 2018, Pat Gelsinger, then CEO of VMware, made a groundbreaking announcement at the VMworld keynote presentation in Las Vegas, revealing the ability to operate ESXi on a Raspberry Pi. Following the presentation, I connected with Alexander Fainkichen, a pivotal contributor to the initiative, for a sit-down interview. As a presenter for VMworld TV at a time when edge computing was surging in popularity, I had the opportunity to delve into the subject. The full interview remains accessible on VMware’s Explore channel.
‘Back at Vegas, people asked us in jest whether the Pi could ever run ESX. We decided it was worth showing that it is possible. ESX on Pi is a promise that VMware understands that the Edge includes extremely low end devices as well. Scaling with the workload and envo is important!’
I recently acquired the cutting-edge Raspberry Pi 5, aiming to set up ESXi ARM. It was tailored for the Raspberry Pi 4, but initial attempts to operate it on the Raspberry Pi 5 were met with a challenge due to the absence of UEFI support.
However, this scenario changed about a week back when Mario Bălănică, associated with the Windows on Raspberry (WoR) project, unveiled a UEFI bios specially designed for the Raspberry Pi 5. This critical development has enabled the device to install ESXi ARM.
Before proceeding, it's important to note a few prerequisites. The Raspberry Pi 5's built-in network adapter is marked an unsupported UEFI peripheral, necessitating the use of an external USB network adapter. For my setup, I chose the Maxonar USB C Ethernet Adapter, which offers reliable Gigabit LAN connectivity.
The installation procedure is quite direct. Begin by copying the UEFI files onto a microSD card formatted to FAT32. Next, transfer the ISO contents of the ESXi ARM installer onto a FAT32-compliant USB drive. Once you power up the Raspberry Pi, the installation should initiate on its own.
During my initial setup, the installation paused at 81%, hindered by the lack of a network adapter for the management network. This hiccup is overcome on the first reboot, where the USB network adapter is recognized, allowing the configuration of the management network thereafter.
The storage setup utilizes a USB interface, connecting through a robust "UGREEN M.2 Adapter NVMe SSD Hard Drive Enclosure" which houses a swift "Samsung SSD 256GB PM991 M.2 2242 42mm PCIe 3.0 x4 NVMe" drive. This USB drive plays a triple role: it's the install-boot media, the destination for the ESXi install, and the local storage for VMFS (Virtual Machine File System). You can leave it inserted after the installation completes. In future enhancements, I plan to integrate the Samsung SSD into my setup more seamlessly, using the PineBerry m.2 HATDrive, interfaced via NVMe.
In this video, I've captured the entire installation process from beginning to end, and it takes just 5 minutes to complete. The recording was done using a Video Capture Card, a Guermok USB 3.0 HDMI to USB C Audio Capture Card, and QuickTime on a Mac.
Once the installation is finalized, the next step is to start running virtual workloads. My first action was to set up a Photon virtual machine; VMware conveniently provides an ARM-compatible OVA file. The process is hassle-free, since I'm using Virtual Center to manage the ARM-based ESXi host—just a few clicks and the virtual machine springs to life.
The subsequent hurdle was setting up a Windows environment. Locating an ARM-compatible Windows ISO proved challenging, but after a diligent search, I found one. I uploaded the ISO to the local data store and configured a Windows VM. The installation of Windows was time-consuming, and the initial startup was even more prolonged. Eventually, a blue screen error interrupted the process, which requires further investigation.
Initially, I operated on a Raspberry Pi 5 with 4 GB of RAM, but soon transitioned to a more robust 8 GB model to accommodate additional VM workloads. Monitoring of the vCenter server is conducted through Aria Operations, which allows me to keep an eye on the ESXi ARM host and virtual machines via comprehensive dashboards. I've also set up Aria Operations for log management, simplifying the troubleshooting process.
In summary, the article showcases the advancements and challenges in setting up and running ESXi ARM on the Raspberry Pi 5. It highlights the technical requirements, the setup process, and the potential for hosting various virtual workloads, along with the importance of continuous monitoring and system optimization. Special thanks to Jimmy van der Mast for providing technical expertise.
Continue reading "Setting Up ESXi ARM on the Raspberry Pi 5" »Tuesday, January 9. 2024
Mastering vCenter Operations with Python: A Script to Manage Your VMs
In the ever-evolving landscape of virtualization management, efficiency is key. VMware's vCenter Server is the heart of many virtual environments, orchestrating a symphony of VMs with precision. But what if you could take vCenter's capabilities to the next level? Enter Python – the versatile scripting language that speaks directly to vCenter, unlocking a new realm of automation and control.
Python is more than just a programming language; it's a gateway to automation. With the Python SDK for VMware, known as PyVmomi, you can script complex operations that manage your virtual machines, all within the comfort of Python’s syntax. Whether you’re looking to power on a fleet of VMs, take snapshots before a big update, or gracefully shut down systems for maintenance, Python and PyVmomi make it possible with minimal effort.
Imagine a script that not only lists all VMs registered in your vCenter but also offers you the control to power them on, suspend, resume, or even take a snapshot. This is not a mere imagination anymore; it's a reality that I've crafted into a Python script. This script is your remote control to vCenter, putting the power of virtual machine management at your fingertips.
The script starts by connecting to your vCenter server using your credentials. Once authenticated, it fetches a list of all VMs and displays them neatly. Here's where the interactivity comes in – you choose a VM and decide what to do with it. Want to power it on or shut it down? Just a command away. Need to suspend or resume it? A simple input does the job. Looking to create a snapshot? It’s just as easy.
from pyVim.connect import SmartConnect, Disconnect
from pyVmomi import vim
import ssl
import atexit
# vCenter Server details
vc_server = 'vc.ntpro.local'
username = 'administrator@ntpro.local'
password = 'VMware1!'
# Disable SSL certificate verification (for demo purposes only, not recommended for production)
context = ssl._create_unverified_context()
# Function to connect to vCenter
def connect_to_vcenter(server, user, password):
si = SmartConnect(host=server, user=user, pwd=password, sslContext=context)
atexit.register(Disconnect, si)
return si
# Function to get all VMs
def get_all_vms(si):
content = si.RetrieveContent()
container = content.viewManager.CreateContainerView(content.rootFolder, [vim.VirtualMachine], True)
return container.view
# Power operations for the VM
def power_on_vm(vm):
if vm.runtime.powerState != vim.VirtualMachinePowerState.poweredOn:
task = vm.PowerOnVM_Task()
wait_for_task(task)
print(f"VM '{vm.name}' is powered on.")
else:
print(f"VM '{vm.name}' is already powered on.")
def power_off_vm(vm):
if vm.runtime.powerState != vim.VirtualMachinePowerState.poweredOff:
task = vm.PowerOffVM_Task()
wait_for_task(task)
print(f"VM '{vm.name}' is powered off.")
else:
print(f"VM '{vm.name}' is already powered off.")
def suspend_vm(vm):
if vm.runtime.powerState == vim.VirtualMachinePowerState.poweredOn:
task = vm.SuspendVM_Task()
wait_for_task(task)
print(f"VM '{vm.name}' is suspended.")
else:
print(f"VM '{vm.name}' cannot be suspended because it is not powered on.")
def resume_vm(vm):
if vm.runtime.powerState == vim.VirtualMachinePowerState.suspended:
task = vm.PowerOnVM_Task()
wait_for_task(task)
print(f"VM '{vm.name}' is resumed.")
else:
print(f"VM '{vm.name}' is not suspended.")
def create_snapshot(vm):
task = vm.CreateSnapshot_Task(name='Snapshot', description='Created by script', memory=False, quiesce=False)
wait_for_task(task)
print(f"Snapshot for VM '{vm.name}' created.")
# Wait for vCenter task to complete
def wait_for_task(task):
task_done = False
while not task_done:
if task.info.state == vim.TaskInfo.State.success:
return
if task.info.state == vim.TaskInfo.State.error:
print(f"Task failed: {task.info.error}")
raise Exception("Task failed")
# Main script logic
if __name__ == "__main__":
si = connect_to_vcenter(vc_server, username, password)
vms = get_all_vms(si)
vms_dict = {vm.name: vm for vm in vms}
print("List of VMs:")
for vm_name in vms_dict.keys():
print(vm_name)
selected_vm_name = input("Enter the name of the VM you wish to manage: ")
vm = vms_dict.get(selected_vm_name)
if vm:
print(f"Selected VM: {selected_vm_name}")
action = input("Choose an action: (on) Power On, (off) Power Off, (suspend) Suspend, (resume) Resume, (snapshot) Create Snapshot: ").lower().strip()
if action == 'on':
power_on_vm(vm)
elif action == 'off':
power_off_vm(vm)
elif action == 'suspend':
suspend_vm(vm)
elif action == 'resume':
resume_vm(vm)
elif action == 'snapshot':
create_snapshot(vm)
else:
print("Invalid action selected.")
else:
print(f"VM '{selected_vm_name}' not found.")
The script is designed with safety and ease of use in mind, leveraging Python’s clear syntax and PyVmomi’s powerful bindings to the vSphere API. It’s a tool that can be expanded, customized, and integrated into larger workflows or dashboards. I'm hosting the source code, along with some screenshots on my GitHub page.
Continue reading "Mastering vCenter Operations with Python: A..." »Saturday, December 23. 2023
TensorFlow Management Pack For VMware Aria Operations
I've successfully connected a Raspberry Pi 5 running TensorFlow to VMware Aria Operations, and I'm excited to share the simplicity of the process. The new Management Pack Builder from VMware transforms the creation of custom management packs into a straightforward task. This intuitive tool, which requires no coding skills, invites us to extend the capabilities of our monitoring systems with ease. Join me as we explore how this setup can revolutionize your operational management, making it more efficient and responsive to your needs.
The VMware Aria Operations Management Pack Builder is a self-contained tool designed to facilitate the development of bespoke management packs for VMware Aria Operations. It offers a user-friendly, code-free approach to importing data from external APIs. This tool allows the creation of new resources or the enhancement of existing VMware and third-party resources by adding new data, establishing relationships, and integrating events.
TensorFlow, renowned for its versatility in machine learning, is particularly effective for object detection projects on Raspberry Pi. This lightweight platform seamlessly integrates with the modest hardware of the Raspberry Pi, making it ideal for real-time object detection tasks. By utilizing a camera module with TensorFlow, users can develop efficient, on-device models capable of identifying and categorizing objects in the camera's field of view.
The Raspberry Pi 5 uses a Python script tailored for object detection, processing images from its camera into structured JSON data. Additionally, it operates a web server that presents a REST API to Aria Operations, enabling the collection and statistical analysis of object detection data processed by TensorFlow.
{"person": 1, "bicycle": 0, "car": 17, "motorcycle": 0, "airplane": 0, "bus": 0, "train": 0, "truck": 1, "boat": 0, "traffic": 0, "fire": 0, "stop": 0, "parking": 0, "bench": 0, "bird": 0, "cat": 0, "dog": 0, "horse": 0, "sheep": 0, "cow": 0, "elephant": 0, "bear": 0, "zebra": 0, "giraffe": 0, "backpack": 0, "umbrella": 0, "handbag": 0, "tie": 0, "suitcase": 0, "frisbee": 0, "skis": 0, "snowboard": 0, "sports": 0, "kite": 0, "baseball": 0, "skateboard": 0, "surfboard": 0, "tennis": 0, "bottle": 0, "wine": 0, "cup": 0, "fork": 0, "knife": 0, "spoon": 0, "bowl": 0, "banana": 0, "apple": 0, "sandwich": 0, "orange": 0, "broccoli": 0, "carrot": 0, "hot": 0, "pizza": 0, "donut": 0, "cake": 0, "chair": 0, "couch": 0, "potted": 0, "bed": 0, "dining": 0, "toilet": 0, "tv": 0, "laptop": 0, "mouse": 0, "remote": 0, "keyboard": 0, "cell": 0, "microwave": 0, "oven": 0, "toaster": 0, "sink": 0, "refrigerator": 0, "book": 0, "clock": 0, "vase": 0, "scissors": 0, "teddy": 0, "hair": 0, "toothbrush": 0}
The package file and the corresponding Python code can be accessed and downloaded from my GitHub repository. You can find guidance on setting up TensorFlow on a Raspberry Pi in a previous article I have authored.
Continue reading "TensorFlow Management Pack For VMware Aria..." »