Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

VMware vSphere: Handy tips on working with Content Libraries

  • July 18, 2018
  • 12 min read
Cloud and Virtualization Architect. Paolo is a System Engineer, VCP-DCV, vExpert, VMCE, Veeam Vanguard, and author of the virtualization blog nolabnoparty.com
Cloud and Virtualization Architect. Paolo is a System Engineer, VCP-DCV, vExpert, VMCE, Veeam Vanguard, and author of the virtualization blog nolabnoparty.com

content-library-01

The Content Library in vSphere 6.5 is a container object used to store VM templates, vApp templates, ISO files, and other files you can share within your network.

With the capability of sharing these files across multiple vCenter Server instances in the same or different locations, administrators are able to ensure compliance and consistency within the infrastructure when deploying workloads.

VM templates, vApp templates, and other types of files in a Content Library are defined as library items that can contain single or multiple files, such as OVF, ISO, and so on. If the HTTP or HTTPS traffic is allowed between vCenter Server instances installed in your network, library items can be shared with multiple vCenter Servers.

img

Two types of Content Library objects can be created in vSphere:

  • Local: items are stored on a single vCenter Server instance and can be published to allow users from different vCenter Servers to subscribe.
  • Subscribed: subscribing to a published library creates a subscribed library. A subscribed library can be created in the same vCenter of the published library or in a different vCenter Server instance. The content of a subscribed library is kept up to date through an automated or manual synchronization to the source published library. Apart from the administrator that can manage templates and files, subscribers can only utilize the content.

Creating a Content Library

The creation of a Content Library is straightforward. In vSphere Web Client, select Home > Content Libraries from the main menu.

img

Click on the Create a new content library link to create a new library.

img

In the New Content Library wizard, enter a Name, optionally some Notes to better explain the scope of the library, then click Next.

img

Specify the type of Content Library to create by choosing between Local or Subscribed options. Select the Publish externally option to allow other vCenter Server instances to access the Library’s content. Click Next to continue.

img

Specify the datastore used to store the library’s content. Then click Next.

img

Click Finish to create the Content Library.

img

The created library is displayed on the page.

img

Import contents into the library

To import content into the library OVF, ISO, and other types of files right-click the created Content Library and select Import item.

img

Files can be imported by specifying a URL or a file stored on the local computer. Use the Browse button to select a local file to import and specify the Item name. Click OK to confirm the file import.

img

If more items are imported into the library, Templates or Other Library Items columns display the number of available items stored in the library.

img

Select the created library for an overview of available files. Inside the library, files are grouped as Templates and Other Types.

img

Change Library Content settings

You can Edit, Rename or Delete a Content Library at any time. To modify the configuration settings, right click the library to process and select Edit Settings.

img

If the library to edit is Local, you can enable the content sharing by enabling the Publish this library externally option with the possibility to protect the access with a password through the Authentication checkbox. URL and password should be provided to users to subscribe to the library. Click OK to enable the new configuration.

img

Configured settings are shown in the appropriate columns.

img

If the library to edit is already Published, you can stop sharing the content with other users by unchecking the Publish this library externally option. Once unpublished, subscribers can no longer use the library content.

img

Subscribing a Content Library

To subscribe to a published library, click the Create a new content library option from the main page to create a new library and select the Subscribed content library option. Specify the Subscription URL and Enable authentication if the library requires it. Specify also the download type to use.

img

When the creation of the new library has completed, the subscribed library is displayed on the page.

img

Library Synchronization

If a published library has to share its content between multiple vCenter Servers, the content needs to be synchronized from the published to subscribed library through a synchronization operation. The content stored in the published library is downloaded to the subscribed library.

The synchronization can be performed manually or automated. To execute an automated synchronization, you need to enable the Enable automatic synchronization with the external content library option in the library settings.

https://nolabnoparty.com/wp-content/uploads/2018/06/content-library-20.jpg

To perform a manual synchronization, right-click the library to synchronize and select Synchronize.

img

Library synchronization may have different scenarios depending on the vCenter Server connectivity and storage configuration. Check out this VMware post for additional details.

In an Enhanced Linked Mode environment, the synchronization between a published library stored on one vCenter and a subscribed library that resides on another vCenter occurs by directly copying files from source to target datastore (image from VMware website).

img

If Enhanced Linked Mode is not in place, the content synchronization between published and subscribed libraries occurs by streaming the content through the Content Library Transfer Service (image from VMware website).

img

Deploy a VM from a template file in the Content Library

Once VM templates have been stored in the Content Library, you have the option to deploy a virtual machine directly from the library.

From Home > Content Libraries, click on the library containing the template of the virtual machine to deploy.

img

Click Templates tab, right-click the template to use and select New VM from This Template option.

img

Specify the virtual machine Name and enable Customize the operating system if you want to use a guest OS customization file (a new feature introduced in vSphere 6.5). Click Next.

img

If you previously enabled the option, select the customization specification to use and click Next.

img

Specify where to run the new virtual machine and click Next.

img

Review details and click Next to continue.

img

Select a disk format and datastore to use, then click Next. Please keep in mind, Thin provision is not recommended in production and must be used carefully to avoid overbooking.

img

Specify the network to use and click Next.

img

Click Finish to deploy the virtual machine.

img

When the deployment has been completed, the new virtual machine is up and running in your environment.

img

In vSphere 6.5, the Content Library feature has been improved introducing new interesting capabilities, such as mounting an ISO file directly from the library, update existing templates, and apply guest OS customization. The use of Content Libraries is a good option to manage VM templates, ISO images, and so on from a single repository without distributing files across network data stores.

Found Paolo’s article helpful? Looking for a reliable, high-performance, and cost-effective shared storage solution for your production cluster?
Dmytro Malynka
Dmytro Malynka StarWind Virtual SAN Product Manager
We’ve got you covered! StarWind Virtual SAN (VSAN) is specifically designed to provide highly-available shared storage for Hyper-V, vSphere, and KVM clusters. With StarWind VSAN, simplicity is key: utilize the local disks of your hypervisor hosts and create shared HA storage for your VMs. Interested in learning more? Book a short StarWind VSAN demo now and see it in action!