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:
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:
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:
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:
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:
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:
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:
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:
So, now what? If we click “Templates” in blue in the Objects pane the library is opened and we see the summary information:
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:
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:
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:
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:
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:
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:
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:
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:
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.