Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

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

    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

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    • How EvalHub manages two-layer Kubernetes control planes

    • Tekton joins the CNCF as an incubating project

    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

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.