Design, servers, Storage, Uncategorized, Virtualization, vmware

vSphere Content Libraries (CL)

2017-10-01_13-44-16

The introduction of the Content Libraries feature came with vSphere 6. The goal is to reduce the complexity in management of VM templates, vApps, ISO images, and scripts that your virtual environment needs for day to day operations. Content libraries are container objects.
The Content library can be

  1. Local to the vCenter your create it in.
  2. Published externally to other vCenters with password authentication
  3. Subscribed Content Library to another library

The flexibility of the content library topology availability will enable your organization to maximize your operational efficiencies. How? Here are some scenarios that Administrator face.
“What Template did you use to build this VM?”
“Is it patched? Is it the latest one?”

Now imagine this conversation across the business units that span across geographic regions, time zone etc.
What and Where?
Some key things that a CL will help prevent is the bad practice of building workflow and processes around a single person. Increase efficiency in your organization, by using a central repository of essentials files you can avoid using the “wrong” vm template. That answers the what version is the latest? You can increase efficiency of answering the question of where is the latest version?

How do you setup a CL?

  1. In the vSphere Web Client navigator, select vCenter Inventory Lists > Content Libraries.
  2. Click the Objects tab.
  3. Click the Create a New Library icon (create a content library).
  4. Enter a name for the content library, and in the Notes text box, enter a description for the library and click Next.
  5. Select the type of content library that you want to create.

Option

Description

Local content library

A local content library is accessible only in the vCenter Server instance where you create it.

Published content library

Select Publish externally to make the content of the library available to other vCenter Server instances.

If you want the users to use a password when accessing the library, select Enable authentication and set a password.

Optimized published content library

Select Optimize for syncing over HTTP to create an optimized published library.

This library is optimized to ensure lower CPU usage and faster streaming of the content over HTTP. Use this library as a main content depot for your subscribed libraries. You cannot deploy virtual machines from an optimized library. Use optimized published content library when the subscribed libraries reside on a remote vCenter Serversystem and enhanced linked mode is not used.

Subscribed content library

Creates a content library that is subscribed to a published content library. You can sync the subscribed library with the published library to see up-to-date content, but you cannot add or remove content from the subscribed library. Only an administrator of the published library can add, modify, and remove contents from the published library.

Provide the following settings to subscribe to a library:

  1. In the Subscription URL text box, enter the URL address of the published library.

  2. If authentication is enabled on the published library, enter the publisher password.

  3. Select a download method for the contents of the subscribed library.

    • If you want to download a local copy of all the items in the published library immediately after subscribing to it, select Download all library content immediately.

    • If you want to save storage space, select Download library content only when needed. You download only the metadata for the items in the published library.

      If you need to use an item, you can synchronize it to download its content.

  4. When prompted, accept the SSL certificate thumbprint.

    The SSL certificate thumbprint is stored on your system until you delete the subscribed content library from the inventory.

6. Click Next.
7. Select a datastore, or enter the path to a remote storage location where to keep the contents of this library.

Option

Description

Enter an SMB or an NFS server and path

If you use avCenter Server instance that runs on a Windows system, enter the SMB machine and share name.

If you use vCenter Server Appliance, enter a path to an NFS storage. You can store your templates on an NFS storage that is mounted to the appliance. After the create a new library operation is complete, the vCenter Server Appliance mounts the shared storage to the host OS.

Select a datastore

Select a datastore from your vSphere inventory.

vSAN Datastore will appear here as a choice

8. Review the information on the Ready to Complete page and click Finish.

Great now you have a Content library.. what next?

ADD CONTENT to your Content Library.
You can:
Clone the VM as a template into your Content Library (Right click the VM choose
Actions–> Clone –> Clone to Template in Library

2017-10-01_13-44-59

Now for another time saver!
So, you already realize the importance of a repository and you have a single folder on datastore that says /iso-templates. Now what? You need to be able to copy all of that to your new Content Library. So you can publish the CL and enable other vCenter’s to Subscribe.
The tricky option is to deal with ISO images.

Sure Templates and VM’s can be handled with cloning VM to Template actions but here is a option for existing templates in your datastore. This will save you a bit of time in re-copying the ISO back into the content library.

 

When I first started to use the CL I didn’t see an option the the CL to add ISO files. I reached out to Roman Konarev and he provided this excellent guide.

 

How to import your ISOs from DS:
Get a URL to your ISO file that you want to import to Content library. The structure of that URL is the following: [DataStore url]/[ISOs folder]/[file_name].

Here is my ISOs folder:
1.png
Here is my DS url:

So, the final URL will be the following: ds:///vmfs/volumes/56cd1758-86602854-5166-020019640efe/RK_ISOs/small_ISO.iso

2)    Open a standard “Import library item” wizard and paste the URL above there:

 

** vSphere 6.5 update **

** Update to vSphere 6.5 and make it easier! **

What a difference a version makes!

Procedure

  1. In the vSphere Web Client navigator, select vCenter Inventory Lists > Content Libraries.
  2. Right-click a content library and select Import Item.

    The Import Library Item dialog box opens.

  3. Under Source section, select the option to import an item from a local file. Click Browse to navigate to the file that you want to import from your local system. You can use the drop-down menu to filter files in your local system.
  4. Under Destination section, enter a name and description for the item, and click OK.

Content Libraries can even extend into the Cloud!

Create a content library that is subscribed to the content library you published from your on-premises data center. Content is synchronized from your on-premises data center to your SDDC in VMware Cloud on AWS.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s