Content Library Provides Snazzy New Home for Templates, ISO Images, and More

Welcome to the vSphere 6.0 ZOMG Series, focused on the tech goodies baked into 6.0. You can click me to return to the directory, or choose a different deep dive from the menu at the top.
Welcome to the vSphere 6.0 ZOMG Series, focused on the tech goodies baked into 6.0. You can click me to return to the directory, or choose a different deep dive from the menu at the top.

Sharing templates, ISOs, and OVFs across vCenter instances has traditionally required the use of a shared NAS folder, sneaker net, or some other sync my stuff across the wire method. I compare it to the movie Hackers, where a team of scrappy young geeks go through a lot of trouble to share the contents of the Garbage folder on a mythical mainframe to clear their name. Oh, wait, side note!

Zero Cool? Crashed fifteen hundred and seven computers in one day? Biggest crash in history, front page New York Times August 10th, 1988.

Because 1500 isn’t enough. It has to be 1507.

With the vSphere 6.0 release, VMware has developed a crude but effective way to share files across vCenter instances using a variety of different repository options. Dubbed the Content Library, it has been added to the major contextual menus and incorporated into a number of workflows, which is quite snazzy indeed. Let’s dive deeper into how they work using the Wahl Network lab with a Hackers twist.

Building a Content Library

The wizard to build a new Content Library is quite simple. Navigate to Home > vCenter Inventory Lists > Content Libraries and select the action Create a New Library. The first step is to pick a name, optionally scrawl in some notes for a description, and select the vCenter Server to host the repository. A production ready sample name can be found below:

zerocool

Next, determine if the content will be hosted locally or is being subscribed to remotely. There are two optional check boxes for local content:

  • Publish content library externally – provides a link to a JSON file for other vCenters to use your library
  • Enable authentication – allows you to set up a password for access

library-settings

Finally, figure out where you’re going to put the stuff. You can opt to use a local mnt point or drive on the vCenter Server, or use an existing datastore. I opted for the datastore option and used an NFS share on my ioSafe 1513+.

library-storage

That’s it. You now have a Content Library. Rejoice in the majesty of it all!

Controlling Content

There are a number of levers and knobs available for controlling content, both locally and remotely. If you want to snag that subscription link that leads to the JSON file, select the library and choose edit. Here you can toggle the publishing mode, copy the URL, and enable or disable authentication.

library-external

It’s also possible to mount someone else’s library via a subscription URL. Note that the default user name is vcsp and the password is provided by the admin who set up the library. Additionally, you can select how you want data to sync between libraries:

  • Download all library content immediately – the full library contents will sync to the remote location
  • Download library content only when needed – the user will have to manually sync the item or items they want to work with before they can move forward (seems handy for WAN connections)

library-auth

There’s also a familiar permissions area where you can control who can manipulate the contents of the library. The users and groups below were the default settings for a fresh vCenter 6.0 installation.

permissions

I also took a look at the JSON file (so happy they didn’t go with XML). The lib.JSON file contains the library data, while items.JSON contain the list of contents.

library-json-empty

Here’s a sample of the items.JSON file for those interested (I added a few things so it wouldn’t be blank). 🙂

items-json

Adding Templates and OVFs

As of the release candidate build, I was only able add OVF files using the web based import. I was hoping for OVA files. To use this feature, navigate to Home > vCenter Inventory Lists > Content Libraries > (Library Name) > Templates. From here, click the Import OVF package to library button.

There’s not much to do – select the URL or local file path, give the item a name (or accept the default), and click OK.

ovf-import

Once added, you’ll see the item in the Templates section of your library. You can use the actions menu to build a new VM, export from the library, clone it elsewhere, and so on.

ovf-results

You can also choose to clone an existing VM into the library. Choose a VM and then navigate to Actions > Clone > Clone to Template in Library.

template-to-library

Here’s what the files look like within the file share. The files get their UID appended to their name for uniqueness.

file-data

Adding Other Files

Alternatively, you could decide to add whatever else floats your boat to the Other Types area. By default, the import wizard is going to look for ISO files.

iso-import

I have found that if you try to import non-ISO files, the upload task fails. Today, it seems that Other Files equals ISO files. In the future, I’d like to also toss up scripts, client installers, and so on.

upload-non-iso

Thoughts

I really dig the idea of having a shared Templates, OVF, and ISO repository that is easy to share across vCenter Servers. It provides a library of content that can be updated and pruned by the virtualization team, while also being part of the vSphere Web Client workflows. Being a “1.0” release, I’ll give it a little more time to ramp up on features before gazing my cynical eye upon it, but from testing I have found it useful already.