VCF 9 – How to migrate your Content Library to a different Data Store

I wasn’t aware that you couldn’t migrate your vSphere content library to a different data store. At least not just like you would migrate a virtual machine. It was a feature that I wasn’t missing much in my homelab, and in production (at my employer or my customers), content libraries weren’t a thing anyway. Back in the days, the only possible way to “migrate” the content library from one data store to another was to export everything from the “old” content library, create a new one, and import everything into the new content library.

When I was driving to a customer beginning this week for a project meeting, I thought, “let’s listen to some tech podcasts”. Long story short, I looked up the Virtually Speaking Podcast on Spotify. During the drive, I heard that you can now migrate a content library to a different data store! I didn’t memorize the title of this podcast, so I had to go through many podcasts again back at home to find the one. And here it is, not on Spotify but on YouTube: What’s New with vSphere in VCF 9.0 – (YouTube.com) at around 37:28 in the video.

What is a content library?

Just in case you’re not aware of this great thing called a content library, I’ll just add some explanations here. A vSphere content library is a centralized repository within VMware vSphere used to store and manage various types of files, including VM templates, vApp templates, ISO images, and other files, enabling efficient sharing and deployment across multiple vCenter Server instances. It simplifies the management of virtual machine resources by providing a single source for templates and other files, eliminating the need to manually update and copy them across different environments. So, a pretty nice thing, isn’t it?

Why would you migrate a content library?

There are multiple reasons, I’ll just name a few. Every content library has a specific data store configured. You may want to migrate the content library because you’re running out of disk space.  Space contention may happen. Or your storage system is undergoing maintenance, or is going to be replaced, or you want to store all these VM templates, ISO files, etc., on a “cheaper” data store. The use case is up to you.

How do you migrate a content library?

The following steps should guide you through the process. It is pretty easy, but it comes with one downside. The migration workflow doesn’t support the migration of VM templates. But I think you don’t have to worry much. At least I didn’t have any issues during setting up a content library and also the migration from one data store to another worked just fine.

What did I store in the content library for the test?

  • An ISO file
  • A VM template (traditional, right-click a VM, convert to template, right-click the template, clone to library)
  • A VM template (imported from an OVA file)

So nothing special, for sure, but I’m not sure what exactly is meant by “The workflow doesn’t support the migration of VM templates”. I didn’t test the migration with versioned VM templates, but I may update this blog post at a later time.

So let’s get started now.

Two ways to initiate the migration

You can initiate the migration of your content library in two ways:

  1. You can right-click the content library and select “Migrate”
  2. Or you go into the content library, and select from the actions menu “ACTIONS => Migrate”.
  3. Next, the migration assistant will start.

    NOTICE: You can see the yellow warning, stating that “The workflow doesn’t support the migration of VM templates”
  4. Next, select the storage where you want to migrate the content library to
  5. Check once if everything is correct, then click “FINISH”
  6. In the Tasks view below, you can see the migration progress

And that’s it. Not that complicated. The duration of the content library migration depends on the amount of data as well as the performance of the network and storage.

 

Using the VCF Download Tool on Windows Subsystem for Linux to download VCF 9 binaries

You may have read it here first, but I recently started a new job. And I’m going deep down the rabbit hole, the VMware Cloud Foundation rabbit hole. I recently sat my first VMware Cloud Foundation exam (VCF-VCP administrator) and passed. The needle for this had been in the arm for a long time if one can put it that way.

VCF version 9 has just been released recently too, and many people are trying to get it up and running in their homelab. And I’m no exception. Getting the stuff done is not as easy as it was back in the days with setting up the ESXi hosts, installing vCenter, and then configuring the vSphere environment as it should be (storage, vSAN, distributed virtual switches, etc.).

I’m also not yet quite sure if my whole homelab infrastructure (talking about the Supermicro servers here, and the HP workstation here) has enough resources. It should be enough when doing the math in terms of CPU cores, amount of memory, and storage. But when going deep technical, with CPU specs, etc., that might be a killer. We will see.

Installing the new VMware Cloud Foundation (VCF) version 9 has been simplified somewhat compared to version 5. There is now an installer available to be deployed as an OVA file, which then pulls all the required files (like ESXi installers, vCenter ISO, and all that stuff) automatically, either from an online depot or an offline depot. No matter which way you go, a valid download token is required to pull the installer files.

A quick word on the VCF download tool

The following guide should help you download the binaries from Broadcom through the VCF download tool, running in Windows Subsystem for Linux (WSL). I’m assuming that you have already a WSL environment with a supported Linux version set up and running on your computer. The VCF download tool is designed to run on Linux. The only way to get it working on Windows is to use the WSL environment. Some information (not much, to be honest) is available here on the Broadcom support website: VCF Download Tool under Windows OS (broadcom.com).

A sidenote on the offline depot

One cool thing I stumbled across during my first steps is a blog post from William Lam, where he is setting up a Synology NAS as an offline depot. You may check this out if you have a Synology NAS, that would be a great fit for having the VCF 9 installer configured with this: VCF 9.0 Offline Depot using Synology (williamlam.com).

How to download the binaries with the VCF download tool

Let’s download the binaries with the VCF download tool within WSL.

  1. First, download the VCF download tool from the Broadcom support website. It’s packed as a tar.gz file.
  2. Upload the package to your WSL environment (if your WSL is running, you should see the mounted disk in Windows Explorer. Nice, isn’t it?).
  3. Next, switch to your WSL command line and extract the package to a folder somewhere on the disk.
    Notice: You may have to create a folder first

    tar -xvf vcf-download-tool-9.0.0.0.24703747.tar.gz -C /path/to/folder/
  4. Now, navigate to the /bin subfolder within the extracted folder
    cd /path/to/folder/bin
  5. As mentioned earlier, a valid download token is required to download the binaries. Create a text document (downloadtoken.txt) somewhere on the disk and put your download token in one line. Only the token itself, nothing else. We will reference that file when issuing the download command.
  6. You may create a specific folder where the binaries will be stored, at least I’m referencing to such a folder in this guide.
    Notice: Make sure you have enough free disk space on your Windows computer.
  7. Next, still in the /bin subfolder of the extracted VCF download tool, execute the following command to start the download of the binaries:
    ./vcf-download-tool binaries download --vcf-version 9.0.0 --automated-install -d /path/to/downloadfolder/offline-bundles --depot-download-token-file /path/to/downloadtoken.txt
  8. If everything is configured correctly, you should get a notification to either enable or not the customer experience program. After that, the download should start automatically.
    It should look somewhat like the screenshot below:

When I was downloading the binaries, something went wrong, and four downloads have failed. No worries if something like this happens. Just executed the same command again. The VCF download tool will start again, check what’s already downloaded, and also notice what failed to download. Only these binaries will be downloaded again:

After executing the download command again, all was fine:

One word to disk space. Shortly before the download starts, the VCF download tool will tell you how much disk space is needed, and will then immediately start downloading the binaries. So, really make sure you have enough “physical” disk space on your Windows computer, so that the WSL disk can automatically grow as needed.

Next, I’m going to prepare my Synology NAS as an offline depot and upload all the binaries to it. The ESXi hosts have been reinstalled from scratch already with ESXi 9, but have no configuration yet (except the DHCP IP address).

Bye for now 🙂