This Python script allows you to fetch the inventory of virtual machines from VMware vCenter, including custom attributes.
- Clone the repository:
git clone https://github.com/your-username/vmware-vm-inventory-fetcher.git
cd vmware-vm-inventory-fetcher- Install dependencies:
pip install -r requirements.txt- Run the script:
python get_details.py- Follow the prompts to enter your vCenter hostname/IP, username, and password.
- Optionally, you can choose to fetch custom attributes as well.
- The script will fetch the VM inventory and save it to vminfo.json in the current directory.
You can configure the script by modifying the following variables in get_details.py:
- ignore_ssl: Set to True if using self-signed certificates.
- fetch_custom_attributes: Set to True if you want to fetch custom attributes.