Virtualization Technology News and Information
Running VMs in a Containerized World

By Jeff Vincent, Developer Relations, MacStadium

Containerization of applications offers a wide variety of benefits - not the least of which is the increased speed with which teams can iterate on a given product and thus release new versions of an application much more often. This translates into business success in this competitive industry, because one of the most effective means of building and maintaining a dedicated user-base is through the regular and error free release of new product features.

Containers make this possible because of the way that they allow development teams to ship core code along with its dependencies from one environment to the next very simply. This means that a developer can write code locally that will be guaranteed to run in any environment in the exact same way that it does locally.

This idea of running the same code on different servers in exactly the same way was traditionally managed with virtual machines (VMs). However, the increased computational overhead of virtualizing a complete operating system (the cost of running one or more hypervisors and VMs on top of them) has been a primary driver in the industry-wide migration to container technology. That said, there are still use cases that require a full VM.

If a team needs to include Windows or macOS VMs in their production environment, this has the potential to slow the organization's adoption of containers and microservice architectures, because VMs and containers historically haven't played well together, as container orchestration tooling, such as Kubernetes, historically hasn't supported running full VMs. However, there are new and emerging tools that make it not only possible, but relatively simple to run containers and VMs alongside each other, and thus allow for a hybridization of these two technologies as needed.

Why run containers and VMs together?

There are a variety of cases in which you will likely need to combine container technology with more traditional full VMs.

Common Use Cases

  • Supporting macOS native applications in Kubernetes.
  • Supporting legacy applications and services that require a full VM to run alongside modern, containerized applications and processes.
  • Isolating processes entirely from the underlying host for increased security.
  • Transitioning away from full VM requirements, while still advancing with Kubernetes infrastructure.
  • Running a cluster in cluster Kubernetes architecture.
    • This is gaining in popularity because of the ease with which it allows teams to tear down and spin up new clusters should something go awry, rather than having nurse a cluster back to health continually at great expense in terms of time and resources.

Containers vs VMs

Container technology is generally preferred to virtual machines except in the rare case that a process cannot run in a container. This could happen for a number of reasons, but they all center around the fact that containers only provide the application layer to a given operating system - such as your favorite Linux distribution. This means that the container relies on the host machine for "filling in the gaps" in what ships with the container. Virtual machines, on the other hand, provide a complete operating system that is fully distinct from the host machine.

So, if your application needs access to these low-level processes that are not directly available in a container, the container will need to be run in a privileged mode, which can open a different can of worms related to security best practices. The solution to this problem is generally to provide a completely virtualized operating system that can do everything it is asked to do without any elevated privileges as far as the way that it is interacting with the physical host machine that underlies your container orchestration tooling - whether that's Kubernetes, OpenShift, or anything else for that matter.

When Linux isn't an option

Container technology is based entirely upon the Linux operating system. But there are clearly tools and products that are written to run on Windows and macOS. In order to accommodate tools and services that require these operating systems in a container orchestration tool, such as Kubernetes, we have to turn to virtualization within the cluster itself.

There are a variety of methods and tools to accomplish this, but two of the industry leaders in this space are KubeVirt and Orka.


KubeVirt is an add-on to a Kubernetes cluster that allows users to spin up virtual machines that behave similarly to a container within a K8s cluster. It utilizes KVM as a virtualization platform and allows users to create and interact with VMs through familiar interfaces, such as kubectl.


  • Various Linux distributions
  • Windows


Orka is MacStadium's flagship product. It supports both Intel-based and Apple Silicon-based macOS VMs in Kubernetes clusters. VM configuration and deployment can be controlled via the Orka CLI or the Orka API. Additionally, users have access to a full Kubernetes "sandbox" environment alongside their macOS VMs that can be controlled with kubectl.


  • macOS

Moving legacy applications to the cloud

There are a huge number of benefits to moving your application hosting and DevOps processes to the cloud. Probably the most immediate benefit is the fact that you no longer need to support your own infrastructure, and you can instead simply farm out that job to specialists who can do it better and less expensively.

This means that you can pour resources into improving your core product, rather than having to divide your attention across such a wide variety of problems, such as ensuring the uptime of your application, or maintaining fragile SSH connections with your CI server - all of which require the attention of your senior engineers, which becomes enormously expensive very quickly.

But what about products that simply cannot easily be containerized? Maybe they need full access to the underlying host's low-level processes, or maybe they need to be run in isolation for security's sake. Whatever the case, there are now tools that allow you to make this transition from on-premises hosting to the cloud without completely retooling your tech stack overnight.


Kubernetes is an extremely powerful tool for orchestrating containers, but it can also accommodate virtual machines (VMs) with the help of some emerging add-ons to K8s that extend its native capabilities. These virtualization add-ons allow teams to run VMs alongside containers within a single cluster, which allows for an efficient means of transitioning legacy software to a microservice architecture. It also provides a clear path to combining multiple operating systems within a Linux-based container orchestration platform such as Kubernetes.


***To learn more about containerized infrastructure and cloud native technologies, consider joining us at KubeCon + CloudNativeCon Europe 2022, May 16-20.


Jeff Vincent Developer Relations, MacStadium


Jeff Vincent is a DevRel at MacStadium with an emphasis on technical writing. He focuses on new and emerging cloud computing technology, virtualization, and DevOps solutions.

Published Tuesday, May 10, 2022 7:33 AM by David Marshall
There are no comments for this post.
To post a comment, you must be a registered user. Registration is free and easy! Sign up now!
<May 2022>