A VMware content library provides a centralized location to store virtual machine templates and ISO images. You can share VM templates and ISO images across multiple vCenter Servers in different datacenters to maintain consistency across VM deployments. In this post, I will show how to create a VMware content library.

Mohammed Raffic

Mohammed Raffic Kajamoideen is a subject matter expert in VMware and Microsoft virtualization, a vExpert 2014-2017, VCIX-NV, VCAP4/5-DCA, VCP, CCA, and MCSA. He blogs at vmwarearena.com and can be found on Twitter at @vmwarearena.

Maintaining centralized VM templates, vApp templates, and ISO images for consistent VM deployment across the virtualized infrastructure is a key task. Content libraries are container objects for VM and vApp templates and other file types like ISO files.

You can share the templates and ISO files across multiple vCenter Servers in the same or even in different datacenter locations. vSphere administrators can use the VM templates in the content library to deploy VMs into the vSphere inventory. There are two types of content libraries: local or subscribed.

A local library stores items in a single vCenter Server instance. You can publish the contents of the local library so that other vCenter Server system users can subscribe to the local library to deploy VMs. You can even configure password authentication when you publish the content library externally.

You can create a subscribed content library in the same vCenter Server where the published content library is, or in a different vCenter Server system in the same vSphere domain or in a different vSphere domain.

Create a local content library ^

Log in to vCenter Server using the vSphere Web Client. In the Web Client navigator, click Content Libraries.

Navigate to Content Libraries in the vSphere Web Client

To create a new content library, click on Create a new content library under the Objects tab.

Create a new content library

Create a new content library

Enter the name for the content library and specify the description for the library under Notes. If you have multiple vCenter Servers linked to a single Platform Services Controller (PSC), select the appropriate vCenter Server from the drop-down and click Next.

Specify library name and description

Specify library name and description

Select Local Content Library to create a local library only accessible to the vCenter Server instance where you create it.

To make the contents of local library available to other vCenter Servers, select the checkbox Publish externally. You can also enable password authentication to access this local library. To do this, select the checkbox Enable authentication and specify the password. Click Next.

Create a local content library

Create a local content library

You need to specify the location to store the library content. The storage location can be either a Server Message Block (SMB) share, a Network File System (NFS) path (NFS3 or NFS4), or a datastore connected to any of the ESXi hosts of the vCenter Server.

Storage location for the content library

Storage location for the content library

To use a datastore, click Select a datastore. Select any one of the datastores in the vSphere inventory and click Next.

Select a datastore location for the content library

Select a datastore location for the content library

Review the content library settings and click Finish to start creating the content library.

Review the content library settings

Review the content library settings

The local content library is now created, and you will be able to see it under Content Libraries.

Summary of the local content library

Summary of the local content library

Import library items into the content library ^

You can now import library items such as VM templates, vApp templates, Open Virtualization Format (OVF) files, and ISO images. You can also upload all the files associated with an OVF template (.ovf, .mf, and .vmdk). However, you will only see .ovf files under the templates in the vSphere Web Client.

To upload library items into the content library, click Import item on the Templates tab. Select the files to import into the library and click OK.

Import items into the content library

Import items into the content library

I have imported the Windows Server 2012 VM template called "Win2k12_template" into my local content library. Once the import is complete, you will be able to see the imported VM template under the Templates option in the content library. The Stored Content Locally option tells you if it is a local library.

VM templates in the content library

VM templates in the content library

Create a subscribed content library ^

The procedure to create a subscribed content library is similar to creating a local library. The only difference is that we need to select the option Subscribed Library and specify the URL and password of the published library.

Before creating a subscribed library, go to Published Content library (Local library) -> Configure and click Copy Link to copy the subscription URL of the local content library. Keep the password handy if password protected is set to "Yes."

Copy the subscription URL of the published library

Copy the subscription URL of the published library

Log in to the vCenter Server where you want to create the subscribed content library using the vSphere Web Client. In the Web Client navigator, click Content Libraries. Specify the name and description of the content library and click on Next.

Select Subscribed Content library and paste the subscription URL of the published local content library. If enabling password authentication, select the checkbox Enable authentication and enter the same password you used for creating the published local library.

You can now choose one of the following two options:

Download all library content immediately: This option will download the entire library contents of the published local library immediately after creating the content library.

Download library content only when needed: This option saves storage space by storing only the metadata for the library items from the published library.

Create a subscribed content library

Create a subscribed content library

Specify the datastore location to store the contents of the library and click Finish to create the subscribed content library. The subscribed content library is created, and you will be able to see the library details under Summary tab.

Summary of the local content library

Summary of the local content library

Since it is the subscribed content library, you will able to see the library items imported into the published content library (local library) under Templates. We can see the VM template "Win2k12_template" we have imported into the local library earlier.

Since we have chosen the option Download library items only when needed during the creation of the subscription content library, this set the Stored Content Locally option to "No."

Library items of the subscribed content library

Library items of the subscribed content library

Synchronize the content library items ^

Because we selected Download library content only when needed during the creation of the subscribed content library, this will download only metadata of the library items from the published library. To use the content library items, we need to synchronize either the individual library items or the entire library.

To synchronize an individual library item, select the library item under Templates and click on Synchronize Item to start the synchronization between the subscribed library and the published library.

Synchronize library items

Synchronize library items

Once the synchronization of the library item is complete, the Stored Content Locally option will switch to "Yes." You will also notice that the size of the VM template increased.

Library items after the library synchronization

Library items after the library synchronization

To synchronize the entire subscribed content, right-click the subscribed library and select Synchronize Library or click the Synchronize symbol marked below.

Content library synchronization

Content library synchronization

Win the monthly 4sysops member prize for IT pros

Share
0

Related Posts

0 Comments

Leave a reply

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

*

CONTACT US

Please ask IT administration questions in the forum. Any other messages are welcome.

Sending
© 4sysops 2006 - 2017

Log in with your credentials

or    

Forgot your details?

Create Account