Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashkanrafiee/vmware-inventory-orchestrator
A toolkit for automating VMware VM inventory collection and rack configuration management.
https://github.com/ashkanrafiee/vmware-inventory-orchestrator
Last synced: about 6 hours ago
JSON representation
A toolkit for automating VMware VM inventory collection and rack configuration management.
- Host: GitHub
- URL: https://github.com/ashkanrafiee/vmware-inventory-orchestrator
- Owner: AshkanRafiee
- Created: 2024-03-12T09:56:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-02T10:37:06.000Z (8 months ago)
- Last Synced: 2024-04-02T12:43:06.336Z (8 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VMware Inventory Orchestrator
A toolkit for automating VMware VM inventory collection and rack configuration management.## Overview
This project includes a suite of tools designed to efficiently manage and report on VMware virtual machine (VM) inventories within a data center environment. It consists of a primary script for fetching VM inventory from VMware vCenter and a utility script for managing rack configurations within a `datacenter.json` file.
## Features
- **VMware Inventory Collection:** Automates the collection of VM inventories from VMware vCenter, including details like CPU cores, memory, hard disk information, custom attributes, and IP information.
- **Rack Configuration Management:** Facilitates the addition and update of rack configurations, including ESXi host mappings, through a simple CLI interface.## Requirements
Ensure the following prerequisites are met to use this project:
- Python 3.6+
- pyVmomi 7.0+To install required Python packages:
```bash
pip install -r requirements.txt
```## Installation
Clone this repository to your local machine:
```bash
git clone https://github.com/AshkanRafiee/vmware-inventory-orchestrator.git
cd vmware-inventory-orchestrator
```## Configuration
1. **VMware Inventory Script (`vmware_inventory_orchestrator.py`):** Ready to run out of the box. You'll be prompted for vCenter credentials upon execution.
2. **Datacenter Configuration Update Script (`update_datacenter_config.py`):** Works with `datacenter.json` to update rack and ESXi configurations. No initial setup required beyond the JSON file structure.
## Usage
### Creating/Updating Rack Data
Run the configuration update script to modify `datacenter.json`:
```bash
python update_datacenter_config.py
```Follow the prompts to input the necessary data.
You have to enter all of your racks and ESXis once at least in order to have a full inventory.
## `datacenter.json` Format
The configuration file should adhere to the following format:
```json
[
{
"Rack Name": "Rack1",
"ESXIs": {
"x.y.z.a": {
"Rack Unit": ["U1", "U2"]
}
}
}
]
```### Fetching VM Inventory
Execute the main script from your terminal:
```bash
python vmware_inventory_orchestrator.py
```Enter the vCenter hostname/IP, username, and password when prompted.
## Contributing
We welcome contributions to improve this project. Please open an issue first to discuss potential changes or additions.