To deploy virtual machines in the vSphere with Tanzu environment, DevOps users must have access to VM images, or templates, that contain software configurations, including operating systems, applications, and data. To provide access to images, a vSphere administrator configures a VM content library, and then associates it with the namespace where the VMs are deployed.
1 Create a Content Library for Stand-Alone VMs
As a vSphere administrator, create a content library to store and manage VM templates.
You can create a local content library and populate it with templates and other types of files.
You can also create a subscribed library to use the contents of an already existing published local library.
Starting with vSphere 7.0 Update 3, you can protect the items of a content library by applying an OVF security policy. The OVF security policy enforces strict validation when you deploy or update a content library, import items to a content library, or synchronize templates. To make sure that the templates are signed by a trusted certificate, you can add the OVF signing certificate from a trusted CA to a content library.
For more information about content libraries and VM templates in vSphere, see Using Content Libraries in vSphere Virtual Machine Administration.
Prerequisites
- vCenter Server instance where you want to create the library. or on the
- on the destination datastore.
Procedure
2 Populate a Content Library with VM Images for Stand-Alone VMs
After you create the content library, populate it with VM templates in OVA or OVF format. Your DevOps engineers can use the templates to provision new stand-alone virtual machines in the vSphere with Tanzu environment.
You can use several methods to populate the library. This topic describes how to add items to a local content library by importing files from your local machine or from a Web server. For other ways to populate the content library, see Populating Libraries with Content in vSphere Virtual Machine Administration.
Prerequisites
- Create VM images that are compatible with vSphere with Tanzu.
The image specification requires that all VM images include VMware Tools or an equivalent open source package. The images must use one of the following to bootstrap the guest OS and its networking stack:
- Linux + Cloud-Init version 17.9-21.2 with DataSourceVMwareGuestInfo.
- Linux + Cloud-Init version 21.3+
- Windows + Cloudbase-Init version 1.1.0+
For information about Cloud-Init, see the https://cloud-init.io/ web site.
- If your library is protected by a security policy, make sure that all library items are complaint. If a protected library includes a mix of compliant and non-compliant items, the kubectl get virtualmachineimages fails to present VM images to the DevOps engineers.
- Required privilege: and on the library.
Procedure
Results
The item appears on the Templates tab or on the Other Types tab.
3 Associate a VM Content Library with a Namespace
After you create the content library and populate it with VM templates, add the library to the namespace to give your DevOps users access to the content library.
Prerequisites
Procedure
- In the vSphere Client, go to the namespace.
- From the vSphere Client home menu, select Workload Management.
- Click the Namespaces tab and click the namespace.
- Add a content library.
- On the VM Service card, click Add Content Library.
- Select one or several content libraries and click OK.
4 Manage VM Content Libraries on a Namespace
After you associate the library with the namespace, you can remove the library to unpublish it from the Kubernetes namespace. You can also add more libraries.
Prerequisites
Procedure
- In the vSphere Client, go to the namespace.
- From the vSphere Client home menu, select Workload Management.
- Click the Namespaces tab and click the namespace.
- Add or remove a content library.
- On the VM Service card, click Manage Content Library.
- Perform one of the following operations.
Option Description Remove a content library Deselect the content library and click OK. Add a content library Select one or several content libraries and click OK.