Skip to the stories
Windows & PowerShell

Build a CPU-Only Ollama AI VM in VCF Automation Without PAIS

By Mayank Goyal 855 views

A VCF Automation catalog template deploys Ollama and optional Open WebUI on CPU. See setup requirements, measured speed, limits and security considerations.

Build a CPU-Only Ollama AI VM in VCF Automation Without PAIS

💡 A small CPU-only VM can put private AI within reach of a lab team. In a VCF Automation 9.1.1 VM Apps organisation, a catalog request can build an Ubuntu VM, install Ollama, preload a model and optionally add Open WebUI. The setup needs no GPU or VMware Private AI Services (PAIS), but it does need a correctly prepared network and a flavor mapping large enough for the requested VM.

🚨

The result is a practical sandbox for trying local models on infrastructure you already run. It isn't a substitute for a production AI platform: generation speed is modest, small models make mistakes, and the Ollama API has no authentication. The measurements below come from CPU-only deployments and show where this approach fits.

What the catalog item deploys

The template builds an Ubuntu 24.04 VM from a cloud image, installs Ollama, and pulls a selected model. Open WebUI is optional. When enabled, it runs in a container and provides a browser interface to the local models. The request form also accepts an optional Hugging Face GGUF model and, if supplied, a Claude API key for adding Claude models to Open WebUI.

  • Ollama listens on port 11434, making its API available to other systems on the network.
  • Open WebUI is available on port 80, with its admin account created from the request form.
  • Install progress is written to a guestinfo value that administrators can inspect in vCenter.
  • The model selector includes small models intended to run on CPU, including Llama 3.2 1B and 3B, Qwen 2.5 Coder 3B, and an option to install Ollama without preloading a model.

The template was tested with VCF Automation 9.1.1 in a VM Apps organisation on vSphere 9 hosts with Intel Xeon Silver 4216 CPUs. The guest was Ubuntu 24.04; Ollama versions 0.40.16 and 0.40.19 were tested, while the install script retrieves the current release. The test environment had no GPUs. A retest on 30 November 2026 used network addresses supplied through phpIPAM rather than VCF Automation's own IP range. Orchestrator isn't required for the CPU-only deployment; cloud-init handles its setup.

Prepare the network and sizing first

The request form doesn't ask users to select an IP address or enter network settings. VCF Automation assigns the next available address from the IP range on a network tagged net:lab-vm-mgmt, or obtains one through an IPAM integration. Cloud-init reads the assigned address, netmask, gateway, DNS servers and search domain from self.networks[0], then writes the guest's netplan configuration.

⚠ Check the network profile before publishing the item. Under Infrastructure > Network Profiles > your profile > Networks, confirm that the network has a domain, IPv4 CIDR, IPv4 default gateway, DNS servers and DNS search domains. It also needs an IP range or an IPAM integration. The VM must be able to reach the internet through the network's routing, firewall and NAT configuration. This template has no proxy settings, so missing network details or blocked downloads can stop installation at its first download step.

VCF Automation network profile, edit network dialog with domain, IPv4 CIDR, default gateway, DNS servers and DNS search domains highlighted
The network profile fields the template reads: domain, IPv4 CIDR, default gateway, DNS servers and DNS search domains. Values differ by environment, and internet access must be provided by the network.

VM sizing also depends on the region's flavor mappings, even though the cloud template sets CPU and memory directly. In the tested environment, the initial 16 vCPU request failed with Cannot find matching flavors for instance: Values set in flavor mappings cannot be exceeded. The day-two Resize action had the same 8 vCPU / 16 GB ceiling.

The largest mapping was Large, at 8 vCPU and 16 GB. Adding an XLarge mapping for 16 vCPU and 32 GB under Infrastructure > Configure > Flavor Mappings resolved the limit. Set the template's input limits to match the available mapping; direct CPU and memory values don't bypass that ceiling.

How the template installs Ollama and Open WebUI

The VM uses the Ubuntu 24.04 cloud image, noble-server-cloudimg-amd64.ova. Its size is driven by request inputs for CPU, memory and disk. The machine resource sets one virtual socket containing all requested cores, disables guest OS customization and attaches the network selected by the template:

ollamaHost:
type: Cloud.vSphere.Machine
properties:
name: ${input.hostName}
imageRef: ${variable.imageOva}
cpuCount: ${input.cpuCount}
# One virtual socket with all cores
coreCount: ${input.cpuCount}
totalMemoryMB: ${input.memoryGb * 1024}
storage:
bootDiskCapacityInGB: ${input.diskSizeGb}
customizeGuestOs: false
networks:
- network: ${resource.ollamaNetwork.id}
assignment: static

Model and size inputs are configurable. The smallest tested default is llama3.2:1b, listed as about 1.3 GB and the fastest option. The 3B model is listed at about 2 GB and described as offering better answers at roughly half the speed. Qwen 2.5 Coder 3B is offered for code, and the full template also includes Qwen 2.5, Gemma 3 and Phi-4 mini. An optional free-text input accepts a further Hugging Face model. The default VM size is 16 vCPU and 32 GB.

Cloud-init runs the configuration steps in sequence: set the static IP with netplan, install Ollama, pull the models, and, when selected, install Docker and Open WebUI. It records progress in /var/log/ollama-install.log and publishes the current status as guestinfo.ollama.status through VMware's guest tools. That gives an administrator a progress indicator in vCenter without logging in to the guest.

Ollama is installed using its install script, then configured to listen on the network. The service is set to keep a model loaded for 30 minutes, process one parallel request and keep one model loaded at a time. Those limits reflect the single-request CPU setup used in the test:

curl -fsSL https://ollama.com/install.sh | sh
mkdir -p /etc/systemd/system/ollama.service.d
printf '%s\n' '[Service]' "Environment=OLLAMA_HOST=0.0.0.0:$PORT" 'Environment=OLLAMA_KEEP_ALIVE=30m' 'Environment=OLLAMA_NUM_PARALLEL=1' 'Environment=OLLAMA_MAX_LOADED_MODELS=1' > /etc/systemd/system/ollama.service.d/10-lab.conf
systemctl daemon-reload
systemctl enable ollama
systemctl restart ollama

The model pull runs through Ollama's REST API. The script retries up to three times, checks the model list to confirm that the pull completed, and waits 15 seconds between unsuccessful checks. Open WebUI runs in a Docker container connected to Ollama on the host. The admin account is created after the container starts, using the email and password supplied with the request.

Disable Open WebUI background tasks on CPU

Open WebUI can request extra model work after each chat message, including a title, tags, follow-up suggestions and search queries. On a CPU-only VM configured for one request at a time, those tasks can queue behind the user's next prompt. The interface may then feel much slower than the model's answer generation alone would suggest.

The template disables these tasks when it starts the container. That includes title, tag, follow-up, autocomplete, search-query and retrieval-query generation, as well as the OpenAI API connection:

docker run -d --name open-webui --restart always -p 80:8080 \
--add-host=host.docker.internal:host-gateway \
-e OLLAMA_BASE_URL="http://host.docker.internal:$PORT" \
-e ENABLE_OPENAI_API=False \
-e ENABLE_TITLE_GENERATION=False \
-e ENABLE_TAGS_GENERATION=False \
-e ENABLE_FOLLOW_UP_GENERATION=False \
-e ENABLE_AUTOCOMPLETE_GENERATION=False \
-e ENABLE_SEARCH_QUERY_GENERATION=False \
-e ENABLE_RETRIEVAL_QUERY_GENERATION=False \
-v open-webui:/app/backend/data \
ghcr.io/open-webui/open-webui:main

💡 These environment settings are read when Open WebUI starts for the first time. For an existing installation, switch off the same features in Admin Panel > Settings > Interface.

Deployment time and access

After the cloud template version is released, users can request it from the catalog. In the reported run, the request used the default values and required only a password to be entered. The deployment itself completed in about six minutes, but that wasn't the same as having a working chat interface: cloud-init still had to download Ollama, the selected model, Docker and the Open WebUI image.

VCF Automation catalog request form for LAB - Ollama AI - Ubuntu with the model dropdown and Hugging Face field highlighted
The request form exposes a model selector and an optional field for a Hugging Face model.
VCF Automation deployment overview listing host name, IP, size, local model, Ollama API, Open WebUI and SSH details
The deployment overview displays the VM address, Ollama API endpoint, Open WebUI link and SSH details.

To follow installation, open the VM's Configure > Advanced Parameters in vCenter and check guestinfo.ollama.status. A completed run reports a status such as:

5/5 done Ollama 0.40.16 models [llama3.2:1b] api :11434, Open WebUI on :80 (admin signup HTTP 200)

Time from request to a usable Open WebUI varied across runs: 14 minutes, 31 minutes and about 15 minutes in the latest retest. The reported cause of most of that variation was the Ubuntu mirror; on one occasion, downloading the single docker.io package took 20 minutes. Network access and mirror performance therefore affect readiness more than the catalog request's provisioning time.

Open WebUI is reached at http://<ip>/. Sign in with the admin email entered on the form, which defaults to [email protected], and the chosen password. Select a model from the menu to start a chat.

Open WebUI chat where llama3.2:1b answers a request for a bash one-liner
The tested Llama 3.2 1B model replied in about seven seconds, but its Bash one-liner sorted by the wrong column. The response was quick, not reliable.

Other systems can call the Ollama API directly. The API listens on port 11434; for example, these requests list available models and submit a prompt:

curl http://<ip>:11434/api/tags
curl http://<ip>:11434/api/generate -d '{"model": "llama3.2:3b", "prompt": "In one sentence, what is VMware vRealize Orchestrator?", "stream": false}'

Generation responses include fields such as eval_count and eval_duration, which were used to calculate tokens per second. There is no authentication on the Ollama API, however. Anyone who can reach port 11434 can submit requests, so keep access within a lab network and don't expose the endpoint elsewhere.

Adding a Hugging Face model

The optional hfModel input can pull a GGUF model from Hugging Face directly through Ollama. The example used in the test is:

ollama pull hf.co/bartowski/SmolLM2-1.7B-Instruct-GGUF:Q4_K_M

The naming pattern is hf.co/<user>/<repo>:<quant>. For CPU use, the tested guidance is to choose a model around 1 to 3 billion parameters with Q4 quantisation. Once pulled, it appears in the same Open WebUI menu as the models from the Ollama library. SmolLM2 1.7B generated about 26 tokens per second on 16 vCPU, close to Llama 3.2 1B in the reported test.

What the CPU measurements show

The test hosts had two Intel Xeon Silver 4216 sockets, each with 16 cores running at 2.1 GHz. Raw generation throughput was measured through the Ollama API:

ModelvCPUTokens per second
llama3.2:3b810.6 to 11.4
llama3.2:3b1615.6 to 16.3
llama3.2:1b1628.4
SmolLM2 1.7B (Hugging Face, Q4_K_M)1625.6

Throughput alone doesn't show how long a user waits for a complete answer. Three questions were also sent through Open WebUI on two fresh deployments: the earlier default of Llama 3.2 3B on 8 vCPU, and Llama 3.2 1B on 16 vCPU.

Question3B, 8 vCPU1B, 16 vCPU
Ideas for what to automate first (about 300 tokens)35.5 s13.3 s
Write a minimal VCF Automation cloud template30.4 s, invented YAML33.2 s, 900 tokens of invented YAML
What does VCF stand for? (one line)1.7 s, correct0.5 s, wrong

The smaller model returned an answer to the automation ideas prompt in 13.3 seconds, compared with 35.5 seconds for the 3B model. But speed came with a clear accuracy trade-off. The 1B model expanded VCF as “Virtual Machine Configuration File,” and its automation suggestions were generic. Neither model produced a cloud template that VCF Automation would accept; both generated invented YAML. These results point to a lab tool for simple questions, summaries and experiments, not a dependable source for product-specific answers.

Several tuning choices had limited impact in this environment. Doubling the 3B VM from 8 to 16 vCPU increased throughput by about 1.5 times rather than two times; the test identified memory bandwidth as the main constraint. Going beyond one host socket's cores is unlikely to improve performance and may reduce it. Changing from eight virtual sockets to one improved speed by about 5%, close to measurement noise, so the template uses one socket. The model plus roughly 4 GB was considered sufficient memory; the 32 GB default matches the XLarge flavor mapping. The 3B model gave better answers than the 1B model in these tests, but took two and a half times as long on CPU.

GPU options and their limits

⚠ The GPU approaches below were not tested in the lab. VM Apps has no VM classes or GPU setting in this cloud template. The Ollama configuration can stay the same once an NVIDIA driver is available in the guest; attaching and preparing the GPU is separate work, and the steps described here aren't a confirmed deployment recipe.

  • Use a GPU-ready vSphere template. Prepare a VM with the required vGPU device and NVIDIA guest driver, convert it to a vSphere template, then point the cloud template at that image instead of the Ubuntu cloud OVA. NVIDIA documents the host and guest setup in its vGPU deployment guide for VMware vSphere.
  • Attach the vGPU after provisioning. An Orchestrator workflow triggered by an event subscription can add a PCI device with a VirtualPCIPassthroughVmiopBackingInfo backing and the profile name in its vgpu property. It also sets memoryReservationLockedToMax and reconfigures the VM. The VM must be powered off while the device is added. The backing object is described in the vSphere API reference.

Either approach also requires NVIDIA vGPU Manager on the ESXi hosts, NVIDIA vGPU licensing, fully reserved VM memory and the NVIDIA guest driver inside the VM. If a VM configured with shared vGPU won't boot, Broadcom KB 431163 identifies BIOS and host settings as areas to check.

Optional Claude models in Open WebUI

For teams that want a stronger hosted model alongside a private local option, the template accepts an optional encrypted claudeApiKey. When provided, it configures a connection to https://api.anthropic.com/v1 and adds a fixed list of Claude models to the Open WebUI model menu. The list is controlled by the template's claudeModels input rather than discovered automatically by Open WebUI.

Open WebUI model menu showing three Claude models next to the local llama3.2:1b and SmolLM2 Hugging Face models
The model menu can show three Claude models alongside Llama 3.2 1B and the Hugging Face SmolLM2 model.

Claude chats leave the environment and incur per-use charges; chats with local models remain on the VM. If the API key isn't scoped to a workspace, requests also need an anthropic-workspace-id header, which can be added in Admin Panel > Settings > Connections. The connection and model list were checked at deployment, but Claude performance wasn't benchmarked against the local models.

Template availability and operational takeaway

Version 1.1.1 of the cloud template, its README and changelog are in the Aria_Automation_Templates repository. Import blueprint.yaml as a cloud template in a VM Apps project, then update networkTag to match the prepared network's capability tag and set dnsDomain for the environment. The VM needs internet access to the Ubuntu mirror, ollama.com, ghcr.io and Hugging Face.

For a lab, this is a manageable way to give users a self-service local AI VM without GPUs or PAIS. Administrators should prepare the network and flavor mapping, disable Open WebUI's background jobs for CPU use, and keep the unauthenticated Ollama port restricted to a trusted lab network. The measurements set expectations: smaller models respond faster, but their answers need checking, especially when prompts involve VCF Automation or other product-specific details.

Source: Mayank Goyal · cloudblogger.co.in

From the same basket