summaryrefslogtreecommitdiffstats
path: root/docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
commit8a754e0858d922e955e71b253c139e071ecec432 (patch)
tree527d16e74bfd1840c85efd675fdecad056c54107 /docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst
parentInitial commit. (diff)
downloadansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz
ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst')
-rw-r--r--docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst52
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst b/docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst
new file mode 100644
index 0000000..be72386
--- /dev/null
+++ b/docs/docsite/rst/scenario_guides/vmware_rest_scenarios/run_a_vm.rst
@@ -0,0 +1,52 @@
+.. _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