In a scaling VMware environment, knowing your resource status isn’t just a daily task; it’s a necessity for security, capacity planning, and disaster recovery. If your VM data remains trapped inside the vCenter UI, you’re one step behind.
This guide skips the fluff and provides four professional methods of how to export your entire VM list, from simple GUI exports to high-speed automation. Whether you need a quick status report or a deep-dive technical audit, these technician-tested methods will help you take control of your infrastructure data instantly.
How to Export VM List from vCenter via vSphere Client
For most administrators, the built-in vSphere Client GUI is the quickest way to perform a vSphere export virtual machine inventory. This method requires no scripting knowledge and works directly within your browser.
This method is best for quick audits, non-technical managers who need a status report, or small environments where automation isn’t yet a priority. It’s the perfect right-now solution for a clean inventory snapshot.
Step-by-Step Guide
The steps vary slightly depending on your vCenter version. Here is how to handle modern environments:
- Log in to the vSphere Client (Web Client: https://<vCenter-IP>/ui; Desktop Client: vSphere Client 6.7+).
- In the left-hand navigation menu, select Inventory and navigate to VMs and Templates.
- Use the top filter to select All VMs (ensure all VMs are visible—adjust pagination if needed).
- Click the Export button (usually looks like a tray with an upward arrow)next to the search bar.
- A window will appear. Select your desired columns and choose the format (CSV is standard).
- Click Save to export the complete VM list.
Pros of Exporting VM List via vSphere Client
- Speed: Takes less than a minute to complete.
- User-Friendly: No technical coding or PowerCLI installation required.
- Native Tooling: No need to trust third-party scripts or external software.
Cons of Exporting VM List via vSphere Client
- Limited Customization: You can only export what you see on the screen. It is not easy to include deep technical details like specific MAC addresses or individual disk paths.
- Manual Process: Cannot be easily scheduled; you need to log in and click the buttons every time.
How to Export All VM List with PowerCLI
If you are managing more than a handful of hosts, PowerCLI is the gold standard. It is VMware’s official command-line tool, built on PowerShell. PowerCLI allows you to customize specific data fields and handle thousands of VMs in seconds—tasks that would be tedious in a GUI.
Using PowerCLI to export the list from vCenter is a great way to ensure your inventory data is clean, repeatable, and ready for professional reporting.
Step-by-Step Instructions
Step 1: Install PowerCLI
If you haven’t used it before, open PowerShell as an Administrator and run:
Install-Module -Name VMware.PowerCLI -Scope CurrentUser -Force
Step 2: Connect to your vCenter Server
Replace the placeholders with your actual server details:
Connect-VIServer -Server <vCenter-IP/FQDN> -User <Username> -Password <Password>
Step 3: Export All VMs (Basic List)
This command grabs the standard details and saves them to a CSV:
Get-VM | Export-Csv -Path "C:\vCenter_VM_List.csv" -NoTypeInformation -Encoding UTF8
Step 4: Export Custom Fields (The Professional Way)
Admins often need specific details like IP addresses and UUIDs for inventory mapping. Use this advanced script:
Get-VM | Select-Object Name, @{N="IP Address";E={$_.Guest.IPAddress -join ","}}, NumCpu, MemoryGB, VMHost, Datastore, UUID | Export-Csv -Path "C:\Custom_VM_List.csv" -NoTypeInformation -Encoding UTF8
Step 5: Disconnect (Best Practice)
Always close your session when finished to free up vCenter resources:
Disconnect-VIServer -Server * -Confirm:$false
Pros of Exporting All VM List with PowerCLI
- Massive Scalability: Easily exports 1,000+ VMs without the browser hanging.
- Fully Customizable: You choose exactly which data columns (like RAM, CPU, or UUID) to include.
- Automation Ready: Perfect for scheduled weekly reports.
Cons of Exporting All VM List with PowerCLI
- Learning Curve: Requires basic familiarity with PowerShell.
- Setup: Requires a one-time installation of the PowerCLI module.
How to Export VM List from vCenter Using REST API
For developers and DevOps engineers, using the vCenter REST API to export VM list is the most powerful choice. With the vSphere Automation API, you can integrate inventory data directly into custom dashboards, CMDBs, or CI/CD pipelines without relying on manual tools.
Step-by-Step Instructions (Python Example)
To use this method, you will need Python installed along with the requests library. This script handles authentication, data retrieval, and CSV generation.
Step 1: Authenticate and Get a Session Token
First, establish a secure session with vCenter to receive an authentication token.
import requests
import csv
from requests.packages.urllib3.exceptions import InsecureRequestWarning
# Disable SSL warnings for self-signed certificates
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
vcenter_ip = "<vCenter-IP>"
username = "<Username>"
password = "<Password>"
# Get auth token
auth_url = f"https://{vcenter_ip}/rest/com/vmware/cis/session"
response = requests.post(auth_url, auth=(username, password), verify=False)
token = response.json()["value"]
headers = {"vmware-api-session-id": token}
Step 2: Fetch VM Data
Once authenticated, we query the vcenter/vm endpoint to pull the raw inventory data.
vm_url = f"https://{vcenter_ip}/rest/vcenter/vm"
vm_response = requests.get(vm_url, headers=headers, verify=False)
vm_data = vm_response.json()["value"]
Step 3: Parse and Export to CSV
Finally, loop through the JSON response and write the specific fields to a local CSV file.
with open("vCenter_VM_List_API.csv", "w", newline="", encoding="utf8") as f:
writer = csv.writer(f)
# Define headers
writer.writerow(["VM Name", "Power State", "CPU Count", "Memory (GB)"])
for vm in vm_data:
# Convert MiB to GB for better readability
memory_gb = vm.get("memory_size_MiB", 0) / 1024
writer.writerow([vm["name"], vm["power_state"], vm["cpu_count"], memory_gb])
print("Export Complete: vCenter_VM_List_API.csv")
Pros of Using vCenter REST API:
- Deep Integration: Perfect for feeding VM data into other software.
- High Performance: Faster than the GUI for extremely large, global environments.
- Platform Independent: Works on Linux, macOS, or Windows—anywhere you can run Python.
Cons of Using vCenter REST API:
- Technical Barrier: Requires programming knowledge (Python, JavaScript, or similar).
- Overkill for Basics: If you only need a list once, Method 1 or 2 is much faster.
Export VM List from vCenter with Third-Party Tools
For administrators who need more technical depth or platform-specific flexibility, these two tools are industry favorites for extracting vCenter data.
- RVTools is a free Windows utility that provides a highly detailed “snapshot” of your environment. Instead of a simple list, it exports a multi-tabbed Excel spreadsheet covering everything from VM CPU and memory to snapshots and “zombie” files. It is the best choice for deep-dive health checks and capacity planning.
- govc is an official VMware open-source binary written in Go. It is designed for Linux and macOS users who need a fast, dependency-free way to query vCenter. Because it doesn’t require a GUI or PowerShell, it is perfect for quick inventory checks via the Linux terminal or simple shell scripts.
Secure VMware Data Management with i2Backup
Exporting your VM list is the first step toward infrastructure visibility, but visibility alone doesn’t prevent data loss. Once you have identified your critical workloads through an inventory export, the next priority is ensuring they are protected.
i2Backup provides a seamless transition from “knowing what you have” to “protecting what you have” with a robust, agentless backup solution.
- Centralized Management: Through the management interface of i2Backup, you can centrally manage the backup and restore tasks of virtual machines in multiple virtualization environments.
- Flexible Backup Strategies: Supports various backup strategies, including full backup, incremental backup, and differential backup, to meet the needs of different scenarios.
- Instant Recovery: Directly run VMs from VMware backups after a data disaster without waiting for long-time full restoration, enabling business restoration in minutes.
- Automated Tasks: Supports high-precision scheduling—by the minute, hour, day, or week. This automation eliminates manual intervention and ensures your VM inventory is protected around the clock without human error.
Conclusion
Choosing the right export method depends on your goal: use the vSphere Client for speed, PowerCLI for scale, the REST API for integration, or third-party tools for deep audits.
However, remember that a CSV file is just a snapshot. To truly master your environment, use that inventory to build a resilient data strategy. Transitioning from manual tracking to an automated, agentless solution like i2Backup ensures that every VM you’ve identified is not only accounted for but also fully protected and recoverable. Stop just listing your assets—start securing them.