Skip to main content

Harness Cloud VM Images

Harness-hosted VM images are available for multiple operating systems and architectures, providing you with a clean, consistent environment for building, testing, and deploying your applications. Each job runs on a fresh virtual machine instance, ensuring isolation and preventing interference between builds.

For comprehensive details about what's included in each VM image, including installed software, tool versions, and system specifications, refer to this repository.

Available VM images

Harness provides VM images for multiple operating systems and architectures:

Virtual machine imageImage labelNotes
Linux ARM Ubuntu 22.04ubuntu-22.04Default Linux image for Linux ARM
Linux AMD Ubuntu 22.04ubuntu-22.04Default Linux image for Linux AMD
macOS 14 (Sonoma)macos-14Latest macOS
Windows Server 2022windows-2022Latest Windows 2022 Server Image
Windows Server 2019windows-2019Latest Windows 2019 Server Image

Using preinstalled software

Harness-hosted VM images include a comprehensive set of preinstalled software packages, development tools, and runtime environments. This eliminates the need to install common dependencies during your pipeline execution, significantly reducing build times.

For detailed specifications of each image, including available preinstalled software and versions, see the Harness Cloud documentation.

You can customize the Harness Cloud build environment. In your pipelines, you can select specific versions of pre-installed tools, ensure that a step uses a specific version every time, or install additional tools and versions that aren't preinstalled on the Harness Cloud images. You can run these steps on the host machine or as separate Docker images.

Checking software versions

To see the exact versions of preinstalled software on each image, check the detailed specifications in the Harness Cloud documentation. Each image type has its own README file with current software versions and installation details.

You can also check software versions during your pipeline execution:

pipeline:
name: Check Software Version Pipeline
identifier: check_software_version_pipeline
stages:
- stage:
name: Check Software Version
identifier: check_software_version
type: Custom
spec:
execution:
steps:
- step:
identifier: run_version_check_script
name: Check Software Versions
type: ShellScript
timeout: 10m
spec:
shell: Bash
source:
type: Inline
spec:
script: |-
echo "===== Software Version Check ====="
echo

# Node.js and NPM
echo "Node.js Version:"
node --version || echo "Node.js not installed"
echo

echo "NPM Version:"
npm --version || echo "NPM not installed"
echo

# Python
echo "Python Version:"
python --version || echo "Python not installed"
python3 --version || echo "Python3 not installed"
echo

# Java
echo "Java Version:"
java -version || echo "Java not installed"
echo

# Docker
echo "Docker Version:"
docker --version || echo "Docker not installed"
echo

# Git
echo "Git Version:"
git --version || echo "Git not installed"
echo

# Maven
echo "Maven Version:"
mvn --version || echo "Maven not installed"
echo

# Gradle
echo "Gradle Version:"
gradle --version || echo "Gradle not installed"
echo

# Go
echo "Go Version:"
go version || echo "Go not installed"
echo

# Ruby
echo "Ruby Version:"
ruby --version || echo "Ruby not installed"
echo

# Operating System
echo "Operating System:"
uname -a || echo "uname command not available"
cat /etc/os-release 2>/dev/null || echo "OS release info not available"
echo

echo "===== Version Check Complete ====="
rollbackSteps: []
description: This pipeline shows if specific tools are installed on the VM and their images (if available).
projectIdentifier: YOUR_PROJECT_IDENTIFIER
orgIdentifier: YOUR_ORG_IDENTIFIER

Installing additional software

While Harness VM images come with many tools preinstalled, you may need to install additional software specific to your project.

Using package managers

You can install additional packages using the system package manager during your pipeline:

steps:
- step:
type: Run
name: Install Dependencies
identifier: install_deps
spec:
connectorRef: account.harnessImage-1.0
image: harness/ci-addon:latest-1
command: |
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y your-package-name

# CentOS/RHEL
sudo yum install -y your-package-name

# macOS
brew install your-package-name

Installing language-specific packages

Install packages using language-specific package managers:

steps:
- step:
type: Run
name: Install Language Packages
identifier: install_lang_packages
spec:
connectorRef: YOUR_IMAGE_REGISTRY_CONNECTOR
image: harness/ci-addon:latest
command: |
# Node.js packages
npm install -g your-package

# Python packages
pip3 install your-package

# Ruby gems
gem install your-gem

# Go modules
go install your-module

Performance considerations

Installing software during pipeline execution increases build time. Consider these approaches for better performance:

  • Use preinstalled software when possible
  • Cache dependencies between builds when available
  • Consider creating custom Docker images for complex dependencies
  • Use specific tool versions that are already preinstalled

For comprehensive details about what's included in each VM image, including installed software, tool versions, and system specifications, refer to the Harness Cloud image documentation.

Image Versioning and Best Practices

Understanding Image Tags

Harness VM images use a versioning system to help you balance between getting the latest updates and maintaining build stability:

  • latest - The most recent image with the newest tool versions and updates
  • latest-1 - The previous stable image version
  • latest-2 - Two versions behind the current latest

To ensure stable production deployments while still benefiting from the latest updates, we recommend the following approach:

Use the latest image tag for development, feature branches, and testing pipelines. Use latest-1 for production pipelines to ensure stability.

Migration Process

  1. Test with Latest: Run your development and testing pipelines using the latest image
  2. Validate: Ensure all tests pass and deployments are healthy
  3. Update Production: Once validated, update your production pipelines from latest-1 to latest
  4. Monitor: Keep an eye on production builds after the update
warning

The latest image may contain breaking changes or updated tool versions that could affect your build. Always test thoroughly before updating production pipelines.

Image Updates and Maintenance

Harness regularly updates VM images to include:

  • Security patches and OS updates
  • Latest versions of popular development tools
  • Runtime updates (Node.js, Python, Java, etc.)
  • New tools and utilities based on community feedback

Images are typically updated every two months, with critical security updates applied more frequently.

Support and Feedback

For questions, issues, or feature requests related to Harness VM images, contact Harness Support.