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

VMware vSphere Content Libraries in a Nutshell: Why use Them (or Why Not)

  • June 3, 2019
  • 14 min read
Cloud and Virtualization Architect. Kevin focuses on VMware technologies and has vast expertise in cloud solutions, virtualization, storage, networking, and IT infrastructure administration.
Cloud and Virtualization Architect. Kevin focuses on VMware technologies and has vast expertise in cloud solutions, virtualization, storage, networking, and IT infrastructure administration.

Some time ago, discussing how cool VMware vSphere 6.7 Update 1 is, I briefly mentioned content libraries. That article was just an overview, so I decided not to go into details, saying that some features need their own posts. In today’s article, I’d like to share my hands-on experience with content libraries and help you decide whether this feature can make your life any easier.

VMware vSphere Content Libraries

Why one needs content libraries?

VMware vSphere Content Library allows sharing VM and vApp templates, ISO images, and other files between hosts.

VM and vApp templates

Content library is a great tool when one needs to create a VM or vApp container quickly. You basically can do these tasks with unified templates, which save you a lot of time and effort and enable to standardize the environment.

How to create a content library?

You can open a content library right in Menu of VMware vSphere Client.

VMware vSphere Client

Here’s how you add the library.

Add the library

Specify the content library name. You can also add notes if needed. If multiple vCenter Server instances share the same PSC, select the necessary one from the vCenter Server dropdown list and press Next.

New content library specs

Next, select the content library type. There are 2 options available: local content library and subscribed one.

  • Local libraries are kept on the specific host and can be shared over the network, allowing users on different hosts to access them.
  • Subscribed libraries originate from the external ones. It is also possible to access local libraries as subscribed ones if you want them to be used in the read-only mode. Subscribed libraries can be updated both manually and automatically. One more time: Users can access the library contents in the read-only mode (i.e., there’s no way to edit or delete files).

Configure content library

Then, select a storage location for the library contents.

Storage location

Review the content library settings and press Finish.

Review the content library settings and press Finish

How I fill in the library?

In this chapter, I’d like to talk more about how you add content to the library.

Importing

By importing, you can upload the necessary files. There’s a restriction though: file name should be shorter than 90 characters. Otherwise, the path together with the file name will exceed the file system limits.

Now, let’s see how importing can be done.

Open the Actions menu and click Import Item.

Import Item

Now, you can specify the file location. It can be a URL or some local file.

URL

Paste the URL in the appropriate field. Note that it should end with the file name, e.g., https://lab-example.com/example-TXT.txt; otherwise, an empty file will be created. Interestingly, regardless of the URL you specify, you will be asked to accept site certificates once you press Import.

Paste the URL in the appropriate field

Local file

Here’s how you upload local files (e.g., *.ovf). While choosing a local file location, other VM template files will also be displayed. You must upload them too.

Local file

Upload local files

Recent Tasks

Cloning

You can clone a specific VM to the template. Right-click on the VM, press Clone and select Clone as Template to Library.

Clone as Template to Library

While cloning, you will be asked to select the template type, i.e., VM Template or OVF. The latter contains a bunch of files associated with VM elements.

VM template

VM template

While cloning a VM to the template, you need to either rename the file or enter a different location.

While cloning a VM to the template, you need to either rename the file or enter a different location

Afterward, select the library where you are going to clone the VM. Note that you won’t be able to publish the library after you clone the VM to it.

Select the library where you are going to clone the VM

Edit settings of VM Template

Select the destination compute resource next.

Select the destination compute resource next

Now, select the storage for temp files.

Select the storage for temp files

Review the settings and press Finish.

Review the settings and press Finish

OVF template

Cloning a VM to an OVF template looks a bit easier.

At the first step of the Clone Virtual Machine To Template wizard, you will be asked to either create a new template or update an existing one. You can either preserve MAC address on NIC or do some extra configuration.

Clone Virtual Machine To Template

Also, by cloning to OVF, you can copy a VM to any library, be it published or not.

By cloning to OVF, you can copy a VM to any library, be it published or not

Review the settings and press Finish.

Review the settings and press Finish

How to use the library?

Now, I’m going to share my hands-on experience with VMware vSphere Content Libraries. I want to demonstrate both strong and weak sides of this feature. Today, I played around with the solution deployed in 2 configurations. I hope that this approach makes the pros and cons of content libraries more pronounced.

Setup 1

This is a very simple setup that is close to what one can see in real environments.

1st simple setup

There are 3 ESXi hosts (1 vCenter Server instance per host). The content library is created from that very vCenter Server instance that is used for managing it. Of course, if there’s HTTP(S) traffic allowed between vCenter Server instances, the library can be managed from other hosts. You need to fill in the library with contents and publish it. On other hosts, you need to subscribe to this library.

This scheme comes in handy when different vCenter Server instances need to have access to specific VM configurations.

Setup 2

A configuration like this is typical for big IT environments.

2nd typical setup

There are multiple vCenter Server instances per PSC in one domain.

In environments like that, you often see a bunch of vCenter Server instances in the Host and Cluster tab… But, you can manage Content Library from any vCenter Server instance connected to that PSC (once some fine-tuning is done)!

Manage Content Library from any vCenter Server instance connected to that PSC

You can install VMs from the content library on any host that is connected to the “main” vCenter Server instance (i.e., the library is assigned to it). Here’s how you grant access to the library to other hosts.

Let’s say, you need to make an ISO image available for other hosts in the domain. Just publish that library! Click Edit Settings to begin that process.

Make an ISO image available

By setting the password, you can enable user authentication for access to this content library.

Enable user authentication for access to this content library

Next, subscribe to that library on other hosts. Select the vCenter Server instance associated with it.

Subscribe to that library on other hosts

Enter the subscription URL and specify when you want to download the content.

Afterward, add the storage location for the library contents.

Enter the subscription URL and specify when you want to download the content

Add the storage location for the library contents

Sync the items.

Sync the items

Wait until the synchronization is over.

Wait until the synchronization is over

Note that if the host isn’t subscribed to the library, some file types (e.g., ISO) won’t be available for it even if that host is in the cluster.

What’s the catch?

There are some drawbacks of content libraries. First, you cannot set the size for one library. This may lead you to a situation where you may run out of host storage fairly easy when the public library bloats up all of a sudden. Second, it is a bit hard to work with ISO files in the library. Third, there are file name limitations. Well, it is a serious drawback because when an empty file is created… THERE ARE NO ERROR MESSAGES IN TASK CONSOLE. When you add the file with a very long name from the local PC, you’ll encounter an error, but there is no reason what could go wrong mentioned in that message! Fourth, the Content Library HTML5 interface still has some flaws. For instance, if you click the library name (it’s clickable)… nothing happens!

VM & ISO out DS 94

Conclusion

This all being said, content libraries are really helpful when you deal with the complex IT environments where you have hosts connected to multiple vCenter Server instances connected to one PSC. For small environments, VMware vSphere Content Libraries seem useless to me.

Found Kevin’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!