vSphere 6 Content Libraries – almost really cool!

If you’re like me then you’re slightly peeved whenever things aren’t exactly as orderly as they could be.  For me, one such instance of this involves templates, ISOs, and OVF’s in vSphere.  For as long as I can remember I’ve just created a VM Folder called “.Templates” or similar so that it was always at the top of the list in VM/Template view and dumped my ISOs in a folder on some random datastore.  OVF’s are another catastrophe altogether – they’d get thrown on a network share somewhere to never be used again and re-downloaded hundreds of times in the future.

The official PDF press release from VMware covering “What’s New in vSphere 6.0?” includes the following:

Management:

Content Library – Centralized repository that provides simple and effective management for content including virtual machine templates, ISO images and scripts. With vSphere Content Library, it is now possible to store and manage content from a central location and share through a publish/subscribe model.

I always thought, “It’d be really awesome if there was just some menu that collected templates and I didn’t have to sift through them when managing VMs.”  New in vSphere 6 is the concept of the Content Library.  The concept is pretty basic – it’s a place you can jam all your stuff that doesn’t correlate directly to VMs but can access at a later time.  In fact, if you’ve messed with templates in vSphere 6 at all you probably noticed the item pictured below:

Clone to Library

Clone to Library

When I first saw that option my mind ran away with the amount of organization I’ll be able to apply in my homelab but at work too!  Before we start cloning things to libraries, whatever that means, let’s locate our Content Library menu and see what it’s all about.  If you go to the home button for you vSphere Web Client you’ll see this icon below:

Content Library Icon

Content Library Icon

When you click the icon, you’re brought to a conventional Web Client window with the option to click the little (+) icon to create a Library.  We’ll have to create one because as you can see in the next screenshot we have no libraries created:

No Content Libraries

No Content Libraries

Let’s create a Content Library for our templates.  Click the icon below the word “Objects” to create the Library and follow the predictable menu.  One thing worth noting is that you’ll see the vCenter Server listed with it’s access a Content Library that may have been created on another vCenter Server.  More on that later, though – let’s name the library:

Name the Content Library

Name the Content Library

Next you’ll see that you have a few options as to how the library will be accessed – locally (with the option to publish it to other servers, with or without authentication required) or subscribed (accessed from another published Content Library with the option to enter authentication as well as whether the content should be retrieved in full or as needed).  We’ll create a local Content Library for this example:

Configure Content Library

Configure Content Library

Finally, we have to pick where we want the Content Library to live.  This is obviously important to remember but try and highlight or bold that word in your head – “remember“.  I’ll fill you in as to why in a minute.  Here are the settings I chose:

Content Library Storage

Cool – so after this window you just confirm the information you entered and vSphere will create the library.  We can confirm that the Content Library has been created as it’ll now show up in our original view:

Content Library Created

Content Library Created

So, now what?  If we click “Templates” in blue in the Objects pane the library is opened and we see the summary information:

Content Library Summary

Content Library Summary

You’ll notice there’s a “Tags” list there – we can click Manage and change a few options but really we can only set whether the library is published or not and then add tags to the library to allow for more descriptors for searching purposes.  If we click on “Related Objects” we’ll surely be able to start adding content to this library like in other Web Client windows, right?  Let’s try:

Import OVF to Library

Import OVF to Library

Not exactly…  in fact, the only option here is to “Import OVF package to library”.  Wait a second – what if I already have a .VMXT file (a .VMX marked as a Template) created and just want to inventory it?  Yeah that ain’t happening from here.  Hrmph – click it anyway and you get:

Import OVF Menu

Import OVF Menu

As predicted you can only reference OVF’s from here.  This looks very much like other OVF dialog menus in vSphere where you can reference a URL or local file.  Great.  Well, that’s not what I want to do at all – I don’t export my templates as OVFs for a very specific reason.  When you create an OVF you apply your customization once.  Let’s say I set up a virtual pfSense firewall for a friend or customer exactly how I want them to deploy it and turn the VM into an OVF – that makes some sense.  The OVF would be deployed into their environment a a VM exactly as I had configured.  Some manufacturers will add some customization to OVFs during deployment but you cannot choose a Customization Specification like you would for an ordinary vSphere Template.  Let’s click “Other Types” maybe that’s what we want:

Content Library Other Types

Content Library Other Types

Oh look!  “Import ISO image” – well, that’s cool.  So I can add ISO’s to this library but I can’t seem to add a template I’ve already created.  That’s ok for now, let’s just add an ISO (get your “remember” button ready…) to the Content Library we titled “Templates” – I know, I was talking about how I dislike things sprawled all over the place and this is already not helping much.  Here we go:

Add ISO to Content Library

Add ISO to Content Library

Once we find the ISO and add notes, etc., we can click “Ok” and the content is added and I have some actions available to me:

ISO in Content Library

ISO in Content Library

Notice anything weird above?  I uploaded the ISO from a network share and it shows up as 0 Bytes.  I copied the ISO local to my desktop then uploaded, and now it shows up properly, I think:

ISO Size in Library

ISO Size in Library

Yeah that’s weird it also says “stored content locally” yes/no – we can look into that some other time.  So, what can we do with this thing now?  Not a whole lot.  You cannot access the ISO from anywhere!  It’s’ in the Content Library… but there’s no option to “mount ISO from Content Library” or anything that I can see.  When you edit the settings of a VM you can still only mount from client device, host device, or Datastore ISO file.  Pretty… useless?

So how do we do anything with this?  Well, let’s browse the RAID50 datastore we created the library in.  We know we created the library named “Templates” so this should be simple.  Go to Datastore view and browse:

Content Library on Datastore

Content Library on Datastore

Remember how I kept emphasizing “remember“?  I did that because you have to remember everything about what you just did for it to be useful!  What does that mean?  What I mean by that is that while we can upload an ISO into the Content Library (whether or not the uploading from a share works properly or not is another matter) we can’t access it conveniently at all.  Instead, we still end up using the option to mount a CD by “Datastore ISO file” and it’s actually a worse solution than simply creating an ISO folder on your datastore and saving ISO’s in there because now we have an arbitrary Content Library name!  Check out that path!

I can see it now.  “Hey [co-worker] yeah so I put an ISO up on [vCenter Server] in the Content Library… yeah… just go to ‘contentlib9296da2a-6829-413a-8b45/0eea9af0-f3d3-43ee-bfec-1544098’…”  Sigh.  What the hell?  And, not only that, but we also were unable to do anything with the template solution.

If we right-click a VM and select “Clone…” we have the option to “Clone to Template in Library” which opens this dialog:

Clone to Template in Library

Clone to Template in Library

This window maintains what we determined earlier – this option will provide no real template option with the ability to use your Customization Specifications.  This option will just clone a VM into an OVF that can be redeployed.  I guess this has its purposes (like if you were going to create a bunch of the same VM).  You can choose to preserve the MAC address of the VM network adapter(s) and also “include extra configuration” but when the option for extra configuration is checked nothing happens – if you press “Ok” it just starts cloning the VM to OVF in the selected Content Library.

I am going to go assume that this option was introduced and the framework made it into vSphere 6 but the guts of it didn’t.  At least, I hope that’s what happened – surely VMware couldn’t have thought “Yeah this is useful!”  Maybe someone was working on the Content Library feature and forgot to finish it – I am not sure.  But, as is, the feature is not very useful.  The Content Library holds OVFs and not true Templates (with no ability to apply customization) and when uploading an ISO/other file it just goes into the selected datastore in a folder with a nondescript name in a randomly generated folder making it super fun to hunt and peck for the ISO/file you just organized into a Content Library.

Assuming this is unfinished I am excited to see it complete.  As I mentioned I am looking for more organization and the ability to control what sort of templates and ISOs are visible to vSphere users.  Since you can publish Content Libraries it’d be cool to have a vCenter Server in a management zone of a multi-tenant business and link the vCenters and access common templates.  This would make for one central, updated, template that can be deployed across many vCenter Servers.  If/when VMware makes this more useful I will be the first to jump on utilizing it because right now I have crap everywhere and I dread telling a colleague that I “think” an ISO is in a datastore folder… or a network share… or…  maybe I deleted it… I forget.

Hope to see more on this!  And VMware, why on earth would you explicitly call this feature out on your official press release of new features and then deliver it as such?  Even still… I love vSphere 6.0 so I won’t be too harsh.

Author: Jon

Share This Post On

6 Comments

  1. Has any of this changed significantly with release of 6.5? I notice that there is the option to link from the content library for VM cd drives now.

    Post a Reply
  2. Hi!
    Can I create Content library on local data store and share it to all hosts in vcenter and share with other vcenter in linked mode, or I should use shared data store?

    Post a Reply
  3. Hi Jon,

    The issue with provisioning the VMs from the templates with cursom attributes has been resolved in vSphere 6.0 Update 3.

    Hope this information helps.

    Post a Reply
    • Hey Roman – thanks for the update. I will be sure to revisit and post an updated article! Liking your blog thanks for all your work!

      Post a Reply
  4. I believe the “Clone to Library” feature in your first screenshot is actually the piece you are wanting (at least it was for me). AFTER you have setup/configured your Content Library (or libraries), right click on the template you want to “upload” and select “Clone to Library.” From there, you can pick various options/available libraries to upload your existing template to, and this process will handle it (rather than exporting the template to an OVF and uploading the OVF into the CL).

    Post a Reply
  5. I just ran into the same issue today (importing a template into content library in hopes of customizing it for deployment) and it’s a total bummer.

    Thanks for savings me a bunch of hair pulling! I’ll use the content library for OVF’s for now (from VMware or other vendors) but until then my lab infrastructure vm’s need to be provisioned the template way.

    Are you aware of any changes in the last few months that fix this?

    Thanks in advance

    Post a Reply

Submit a Comment

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

Share This
%d bloggers like this: