Subscribe to our blog

OpenShift Virtualization is rapidly growing by leaps and bounds. New sets of features are added with every new release, carefully placed to form a genuine Virtualization product with user experience at its core.

OpenShift Virtualization 4.7 is now available, with new features and exciting updates. The main star of this Virtualization release is the virtual machine template. Placing templates at the center of the Virtualization administration experience leads to a very simple yet powerful flow:

  • Admins create, manage, and allocate templates to different developer groups within different projects.
  • Developers generate virtual machines from these templates, within a moderated and controlled environment.

Now, the OpenShift Virtualization team is working to enhance the template management experience. With the release of OpenShift 4.8, administrators can create custom images (also known as “golden images”) for their developers. This saves time and effort for developers as they configure their virtual machines to their needs. Administrators also gain more control over the virtual machine created in the cluster.

OpenShift templates are namespaced, meaning the administrator can assign different templates to different teams working on specific projects. From there, developers can create virtual machines from templates tailor-made just for them, without needing to sift through other available templates in their ecosystem.

OpenShift 4.8 boot source customization, is available via manual customization within a running console, or by running a cloud-init script against the boot source. Both methods will create a new template and a boot source copy, making the original template and boot source available for virtual machine creation the entire time.

With the benefits of this new functionality laid out, let’s walk through what this new, streamlined process looks like in action.

The customization workflow

To successfully begin customizing templates and putting them to use, you’ll need to be:

  • An OpenShift administrator with a running OpenShift cluster.
  • Subscribed to the Virtualization and OCS operators.
  • A template with an available boot source.

Once you satisfy both prerequisite conditions, use the side navigation to access the Virtualization page and open the Templates tab. 

The Templates tab lists available templates within your ecosystem. Templates with an available boot source will offer an option to customize that boot source from the actions menu. You can reach the same Customize boot source action by clicking the available boot source for that template.

Clicking Customize boot source will surface an overview of the customization process. This brief procedure communicates the backend implementation and lists the temporary resources used during the customization process.  

If you’d like to bypass this step in future customization workflows, you can prevent it from surfacing again by checking Don’t show this again.

In general, the customization process will duplicate the boot source to a new template. The original boot source and template will remain intact and available for virtual machine creation.

The customization process will take place within a temporary virtual machine. Once the customization is complete, the temporary virtual machine will be deleted, and the new template will become available for virtual machine creation.

The next screen collects prerequisites for customization, covered in two sections.

The first section addresses the namespace, name, and flavor of the new template. Both the New Template Namespace and Template flavor (CPU and Memory) fields  defaulted to the original template values.

The second prerequisite section covers boot source preparation. Here, you’ll need to name the new boot source clone. This will display the name of that boot source for the upcoming template under the Boot source column. Naming the boot source will help you trace it in the future as well as communicating with others about its function. In addition, you can choose to inject any cloud-init script that will be run against the boot source, before launching a console.

Also, in case the boot source is a CD-ROM, you will be required to provide a Persistent Volume Claim size (PVC), which is the Kuberentes resource for “Disks.”

To complete preparation and start customizing your created template, click Create template and start customization.

The process of preparing the boot source and launching a console usually takes a few minutes.

The progress screen shares which temporary virtual machine will be running the console.

As your boot source customization prepares, you can take time to read about how to generalize the operating system to be used as a boot source. Operating system generalization, also known as “OS sealing,” is important for using an operating system as a boot source for templates. Without the generalization process, the Virtual machine specific data will be added to the template, causing conflicts as you generate more virtual machines from that template. This process is specific to each operating system so you should refer to their documentation to learn more.

If you’d like to exit this page and resume this workflow after processing is complete, don’t fret — you can access this same step from the Templates tab at any time. Just click on the actions of your new template and select Customize boot source once it becomes enabled.

Once the customization preparation is complete, a console will be launched. From the console, you can manually configure the operating system.To finish your customization and make your template ready for use, click the Finish customization and make template available button.

If completed, the entire customization process via cloud-init, OpenShift will still need you to go through the console page and click this action. This manual step is temporary — we’re currently exploring other ways to provide more automatic solutions in future releases.

The final step of the template creation and customization process is confirming that you’ve generalized the operating system so that it can be used as a template boot source.

And that’s all! A new template is born with a shiny custom image in the middle. Providing custom images is now made easier with this new workflow.

Creating, customizing, and using templates is an essential part of the Red Hat Virtualization roadmap, and we’re looking to enhance it further in future releases. We’re aiming for fully-automated solutions, such as running the template customization process via pipeline. Exciting developments on the horizon, and we can’t wait to keep elevating Virtualization experiences with you.

The Wrap

Kubernetes is a powerful system for automating deployment, scaling, and management of containerized applications. It offers many advantages over traditional virtualization. However, moving to Kubernetes has its own challenges. It is not a simple plug-and-play solution.

OpenShift Virtualization is constantly taking big steps to becoming your go-to virtualization solution. Now it is ever more true with custom boot sources. Along with other upcoming features such as pipeline integration, we believe that what once was a gap between Kuberntes and Virtualization is now solid ground.

Whether you are a Virtualization user seeking to learn Kubernetes or its strengths, or a Kuberentes user who needs to spin virtual machines, we have got you covered.

You too can join this ongoing process to improve our user experience with your feedback by signing up to participate in our UX research here.


About the author

Browse by channel

automation icon

Automation

The latest on IT automation that spans tech, teams, and environments

AI icon

Artificial intelligence

Explore the platforms and partners building a faster path for AI

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

Explore how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the solutions that simplify infrastructure at the edge

Infrastructure icon

Infrastructure

Stay up to date on the world’s leading enterprise Linux platform

application development icon

Applications

The latest on our solutions to the toughest application challenges

Original series icon

Original shows

Entertaining stories from the makers and leaders in enterprise tech