Using the New Free Inventory Snapshot for vSphere by VMware Labs

by [Published on 30 June 2011 / Last Updated on 30 June 2011]

This article takes a look at Inventory Snapshot for vSphere.

Introduction

VMware's "flings" are completely free projects offered by VMware engineers. These flings are unsupported (except via comments on the website) and may or may not be part of upcoming commercial releases of vSphere (or other VMware products). VMware wants to get your feedback on the features offered in these flings and the VMware engineers genuinely care about their pet projects released as flings.

One of the latest flings is called "inventory snapshot". This free vSphere tool allows you to take a snapshot of an entire vCenter inventory and then reproduce that inventory on the same vCenter server or another vCenter server. Thus, you could reproduce a vCenter cluster on the same vCenter server or another server.

To give you some more detail, this vCenter inventory snapshot includes the folders, datacenters, clusters, resource pools, vApps, hierarchy, roles and permissions, configuration settings, and custom fields. In other words, if you have an inventory with a given set of hosts and VMs organized into a group of clusters, you can reproduce this environment, including the cluster settings and custom roles you may have defined.

This ability is helpful in a variety of use cases. Suppose you’ve spent a lot of time creating a development vCenter environment, and now you wish to deploy it in production. Using the Inventory Snapshot fling, you can snapshot your dev environment and recreate it on the production server, saving you the task of laboriously adding each host, creating the proper clusters and resource pools, etc.

Downloading Inventory Snapshot for vSphere

To use the snapshot fling, you would need vSphere 4.1 (including vCenter). With your vSphere infrastructure already up and running, you can download the inventory snapshot here

Unzip the file and place it in an convenient location.

You'll also need the latest version of Java installed AND VMware's PowerCLI.

From the inventory snapshot ZIP file, you can run inventory.bat

Keep in mind that PowerCLI is required because inventory snapshot will be creating a PowerCLI script that you will be modifying and then using to recreate your entire vSphere infrastructure (or a piece of it) on the same or another server.

Using Inventory Snapshot

Once you have met the requirements and have Inventory Snapshot ready to use run inventorySnapshot.bat to bring up the UI. In Linux and MacOS, you use the inventorySnapshot.sh shell script to bring up the graphical user interface.

You'll enter your vCenter hostname, username, password, and a path to store all the inventorysnapshot PowerCLI (PS1) snapshot files.


Figure 1

This generates a bunch of PowerCLI scripts and brings up this screen:


Figure 2

Notice the 4 tabs on the top. From here, you can review the actual code that will be used to recreate the vSphere inventory.

On the Host Info tab, you will configure the username and password for each ESXi server as passwords are not captured as part of the inventory snapshot.


Figure 3

Note that you can also commit the same username/password to all hosts to save you time.

In the Inventory Tree tab, you can select which pieces of the inventory you want to be recreated on the same or new host.


Figure 4

Finally, you'll create your PowerCLI script which will be used to recreate the inventory (and is modified based on the choices you selected here).


Figure 5

That script should be called something like createInventory.PasswordModified.PS1. Now, connect to the new vCenter server where you want to recreate the captured inventory. With PowerCLI, you'll do this with Connect-VIServer.

Once connected, run the new script and you'll be able to recreate your vSphere infrastructure.

For a demo, watch this video of how to use the new & free inventorySnapshot:


Figure 6

Summary

While the InventorySnapshot fling may seem a bit complex at first, I ensure you that it is not hard to use once you have the app downloaded and installed. Don't forget about the java and PowerCLI requirements as it won't work without that! Once you've got it running you have the power to take a complete snapshot of a vSphere infrastructure and recreate it on whatever other vCenter server you have (could be another customer, another datacenter, or just moving it to a production vCenter host). Finally, make sure that you ask your questions and provide feedback to the VMware Labs engineers to help them continue to make products like these better.

Advertisement

Featured Links