An overview of vSphere 6 Content Libraries

If you have spent any significant amount of time managing vSphere environments, I’m sure you created your fair share of VM templates. I also bet, that you uploaded a number of ISO files to one or more datastores but you always forget which datastore you placed them on. Sounds familiar?

Whatever the case may be, this setup can quickly get out of hand as environments grow larger. Starting with vSphere 6, VMware is introducing Content Libraries, a solution to this problem albeit one that can be improved upon for reasons I’ll soon explain.

Quoting from VMware documentation;

Content libraries are container objects for VM templates, vApp templates, and other types of files. vSphere administrators can use the templates in the library to deploy virtual machines and vApps in the vSphere inventory. Sharing templates and files across multiple vCenter Server instances in same or different locations brings out consistency, compliance, efficiency, and automation in deploying workloads at scale.


The good and the iffy!

The primary benefit of a content library is that it provides a central repository to which you can upload ISOs, VM and vApp templates, scripts and other file types that might come in handy. Once a library has been created and populated, you have the option to publish it externally making it accessible to other vCenter Server instances via a JSON subscription URL. This feature is a great thing as it presents the same repository view to any vCenter Server instance it has been published to. The second best feature is the ability to deploy virtual machines from any template stored in the library.

Cloning a library item to the same library or to an external one, is yet another feature. You can also clone a VM to a template directly to a library, as shown in Figures 1a and b.

Figure 1a - Cloning a VM to a template stored in a content library

Figure 1a – Cloning a VM to a template stored in a content library


Figure 1b - Selecting a target library when cloning a VM to a template

Figure 1b – Selecting a target library when cloning a VM to a template


The iffy bits are;

(a) You won’t be able to customize Templates or vApps uploaded to a library. These exist purely as OVF files.

(b) You won’t be able to mount an ISO image stored in a library. This means you have to stick with the old way of doing things; store ISOs on local disk or a datastore.


Library Types

There are two types of libraries; a local library and a subscribed library.

A local library is created by designating a shared folder on the same Windows Server where vCenter Server is installed. If you’re running vCenter Server Appliance (vCSA), an NFS mount point is used instead. A library can also be created on a datastore.

For this post, I opted to create a Windows share. I assigned everyone write permissions both on the share and folder, something I usually avoid doing for security reasons. The permission are required so users will be able to upload to the library.

Once the local library is created, you can choose to have it published externally. As already mentioned, this makes the local library accessible from other vCenter Server instances which is why this is referred to as a subscribed library.  When a local library is published, you also have the option to password protect it. By default, the vcsp local account is used. You have to specify the password set for vcsp when you subscribe to the library from other vCenter Server instances as per Fig. 2.

Publishing a local library

Figure 2 – Publishing a local library


Creating a local content library

The following instructions and screenshots will take you through the process of setting up a local content library on vCenter Server for Windows. This steps are to be carried out using the vSphere Web client. For the progammatically inclined, you can use the Content Library api to create and manage content libraries using .NET, Java and Python. This is beyond the scope of this post, but the link provided should be a start if interested.

Step 1

Step 1 – On the vCenter Server, create a shared folder and give everyone write and read permissions


Step 1

Step 2 – Locate and click on the “Content Libraries” icon under the home screen


Step 1

Step 3 – Click on the “Create a new library icon” and follow the setup wizard


Step 1

Step 5 – Tick the relevant check boxes if you want the library published externally and authentication enabled


Step 1

Step 6 – Type in the path to the shared folder created in step 1


Step 1

Step 7 – Press Finish to finalize the library creation process


Figure 3 is to show you how libraries created on a datastore – marked in red – are listed in Datastore Browser as opposed to libraries residing in a Windows or NFS share.

Step 1

Figure 3 – Viewing content libraries using the Datastore Browser


Adding items to the library

After the library is created, you can start adding items to it. In general, you will probably be uploading ISO and OVF files, however it’s good to know that you can upload any file type if needed. OVF files are automatically placed under Templates. Other file types are instead placed under Other Types. In the next example, I’ve uploaded an ESXi 6.0 template, something I generally use to deploy nested environments from.

Step 1

Step 1 – Locate the required library and right-click on it, selecting “Import Item” from the context menu


Step 1

Step 3 – Choose the OVF file you wish to upload using either a locally accessible path or a URL


Step 1

Step 4 – The item is uploaded to the library and tagged if all goes well!


Deploying a VM from library

One of the benefits of content libraries is the ability to deploy a virtual machine directly from a template stored in a library.

To do this, simply locate the template from the library, right click on it and select New VM from this template as shown in Figure 4. It is then just a matter of following the deployment wizard. Specify a destination folder, the host where the VM will be deployed, the VM’s disk format, a datastore and finally the network (portgroup) for the VM.

Step 1

Figure 4 – Deploying a new vm from a library template


Subscribing to a content library from vCenter

Publishing a local library externally allows you to subscribe to it from other vCenter Server instances. Here’s how.

Step 1

Step 1 – Select the local library you’ve published externally. From the Summary tab, click on the “Copy Link” button to copy the subscription URL


Here as an example of a subscription link along with the JSON contents listed.



Step 1

Step 2 – Click on the “Create a new library icon” and follow the setup wizard


Step 1

Step 3 – Assign a name to the library


Step 1

Step 4 – Paste the subscription previously copied. If authentication has been set on the parent library, the same password used must be typed in “Enable authentication” field when subscribing. You should also specify how you want items synced from the parent library. You may select the “Download library content only when needed” if you wish to avoid overwhelming a slow network link in case of densely populated libraries or items of a considerable file size.


Step 1

Step 5 – Choose where the subscribed library will be created. In this case I choose to host the library on a datastore.


Step 1

Step 6 – Press Finish to finalize the subscription process


Changing library settings

The settings for both local and subscribed libraries can be changed any time by clicking on the Settings tab while the given library is selected. This is shown in Fig. 5.

Step 1

Figure 5 – Modifying the settings to a subscribed library


Step 1

Figure 6 – Local and subscribed libraries as displayed in the vSphere Web Client



Concluding, have a look at the next video where I demonstrate how to:

  • Create a local library
  • Add an item to the library, in this case a template (OVF)
  • Deploy a virtual machine from the item just added


Content libraries are a great way to organize templates, ISO images and other file types. It’s a pity that a few missing features such as the ability to mount an ISO from a library or customize library templates, don’t make content libraries a permanent solution to how templates and ISO images are handled in general. In all probability, these missing bits will be included with the next iteration of vSphere.

UPDATE: Since this article was written, vSphere 6.5 has been released. The missing features have indeed been addressed and included as predicted! Watch out this space for a new article discussing these latest editions.

[the_ad id=”4738″][the_ad id=”4796″]


Altaro VM Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment

Your email address will not be published. Required fields are marked *