Skip to main content

Interact easily with your VMWare clusters.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

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:\ProgramData\vmware-reporter\.env (/etc/vmware-reporter/.env on Linux).

Example:

VMWARE_HOST = myvcenter.example.org
VMWARE_USER = reporter@vsphere.local
VMWARE_PASSWORD = ...
VMWARE_NO_SSL_VERIFY = False

Several scopes may be distinguished. Example for two scopes named SCOPE1 and SCOPE2:

VMWARE_SCOPES = SCOPE1,SCOPE2

VMWARE_SCOPE1_HOST = myvcenter1.example.org
VMWARE_SCOPE1_USER = reporter@vsphere.local
VMWARE_SCOPE1_PASSWORD = ...

VMWARE_SCOPE2_HOST = myvcenter2.example.org
VMWARE_SCOPE2_USER = reporter@vsphere.local
VMWARE_SCOPE2_PASSWORD = ...

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 export
  • Reconfigure VMs (mass operation): copy template vm_reconfigure.xlsx to data/vm_reconfigure.xlsx, fill-in this file, then:
vmware-reporter vm reconfigure
  • If you use several scopes, put files in data/SCOPE1/ instead of data/ and specify scope on the command line. Example:
vmware-reporter -e SCOPE1 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

If you're not sure about the file name format, learn more about wheel file names.

vmware_reporter-0.4.0-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for vmware_reporter-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebdf9c4611bee0cf1680cd48cbf0dbe9ec34dacbe3b21b61dd213f856c182826
MD5 9a17f9476d7c3b0583a2ea2118d49d8d
BLAKE2b-256 c07f506416515452d8c54489abda5f3b545158bb07cda1dfb76d01b91a5c26ab

See more details on using hashes here.

Supported by

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