Update: Trigger a User event from the VCSA command line

Disclaimer: This is not officially supported by VMware, please use at your own risk.

Recently I faced the challenge with a script running on a VCSA which executes some checks and in case something gets detected it has to trigger a vCenter alarm.

My solution is to log a user event which will be captured by an vCenter alert definition.

1. vCenter alert definition

as trigger manually enter (type): vim.event.GeneralUserEvent

2. The script which will log the user event

#!/usr/bin/python

#!/usr/bin/python

import sys
sys.path.insert(0, '/usr/lib/vmware/site-packages/')
from pyVim.connect import SmartConnect
from pyVmomi import vim
import ssl
import atexit

username = 'administrator@vsphere.local'
password = 'VMware1!'

v = sys.version_info
try:

        if sys.version_info[1] <7 or v.minor < 7:
                si = SmartConnect(host="localhost", user=username, pwd=password)
                content = si.RetrieveContent()
                ds = content.rootFolder
                log = si.content.eventManager.LogUserEvent(entity=ds, msg="Postgres Corruption detected")
        else:
                s = ssl.SSLContext(ssl.PROTOCOL_TLS)
                s.verify_mode = ssl.CERT_NONE
                si = SmartConnect(host="localhost", user=username, pwd=password, sslContext=s)
                content = si.RetrieveContent()
                ds = content.rootFolder
                log = si.content.eventManager.LogUserEvent(entity=ds, msg="Postgres Corruption detected")
except:
        print("Unexpected error:", sys.exc_info()[0])

Result:

The resulting alert can be catched by vROPs and trigger further events/ tickets.

VMware has released vSphere Integrated Containers 1.3

Yesterday VMware released version 1.3 of the vSphere Integrated Containers. The version enhances stability and delivers a new graphical-user interface to guide users through the creation of a Virtual Container Host (VCH).

Please find the details in the original post on the VMware blog: VMware Blog

ESX IP STORAGE TROUBLESHOOTING BEST PRACTICE

VMware has released a new White paper about ESXi IP storage troubleshooting.

In this paper, we:
• Describe how you can analyze packet traces to identify functional and performance issues in an
ESX IP storage environment.
• Compare packet capture alternatives, and explain why we recommend an inline optical network
tap connected to a packet capture system.
• Present the challenges of 10G packet capture, and describe key features of commercial 10G
capture solutions.
• Describe the design of an inexpensive, self-assembled 10G packet capture solution optimized for
troubleshooting that you can build relatively easily. We also describe our experience with multiple
prototypes of this design, which we have used in our ESX IP storage testbeds for NFS and iSCSI
performance for many years.
• Present examples of analyzing packet traces to solve ESX performance issues for NFSv41, software
iSCSI over IPv6, and hardware iSCSI.

ESX-IP-storage-troubleshooting.pdf

Storage and Availability Technical Documents

VMware Whitepapers about Storage and Availability.

vMSC Best Practices – https://storagehub.vmware.com/#!/vsphere-storage/vmware-vsphere-r-metro-storage-cluster-recommended-practices
vSphere APIs for IO Filtering – https://storagehub.vmware.com/#!/vsphere-storage/vmware-vsphere-apis-for-i-o-filtering-vaio
VMFS – https://storagehub.vmware.com/#!/vsphere-storage/vmware-vsphere-vmfs
VAAI – https://storagehub.vmware.com/#!/vsphere-storage/vmware-vsphere-apis-array-integration-vaai-1
iSCSI – https://storagehub.vmware.com/#!/vsphere-storage/best-practices-for-running-vmware-vsphere-on-iscsi

New Whitepaper: VMware vSphere® Metro Storage Cluster Recommended Practices

VMware has released a new Whitepaper about Metro Storage Clusters.

“An overview of the definition, functionalities and capabilities of VMware vSphere Metro Storage Cluster configuration that is a specific storage configuration combining replication.”

VMware vSphere® Metro Storage Cluster Recommended Practices