Dr. Pranay Jha

VMware • Cloud • AI • Enterprise Architecture

FORMERLY
VMware Insight & Cloud Pathshala
What began over a decade ago as a passion for sharing knowledge has evolved into a unified platform for Enterprise AI, VMware, Cloud Architecture, Research, and Modern Infrastructure.
, ,

Flavor Mappings, Image Mappings and Network and Storage Profiles in VCF Automation (VCF Automation Series, Part 11)

Mappings and profiles are the translation layer that makes one template deploy in any region. Flavor and image mappings, network profiles, storage, and the naming contract that ties them together.

VCF Automation Series · Part 11 of 30

TL;DR · Key Takeaways

  • Mappings and profiles are the translation layer between the names your templates use and the real resources each region has.
  • A flavor mapping turns a name like small into actual CPU and memory; an image mapping turns a name like ubuntu into a real OS image, per region.
  • A network profile is a collection of network characteristics: existing networks, their settings, and policies for on-demand networks.
  • Storage profiles, backed by storage classes and policies such as the vSAN default, decide how a deployment’s disks are placed.
  • Get the naming contract right and one template deploys unchanged across regions. Get it inconsistent and every region needs its own template.
Who this is for: admins and architects building the infrastructure layer templates will reference.  Prerequisites: cloud zones and regions from Part 10.

Write a template that asks for a small Ubuntu box, and it should deploy in London or Frankfurt without a single change. Mappings and profiles are what make that true. They are the translation layer between the names your templates speak and the real flavors, images, networks, and storage each region actually has. Skip this layer and your templates hard-code one region’s specifics, which means a second region needs a second template, and now you maintain two of everything.

The four building blocks

Four pieces sit between a template and the metal. A flavor mapping resolves a size name to real CPU and memory. An image mapping resolves an OS name to a real template or image. A network profile describes which networks a deployment can use and how on-demand networks are built. A storage profile decides how disks are placed using storage classes and policies. Templates reference the names; these four resolve the names to reality, per region and cloud account.

Building blockTurns this nameInto this
Flavor mappingsmall, medium, largeReal vCPU and memory
Image mappingubuntu, win2022A real template or image
Network profileapp-net, on-demandReal networks and policies
Storage profilegold, defaultA storage class or policy
Names in, reality out Template saysflavor: smallimage: ubuntunetwork: app-netstorage: gold resolve flavor mapping -> 2 vCPU / 8Gi image mapping -> ubuntu-2204 network profile -> seg-app-01 storage profile -> vSAN gold Real VMon this region
The template speaks in names; mappings and profiles turn those names into the region’s real resources.

The naming contract is the whole trick

Here is the insight that makes this layer worth the effort. Because a template references a name and the mapping resolves it per region, the same name can point at different real resources in different regions, and the template never knows. Define small as 2 vCPU and 8Gi in region-a and the equivalent in region-b, define ubuntu as the local Ubuntu template in each, and a single template deploys in both. The names are a contract between template authors and infrastructure admins: authors promise to only ask for names that exist, admins promise every region honours the same names.

# Same names, different reality per region (flavor + image mappings)
region-a:
  flavor:  small  -> 2 vCPU, 8Gi
  image:   ubuntu -> ubuntu-2204-template-a
region-b:
  flavor:  small  -> 2 vCPU, 8Gi
  image:   ubuntu -> ubuntu-2204-template-b

# The template just references the names, so it is region-agnostic:
resources:
  app_vm:
    type: Cloud.vSphere.Machine
    properties:
      flavor: small        # resolved by the region's flavor mapping
      image:  ubuntu       # resolved by the region's image mapping
One template, many regions Template: flavor smallregion-agnostic region-a mappingsmall -> 2 vCPU / 8Gi, template-a region-b mappingsmall -> 2 vCPU / 8Gi, template-b
The same name resolves differently per region, so one template serves all of them without edits.
In practice: the failure mode here is a missing mapping in one region. A template that works in region-a fails in region-b because nobody defined the ubuntu image mapping there. The template is fine; the region is incomplete. When a deploy fails only in one region, check that region’s mappings before you touch the template.

Network and storage profiles

A network profile is more than a list of networks. It is a collection of network characteristics for a named cloud account and region: the existing networks a deployment can attach to and their settings, plus policies that define on-demand networks and other behaviour. This is where VCF Automation’s ability to build NSX networking in the background gets configured, so a template can ask for an on-demand network and the profile decides how that network is actually created. Get the profile right and developers request networking without ever touching NSX; get it wrong and either nothing connects or everything lands on one flat segment.

Storage profiles do the same job for disks. Backed by storage classes and policies, including the vSAN default policy, a storage profile decides how a deployment’s storage is placed and what guarantees it carries. A name like gold can map to a high-performance vSAN policy in one region and the nearest equivalent in another, keeping the same portability promise as flavors and images. The mistake teams make is leaving storage to the default and discovering later that everything landed on one policy with no way to differentiate tiers.

Worked example

You support two regions and want one template library. In each region you define three flavor mappings (small, medium, large), the same handful of image mappings (ubuntu, win2022) pointing at that region’s local templates, a network profile that exposes an existing management segment plus an on-demand policy for app networks, and two storage profiles (standard and gold) mapped to the local vSAN policies. Now an author writes one template that asks for medium, ubuntu, an on-demand app network, and gold storage, and it deploys identically in both regions. Add a third region later and the only work is recreating those same named mappings there. The template library does not change at all.

How on-demand networking actually works

The headline capability of a network profile is on-demand networking, and it is worth understanding because it is where a lot of the platform’s value lives. A template can declare it needs a network without naming an existing one, and the profile’s on-demand policy tells VCF Automation how to build it: which transport zone, which edge, what kind of segment, and how it connects outward. The platform then creates the NSX segment and the wiring in the background at deploy time, and tears it all down when the deployment is destroyed. For a developer this is the difference between filing a network ticket and waiting, and getting a working, isolated network as part of the same request that built their machines.

On-demand networking Template askson-demand network Network profile policytransport zone, edge, type NSX segment builtcreated at deploy, gone at destroy no NSXticket needed
The template asks; the profile decides how; the platform builds and later removes the NSX network on its own.

The design decision inside a network profile is which network types you expose. Existing networks attach a deployment to a segment you already run, which suits shared services everyone uses. On-demand networks create fresh, isolated segments per deployment, which suits self-contained application stacks that should not share a broadcast domain with anyone else. Outbound and routed options control how those networks reach the rest of the world. Expose only the types your tenants should actually use, because every network type you offer is a shape of network someone can now request without asking you, and an over-generous profile is how unexpected segments start appearing in NSX.

One binding detail ties this back to portability. A profile is defined for a specific cloud account and region, so it is not shared globally; each region needs its own profile, just as it needs its own mappings. That is why a template that deploys cleanly is really a template plus a complete set of mappings and profiles in the target region. It also means a change to one region’s network design is a change to that region’s profile alone, not a global edit, which is safer but easy to forget when you assume a fix in one place covers everywhere. Document the profiles next to the mappings, because together they are the full contract every template silently depends on.

My take: on-demand networking is the feature that finally gets developers out of the network-ticket queue, so it is worth getting right early. But scope it: expose isolated app networks and the shared segments people need, and nothing more. A profile that offers every option is a profile you will be auditing later.

The Bottom Line

Mappings and profiles are unglamorous and they are where template portability is won or lost. My recommendation: agree a small, fixed vocabulary of names, three flavors, a short list of images, a couple of storage tiers, and make every region honour exactly those names. Treat the names as a contract: authors only ask for names that exist everywhere, admins guarantee every region defines them. Build network profiles that expose what developers actually need, including on-demand networks, so they never have to reach into NSX. Do this and your template library is written once and runs anywhere you have a region. Skip it and you will maintain a separate template for every place you deploy, which is the exact toil this platform exists to remove.

Next we finally write the thing all of this supports: VMware Cloud Templates, the blueprints that reference these names. For where deployments actually land, revisit Part 10 on cloud zones. How many flavor and image names do you standardise on? Tell me in the comments.

VCF Automation Series navigation:
Previous: Part 10, cloud zones and placement.  Next: Part 12, VMware Cloud Templates (coming soon).  Up: VCF Automation Guide (pillar).

References

About The Author


Discover more from Dr. Pranay Jha

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Dr. Pranay Jha

Subscribe now to keep reading and get access to the full archive.

Continue reading