Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Validate your guest operating system on vSphere with Ansible

December 5, 2023
Vivien Wang
Related topics:
Automation and managementLinuxVirtualizationWindows
Related products:
Red Hat Ansible Automation Platform

Share:

    Red Hat Ansible Automation Platform operates as an agentless automation tool designed for installation on a single host known as the control node. From this node, Ansible Automation Platform effectively oversees a complete array of machines and other devices, referred to as managed nodes, through remote connections such as SSH, Powershell remoting, and various other transports. This is all accomplished through a straightforward command-line interface, eliminating the need for databases or daemons.

    VMware vSphere 8 is an enterprise workload platform that offers the advantages of the cloud to on-premises workloads. It elevates performance through the use of DPU and GPU-based acceleration, streamlines operational efficiency with the VMware Cloud Console, seamlessly integrates with supplementary hybrid cloud services, and fosters innovation with its enterprise-ready integrated Kubernetes runtime, enabling the concurrent operation of containers and virtual machines.

    Prerequisites

    1. Set up Ansible Automation Platform on your control machine by following the instructions provided in the installation guide.
    2. Install the necessary Python libraries listed in requirements.txt as follows:
      $ pip install -r requirements.txt
    1. Install the necessary Ansible Content Collections with the latest version specified in requirements.yml:
      $ ansible-galaxy install -r requirements.yml
    1. Access the local control machine by logging in as either the root user or a user listed in sudoers with NOPASSWD enabled for all commands.

    Launch testing

    1. Clone the project from GitHub into your workspace on the control machine using Git.
    2. Configure the necessary parameters for testing in the file vars/test.yml.
    3. Update the test cases in the test case list file located at the following default paths:
      • Linux testing: linux/gosv_testcase_list.yml
      • Windows testing: windows/gosv_testcase_list.yml
    4. Initiate testing using the following commands from the same directory as main.yml:
      # For Linux testing:
        # you can use below command to use the default variables file "vars/test.yml",
        # and default test case list file "linux/gosv_testcase_list.yml"
        $ ansible-playbook main.yml
      
        # For Linux or Windows testing:
        # you can use below command to set the path of a customized variables file and
        # test case list file
        $ ansible-playbook main.yml -e "testing_vars_file=/path_to/test.yml testing_testcase_file=/path_to/gosv_testcase_list.yml"

    A new log folder will be generated for the current test run, containing log files and files collected during test cases. For example, check the logs/test-vm/2021-07-06-09-27-51/ directory to locate the log files. The log files contain the following:

    • results.log contains testbed information, VM information, and test case results.
    • full_debug.log contains testing debug logs.
    • failed_tasks.log contains failed tasks logs.
    • known_issues.log lists known issues in the current test run.

    Catalog

    • main.yml: Primary playbook for validating the guest operating system.
    • ansible.cfg: Customized Ansible configuration file for the user.
    • autoinstall: Directory containing configuration files for unattended installation of the guest operating system.
    • common: Directory for common tasks invoked in test cases.
    • docs: Directory for guide files and known issues.
    • env_setup: Directory for playbooks or tasks that prepare or clean up the testing environment.
    • linux: Directory for playbooks testing the Linux guest operating system.
    • windows: Directory for playbooks testing the Windows guest operating system.
    • plugin: Directory for plugin scripts.
    • tools: Directory for third-party tools used in test cases.
    • vars: Directory for variable files used in testing.
    • changelogs: Directory for the changelog of each release.

    Supported testing scenarios

    This project is designed to accommodate the following scenarios for end-to-end validation testing of guest operating systems:

    1. Deploy a virtual machine and install the guest operating system using an ISO image.
    2. Deploy a virtual machine from an OVA template.
    3. Utilize an existing virtual machine with an installed guest operating system, ensuring it meets these specified requirements:
      • Configure the VM with a single connected network adapter.
      • SSH and Python are installed and active.
      • Configure the vm_python variable in vars/test.yml with the correct Python path. Alternatively, users can set the PATH in /etc/environment within the guest operating system to incorporate the binary directory path to Python.
      • Enable and allow the root user to log in through SSH on Linux guest operating systems.
      • Prior to execution, run the ConfigureRemotingForAnsible.ps1 script in the Windows guest operating systems.

    Compatible guest operating systems

    Refer to the VMware Compatibility Guide for information on the current support status of guest operating systems on ESXi.

    Docker images

    Refer to the Guest OS validation test set for vSphere using Ansible page.

    • Latest (Release v3.0):
      • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
    • Release v3.0:
      • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:v3.0

    Launch testing using Docker image:

    1. Run the following commands on your machine:
      $ docker pull projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
      $ docker run -it --privileged projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
    1. Initiate testing within the container by following the instructions outlined on the GitHub testing steps page.

    Related Posts

    • What’s new in vSphere on RHEL image builder

    • How to install VMs and Ansible Automation Platform on Mac M1

    • How to automate devices using the Ansible CIP collection

    • What’s new in Ansible Automation Platform 2.2

    Recent Posts

    • Cloud bursting with confidential containers on OpenShift

    • Reach native speed with MacOS llama.cpp container inference

    • A deep dive into Apache Kafka's KRaft protocol

    • Staying ahead of artificial intelligence threats

    • Strengthen privacy and security with encrypted DNS in RHEL

    What’s up next?

    Discover how edge computing and automation can help your organization improve scalability, security, agility, and overall efficiency. Automation at the edge illustrates the benefits of edge automation in seven industry use cases.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue