mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
ReStructuredText
53 lines
1.1 KiB
ReStructuredText
.. _vmware_rest_run_a_vm:
|
|
|
|
****************************
|
|
How to run a virtual machine
|
|
****************************
|
|
|
|
.. contents::
|
|
:local:
|
|
|
|
|
|
Introduction
|
|
============
|
|
|
|
This section covers the power management of your virtual machine.
|
|
|
|
Power information
|
|
=================
|
|
|
|
Use ``vcenter_vm_power_info`` to know the power state of the VM.
|
|
|
|
.. literalinclude:: task_outputs/Get_guest_power_information.task.yaml
|
|
|
|
Result
|
|
______
|
|
|
|
.. literalinclude:: task_outputs/Get_guest_power_information.result.json
|
|
|
|
|
|
How to start a virtual machine
|
|
==============================
|
|
|
|
Use the ``vcenter_vm_power`` module to start your VM:
|
|
|
|
.. literalinclude:: task_outputs/Turn_the_power_of_the_VM_on.task.yaml
|
|
|
|
Result
|
|
______
|
|
|
|
.. literalinclude:: task_outputs/Turn_the_power_of_the_VM_on.result.json
|
|
|
|
How to wait until my virtual machine is ready
|
|
=============================================
|
|
|
|
If your virtual machine runs VMware Tools, you can build a loop
|
|
around the ``center_vm_tools_info`` module:
|
|
|
|
.. literalinclude:: task_outputs/Wait_until_my_VM_is_ready.task.yaml
|
|
|
|
Result
|
|
______
|
|
|
|
.. literalinclude:: task_outputs/Wait_until_my_VM_is_ready.result.json
|