IBM & Red Hat on AWS

Build once, deploy many with Troshka nested virtual machine labs on AWS

Anyone who has run a technical workshop, a customer demo, or a hands-on training track knows the drill. Every environment is built from scratch. You provision cloud VMs, install an operating system, deploy OpenShift, install operators, wire up the networking, and finally lay down the lab content on top. It works, but it is slow, often taking an hour or more per environment, paid every single time. It is fragile, because every link in the chain, including images, infrastructure templates, package repos, and operator bundles, is a place the build can break. It is also expensive, because each deploy burns compute reproducing identical work, and every user gets their own dedicated cloud instances. At event scale, with hundreds or thousands of concurrent environments, those three problems compound into real cost, real failure rates, and real operational toil.

Troshka takes a different path. It is a self-service web platform for building nested VM environments, meaning VMs running inside VMs running on Amazon Web Services (AWS) infrastructure. The name evokes a matryoshka doll, with environments nested neatly inside one another, all the way down. The goal is to give someone a bare-metal-like environment in the cloud, with BMC management, without the cost or the fragility. In this post, we show how Troshka works, how it uses AWS services such as Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3), and how to deploy it on AWS with the Amazon Elastic Kubernetes Service (Amazon EKS) quickstart.

What Troshka is

Troshka is a visual environment builder with an automation-friendly core. It provides the following capabilities.

  • A drag-and-drop canvas. Drop VMs, containers, networks, routers, gateways, and storage onto a graphical canvas, then wire them together. You design the shape of the environment, and Troshka handles the rest.
  • YAML-based infrastructure definition. Everything you can build on the canvas is also expressible as YAML, so environments can be version-controlled and driven through CI/CD pipelines, with the same topology defined as code.
  • Full VM lifecycle management. Start, stop, snapshot, and inspect every VM in the topology from one place.
  • Template and pattern export. Capture a finished environment, including compressed disk snapshots and VM metadata, as a reusable pattern shipped to Amazon S3.
  • Ansible collection integration. Layer post-deployment configuration on top of a base pattern using the Red Hat Ansible collection for Troshka.
  • Guided lab delivery via Showroom. Ship a curated experience, including instructions, embedded terminals, and console access, alongside the environment itself.
  • Shareable, time-limited demo labs. Publish an environment as a lab with a public, token-scoped URL that expires when you want it to.

Troshka is not limited to OpenShift demos. The same canvas builds advanced networking labs with routers, multi-segment topologies, gateways, and VXLAN-isolated projects, and almost any multi-VM environment you can wire up. OpenShift and OKD (the community-driven upstream project that powers Red Hat OpenShift) are first-class, not the only target.

The organizing idea behind all of this is build once, deploy many, which works as follows.

  • A lab author builds the environment once, either by hand on the canvas, or as code through YAML and automation.
  • The finished environment is captured as a pattern, which is a snapshot of the entire topology, with all VMs, disks, networks, and configuration baked in.
  • When a user orders the lab, Troshka deploys the pattern by restoring that tested snapshot onto nested VMs.

You do the hard, error-prone work once. After that, every deployment is a fast, deterministic restore.

Why it matters

The nested, pattern-based model changes the economics and reliability of running lab and demo environments in the following ways.

Feature What Troshka delivers
Deploy time 5–10 minutes, using a snapshot restore instead of a from-scratch build
OpenShift awareness Images and reconstitutes Red Hat OpenShift and OKD for demos, while staying general-purpose for networking labs, routers, and arbitrary multi-VM topologies
Reliability A single API call restores a tested snapshot, collapsing a long, multi-step build chain into one deterministic operation
Consistency Identical base environments on every deploy, with no package-version or timing drift
Iteration speed Change → capture → deploy in minutes, instead of change → wait an hour → test
Cost per environment Multiple environments share a single Amazon EC2 host instead of dedicated instances per user
Scale Scales Amazon EC2 hosts up and down as needed, from initial development to a full workshop, with full cleanup
User access Each user gets full admin over their own isolated cluster, without impacting anyone else
Isolation & security No cloud credentials inside the environment for end users; physical network isolation per project

In short, Troshka delivers 5–10 minute deployments, identical base environments, and full admin for each user over their own isolated lab, whether that lab is a single-node OpenShift deployment, a multi-router networking topology, or something you designed from scratch, without impacting anyone else.

How it works on AWS

Troshka is built to run on AWS, and it relies on a focused set of services to do it. This is where the nested model pays off.

  • Amazon EC2 with nested virtualization. This is the foundation for nesting hypervisors. When you need nested virtualization (for example OpenShift or OKD as nested VMs), lab environments run on Amazon EC2 instances with NestedVirtualization=enabled. Troshka uses the 8th-generation Intel instance families that support nested virtualization (C8i, M8i, and R8i) with KVM and a RHEL-compatible host OS. Because the VMs are nested, a single large Amazon EC2 instance can host multiple complete environments side by side, such as OpenShift clusters, networking labs, or mixed topologies, each fully isolated with its own networking. That is where the cost savings come from, because you are paying for one instance, not one per user. Networking-only and general multi-VM demos use the same host model, but they do not depend on nesting a second hypervisor.
  • Amazon S3 patterns and snapshot storage. Patterns are the storage backend’s core object, made up of compressed disk images plus VM metadata, saved to S3. Data transfer into S3 is free, so you pay mainly for storing the disk images. A typical OpenShift lab pattern is 30–50 GB, which is low-cost to keep in S3.
  • Elastic IPs and Amazon Virtual Private Cloud (Amazon VPC). These provide the required networking. EIPs are attached to the Troshka hosts, and hosts live inside your Amazon VPC. The nested environments do not consume cloud networking, because all the DHCP, DNS, routing, and isolation happens internally, so the AWS-side networking footprint stays small and stable.

Two supporting AWS services worth calling out for scale and operations are the following.

  • Amazon FSx for OpenZFS. Optional shared storage pools that enable live migration of running environments between hosts and auto-extend when capacity runs low.
  • Amazon Elastic Block Store (Amazon EBS). Host volumes that grow automatically based on usage thresholds, so there is no manual capacity planning.

The rest of the stack (for completeness). Troshka itself is a Next.js frontend built on PatternFly (Red Hat’s open-source UI library) and React Flow, a FastAPI backend, and PostgreSQL for state (Amazon RDS for PostgreSQL in the production configuration). On each host, a troshkad agent manages the VMs and a troshka-vncd relay brokers console access.

Reference architecture diagram showing EC2 hosts with nested VMs, the S3 pattern store, EIP/VPC placement, and the web portal/console path.

Figure 1. Reference architecture diagram showing Amazon EC2 hosts with nested VMs, the S3 pattern store, EIP/VPC placement, and the web portal/console path.

Cost efficiency and elastic capacity

Two things make the AWS story compelling. Troshka is cheaper to run, and it scales with demand.

Why it is cheaper

  • Multiple environments share a single Amazon EC2 host instead of each user getting dedicated instances.
  • Disk images are thin-provisioned and shared across deploys through copy-on-write. In other words, 50 identical OpenShift labs do not need 50 copies of the base image.
  • No cross-AZ data transfer fees for inter-node traffic, because nested nodes sit on the same host and all of that traffic stays local.
  • Low-cost S3 pattern storage, and no per-user Elastic IPs, because the only EIPs are on the hosts.
  • No idle lab hosts. When no labs are running, you can tear down the lab hosts, leaving S3 pattern storage and the Troshka control plane as the remaining costs.

Elastic capacity

  • Troshka hosts are regular Amazon EC2 instances with an agent installed. Spinning up a new host takes minutes. You provision the instance and run the agent installer, and the host connects automatically. When demand drops, tear it back down.
  • Scale up for a large event and back down when it is over, with no long-lived lab infrastructure to manage.
  • Storage scales the same way. Shared pools (Amazon FSx for OpenZFS or NFS) auto-extend when capacity runs low and can be torn down when no longer needed.

A bare-metal experience with BMC-style management

This is where Troshka stands apart. It gives you a bare-metal-like environment with BMC-style management on disposable cloud infrastructure.

  • Virtual BMC. Each VM can expose Intelligent Platform Management Interface (IPMI) and Redfish endpoints, so VMs emulate bare-metal systems with a real BMC. You can drive true Preboot Execution Environment (PXE) plus BMC provisioning workflows the same way you would against physical hardware.
  • Real boot control. PXE boot (legacy, iPXE, and UEFI HTTP), configurable boot device order, NIC model selection, and static IP reservation are all available per VM.
  • Networking lives inside the environment. DHCP, DNS, routers, NAT gateways, and VXLAN isolation all happen inside the nested environment, so there is no cloud networking to configure per environment.

The result feels like managing physical bare metal, with power control, boot order, and console access, but every bit of it is disposable and reproducible.

Security by design

Traditional lab environments hand users cloud credentials, such as access keys on the bastion, provider secrets inside the cluster, and AWS Identity and Access Management (IAM) roles that can provision resources. That is a constant source of risk. Troshka is designed to remove that class of risk in the following ways.

  • No cloud credentials in the environment. The nested VMs have no awareness of the underlying cloud, because they are ordinary VMs on a hypervisor. No keys, no secrets, no attached IAM roles.
  • Environments are static. Even with full cluster admin, users cannot provision cloud resources. Environments include no cloud credentials or cloud API access. What is in the pattern is what you get.
  • Network isolation is physical, not policy-based. Each project runs in its own network namespace with VXLAN isolation, which provides a separate network stack instead of a firewall rule that can be misconfigured.
  • Token-scoped access with no discoverable endpoints. Access requires a cryptographic token tied to a single project, so there is nothing to scan for or brute-force.
  • Controlled outbound access. Outbound internet access can be turned off entirely or restricted to specific ports.
  • No external dependencies at deploy time and no phone-home. Once a pattern is captured, everything is baked in.

How to use Troshka

Prerequisites

To deploy Troshka on AWS, you need account access sufficient to provision and manage the following resources.

  • Amazon EC2. Permission to launch and manage instances, including instance types that support nested virtualization (C8i, M8i, and R8i).
  • Amazon S3. Permission to create and write to a bucket for pattern and disk-image storage.
  • Elastic IP addresses (EIPs). One or more EIPs to associate with Troshka hosts.
  • Amazon VPC. Network access to place hosts, including subnets and the associated routing and security configuration.

You also need a Kubernetes target for the Troshka control plane. On AWS, the fastest path is the Amazon EKS quickstart in the Troshka repository. For that quickstart, prepare the following.

  • AWS CLI credentials for the target account and Region
  • Helm 3, kubectl, curl, and jq on the machine that runs the installer
  • IAM permissions to create CloudFormation stacks, EKS clusters, VPCs, IAM roles, load balancers, and related services. AdministratorAccess works for demos, and a scoped deployer policy ships at deploy/eks/iam-deployer-policy.json.

Walkthrough

The following steps walk through the end-to-end flow, from installation to a shared lab. Teardown is covered in the Cleanup section.

  1. Install Troshka. On AWS, start with the Amazon EKS quickstart.
    • Clone the repository https://github.com/rhpds/troshka.
    • Set AWS_REGION.
    • Run ./quickstarts/eks/install.sh.
    • The script uses AWS CloudFormation to stand up a VPC and an EKS cluster, and then deploys Troshka with Helm.
    • By default, the installer uses an sslip.io hostname, Let’s Encrypt TLS, and nginx basic auth, and then seeds a Fedora Cloud Amazon EC2 host for nested labs.
    • To use a public DNS name, pass --domain troshka.example.com. This requires a public Amazon Route 53 hosted zone.
    • For a production-shaped stack with Amazon Relational Database Service (Amazon RDS), Amazon S3, Amazon ElastiCache, Amazon Cognito, and a RHEL host, use --production --domain troshka.example.com.
    • The install script seeds an Amazon EC2 provider and one nested virtualization compute host. When Admin → Hosts shows the host as connected, you are ready to build.
    • Note. The default installation uses an sslip.io hostname and nginx basic authentication and is intended for evaluation. For production use, deploy with --production and your own domain, and use the scoped deployer policy instead of AdministratorAccess.
  2. Deploy a Quick Start single-node OpenShift (SNO) cluster. From Projects, create a new project and choose Quick Starts.
    • If you don’t have a Red Hat pull secret, choose OKD SNO, which installs without one.
    • For full OpenShift, open Settings → OCP Pull Secret, paste the pull secret from https://console.redhat.com/openshift/install/pull-secret, save it, and then choose OpenShift SNO.
    • Set a common password (and optionally a version), and then deploy. Troshka stands up the single-node cluster on your seeded host.
    • Not only OpenShift. For routers, multi-segment labs, or a custom design, start with a blank project or a networking-focused topology. Nested virtualization is optional unless you are nesting a hypervisor (OpenShift or OKD). On KubeVirt native compute, ordinary labs skip nested virtualization entirely.
  3. Watch it come up. Follow live install logs on the project, and then open MegaConsole to see every VM console, including the SNO node, in a single live grid.
  4. Capture as a pattern. Snapshot the whole topology, including compressed disk images and VM metadata, into a reusable pattern in Amazon S3.
  5. Bulk deploy. Stamp out anywhere from 1 to 500 environments at once, using naming templates to keep them organized. Larger deployments require more hosts.
  6. Share. Publish environments as time-limited demo labs with portal tokens scoped to each user, and deliver guided content through Showroom.

For automation-minded teams, everything in the UI is available through the API, and the Ansible collection handles post-deployment configuration for infrastructure-as-code workflows.

OpenShift and local (Mac, Windows, and Linux) quickstarts are also available under docs/quickstarts/ if EKS is not your target. Broad Kubernetes support matters because OpenShift is not universally accessible. EKS and vanilla Kubernetes keep Troshka within reach for more teams.

Cleanup

Tearing down is deliberately simple. Deleting a project from within Troshka removes all of its nested resources in one operation, including VMs, disks, networks, and tokens. A Troshka project is a single entity, so no orphaned cloud resources are left behind, such as stuck infrastructure stacks, dangling EIPs, or leftover security groups. If anything is missed, the host garbage collector catches it on the next pass.

To fully remove the EKS quickstart, run the following command. It terminates seeded hosts, destroys all projects, uninstalls Helm, and deletes the CloudFormation stack.

./quickstarts/eks/teardown.sh

When you are finished with a manually provisioned setup, terminate the Amazon EC2 hosts and release any EIPs you allocated to fully clean up the AWS-side footprint.

Conclusion

Troshka changes how lab, demo, and workshop environments are delivered on AWS. Instead of rebuilding every environment from scratch, a lab author builds it once, captures it as a pattern in Amazon S3, and deploys it many times as a fast, deterministic restore. Multiple isolated environments share a single Amazon EC2 host, users get full admin over their own lab without cloud credentials, and hosts scale up for an event and back down when it is over.

Troshka is actively evolving, with roadmap work underway on multi-instance pattern portability (deploying a pattern built on one instance onto any other), automatic lifecycle timers, and more.

To get started, clone the Troshka repository at https://github.com/rhpds/troshka and follow the Amazon EKS quickstart described in this post. Build your first pattern, deploy it, and share it as a time-limited demo lab.

John Walter

John Walter

John Walter is a Senior Partner Solutions Architect at AWS working with Red Hat. He has over 15 years of experience working with customers to build and deliver solutions running on Red Hat and AWS.

Michelle Martin

Michelle Martin

Michelle is a Senior Customer Solutions Manager at AWS. She has an analytical background with fluency in cloud, process improvement, project management (Agile & SDLC), and application architecture. In her current role, Michelle enables AWS customers in their cloud adoption and digital transformation journey.

Patrick Rutledge

Patrick Rutledge

Patrick Rutledge has been a Senior Principal Architect at Red Hat for almost 15 years. He has been the driving force for deployment of hands-on labs at Red Hat Summit for over 10 years. He is an expert in cloud architecture and automation. His current role is providing architecture and support for the Red Hat Demo Platform, which allows sales and partners to provide product demos. He spends most of his time automating with Ansible, supporting OpenShift and Kubernetes, coding, and AI integration with tooling.

Sukanth Rajan

Sukanth Rajan

Sukanth Rajan is a Technical Account Manager in Strategic Accounts at Amazon Web Services. He helps AWS's largest customers architect, migrate, and optimize their mission-critical workloads on the cloud. He leverages his deep technical expertise, especially in databases, to help customers solve critical issues and build highly reliable, secure, and cost-effective solutions using AWS services.