Member-only story

Stop a VMware vSphere Virtual Machine — Ansible module vmware_guest_powerstate

How to automate the gracefully use guest shutdown and forcefully power off to change the power state from Powered On to Powered Off of the virtual machine guest “myvm” using Ansible Playbook and vmware_guest_powerstate module.

Luca Berton
6 min readMay 17, 2022

How to Stop a VMware vSphere Virtual Machine with Ansible?

I’m going to show you a live demo and some simple Ansible code.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot

Ansible Stop a VMware vSphere Virtual Machine

  • `community.vmware.vmware_guest_powerstate`
  • Manages power states of virtual machines in vCenter

Let’s talk about the Ansible module `vmware_guest_powerstate`.

The full name is `community.vmware.vmware_guest_powerstate`, which means that is part of the collection of modules to interact with VMware, community-supported.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet