Skip to main content

Interact easily with your VMWare clusters.

Project description

VMWare-reporter

Interact easily with your VMWare clusters.

Installation

VMWare-reporter package is published on PyPI:

pip install vmware-reporter

Optionaly, use specifier [excel] to also install dependencies for reading and writing Excel files:

pip install vmware-reporter[excel]

Configuration

Create file C:\Users\$USER\AppData\Local\vmware-reporter\vmware-reporter.conf (/home/$USER/.config/vmware-reporter/vmware-reporter.conf on Linux).

Example:

[vmware-reporter]
host = myvcenter.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True

Several environments may be distinguished. Example for two environments named ENV1 and ENV2:

[vmware-reporter:ENV1]
host = myvcenter.env1.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True

[vmware-reporter:ENV2]
host = myvcenter.env2.example.org
user = reporter@vsphere.local
password = ...
no_ssl_verify = True

Usage examples

See also full documentation (including API reference).

VMWare-reporter may be used as a library in your Python code:

from vmware_reporter import VCenterClient
with VCenterClient() as vcenter:
    for vm in vcenter.iterate_objs('vm'):
        print(vm.name)

VMWare-reporter may also be invoked as a command-line application (the vmware-reporter executable is installed with the package). Examples:

  • Export inventory of VMWare managed objects to a YAML file:
vmware-reporter inventory
  • Export all available information about VMWare managed objects to JSON files:
vmware-reporter dump
  • Reconfigure VMs (mass operation): copy template vms_reconfigure.xlsx to data/vms_reconfigure.xlsx, fill-in this file, then:
vmware-reporter vm reconfigure
  • If you use several environments, put files in data/ENV1/ instead of data/ and specify environment on the command line. Example:
vmware-reporter -e ENV1 vm reconfigure

Complete help about command-line usage may be displayed by typing:

vmware-reporter --help

Run every day (using a systemd timer)

Copy vmware-reporter.service, vmware-reporter.timer and notify-email@.service in /etc/systemd/system and adapt them to your configuration.

Run:

sudo systemctl daemon-reload
sudo systemctl enable vmware-reporter.timer
sudo systemctl start vmware-reporter.timer

Credits

This library leverages pyvmomi, the vSphere API Python bindings provided by VMWare.

Legal

This project is licensed under the terms of the MIT license.

This project is not affiliated in any way with VMWare or Broadcom.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

vmware_reporter-0.3.1-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file vmware_reporter-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vmware_reporter-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aae6c0b7d0c85e56ad4cd5307c1d198ba0dbf0826af0816246851f719cff5500
MD5 3b8d4133868cafe1b0c75cfc59965143
BLAKE2b-256 5b552e649e52b3b75a8db79029f4d803a390fff6d9cc71b0745f8413dad3a3fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page