VMware: Documentation cleanup - vmware_guest (#35548)
Partially fixes: #35295 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
ccdc93ab59
commit
c070d74080
1 changed files with 47 additions and 21 deletions
|
@ -18,36 +18,38 @@ DOCUMENTATION = r'''
|
||||||
module: vmware_guest
|
module: vmware_guest
|
||||||
short_description: Manages virtual machines in vCenter
|
short_description: Manages virtual machines in vCenter
|
||||||
description:
|
description:
|
||||||
- Create new virtual machines (from templates or not).
|
- Create new virtual machines from templates or other virtual machines.
|
||||||
- Power on/power off/restart a virtual machine.
|
- Manage power state of virtual machine such as power on, power off, suspend, shutdown, reboot, restart etc.,.
|
||||||
- Modify, rename or remove a virtual machine.
|
- Modify, rename or remove a virtual machine.
|
||||||
version_added: '2.2'
|
version_added: '2.2'
|
||||||
author:
|
author:
|
||||||
- James Tanner (@jctanner) <tanner.jc@gmail.com>
|
- James Tanner (@jctanner) <tanner.jc@gmail.com>
|
||||||
- Loic Blot (@nerzhul) <loic.blot@unix-experience.fr>
|
- Loic Blot (@nerzhul) <loic.blot@unix-experience.fr>
|
||||||
- Philippe Dellaert (@pdellaert) <philippe@dellaert.org>
|
- Philippe Dellaert (@pdellaert) <philippe@dellaert.org>
|
||||||
|
- Abhijeet Kasurde (@akasurde) <akasurde@redhat.com>
|
||||||
notes:
|
notes:
|
||||||
- Tested on vSphere 5.5 and 6.0
|
- Tested on vSphere 5.5, 6.0 and 6.5
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.6
|
- python >= 2.6
|
||||||
- PyVmomi
|
- PyVmomi
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- What state should the virtual machine be in?
|
- Specify state of the virtual machine be in.
|
||||||
- If C(state) is set to C(present) and VM exists, ensure the VM configuration conforms to task arguments.
|
- If C(state) is set to C(present) and VM exists, ensure the VM configuration conforms to task arguments.
|
||||||
required: yes
|
default: present
|
||||||
choices: [ 'present', 'absent', 'poweredon', 'poweredoff', 'restarted', 'suspended', 'shutdownguest', 'rebootguest' ]
|
choices: [ present, absent, poweredon, poweredoff, restarted, suspended, shutdownguest, rebootguest ]
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the VM to work with.
|
- Name of the VM to work with.
|
||||||
- VM names in vCenter are not necessarily unique, which may be problematic, see C(name_match).
|
- VM names in vCenter are not necessarily unique, which may be problematic, see C(name_match).
|
||||||
|
- This parameter is case sensitive.
|
||||||
required: yes
|
required: yes
|
||||||
name_match:
|
name_match:
|
||||||
description:
|
description:
|
||||||
- If multiple VMs matching the name, use the first or last found.
|
- If multiple VMs matching the name, use the first or last found.
|
||||||
default: 'first'
|
default: 'first'
|
||||||
choices: [ 'first', 'last' ]
|
choices: [ first, last ]
|
||||||
uuid:
|
uuid:
|
||||||
description:
|
description:
|
||||||
- UUID of the instance to manage if known, this is VMware's unique identifier.
|
- UUID of the instance to manage if known, this is VMware's unique identifier.
|
||||||
|
@ -58,16 +60,19 @@ options:
|
||||||
- Template or existing VM used to create VM.
|
- Template or existing VM used to create VM.
|
||||||
- If this value is not set, VM is created without using a template.
|
- If this value is not set, VM is created without using a template.
|
||||||
- If the VM exists already this setting will be ignored.
|
- If the VM exists already this setting will be ignored.
|
||||||
|
- This parameter is case sensitive.
|
||||||
is_template:
|
is_template:
|
||||||
description:
|
description:
|
||||||
- Flag the instance as a template.
|
- Flag the instance as a template.
|
||||||
|
- This will mark VM instance as template.
|
||||||
default: 'no'
|
default: 'no'
|
||||||
type: bool
|
type: bool
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
folder:
|
folder:
|
||||||
description:
|
description:
|
||||||
- Destination folder, absolute path to find an existing guest or create the new guest.
|
- Destination folder, absolute path to find an existing guest or create the new guest.
|
||||||
- The folder should include the datacenter. ESX's datacenter is ha-datacenter
|
- The folder should include the datacenter. ESX's datacenter is ha-datacenter.
|
||||||
|
- This parameter is case sensitive.
|
||||||
- 'Examples:'
|
- 'Examples:'
|
||||||
- ' folder: /ha-datacenter/vm'
|
- ' folder: /ha-datacenter/vm'
|
||||||
- ' folder: ha-datacenter/vm'
|
- ' folder: ha-datacenter/vm'
|
||||||
|
@ -80,7 +85,8 @@ options:
|
||||||
- ' folder: /folder1/datacenter1/vm/folder2'
|
- ' folder: /folder1/datacenter1/vm/folder2'
|
||||||
hardware:
|
hardware:
|
||||||
description:
|
description:
|
||||||
- Manage some VM hardware attributes.
|
- Manage virtual machine's hardware attributes.
|
||||||
|
- All parameters case sensitive.
|
||||||
- 'Valid attributes are:'
|
- 'Valid attributes are:'
|
||||||
- ' - C(hotadd_cpu) (boolean): Allow virtual CPUs to be added while the VM is running.'
|
- ' - C(hotadd_cpu) (boolean): Allow virtual CPUs to be added while the VM is running.'
|
||||||
- ' - C(hotremove_cpu) (boolean): Allow virtual CPUs to be removed while the VM is running. version_added: 2.5'
|
- ' - C(hotremove_cpu) (boolean): Allow virtual CPUs to be removed while the VM is running. version_added: 2.5'
|
||||||
|
@ -105,42 +111,55 @@ options:
|
||||||
|
|
||||||
guest_id:
|
guest_id:
|
||||||
description:
|
description:
|
||||||
- Set the guest ID (Debian, RHEL, Windows...).
|
- Set the guest ID.
|
||||||
|
- This parameter is case sensitive.
|
||||||
|
- 'Examples:'
|
||||||
|
- " VM with RHEL7 64 bit, will be 'rhel7_64Guest'"
|
||||||
|
- " VM with CensOS 64 bit, will be 'centos64Guest'"
|
||||||
|
- " VM with Ubuntu 64 bit, will be 'ubuntu64Guest'"
|
||||||
- This field is required when creating a VM.
|
- This field is required when creating a VM.
|
||||||
- >
|
- >
|
||||||
Valid values are referenced here:
|
Valid values are referenced here:
|
||||||
https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
|
U(https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html)
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
disk:
|
disk:
|
||||||
description:
|
description:
|
||||||
- A list of disks to add.
|
- A list of disks to add.
|
||||||
|
- This parameter is case sensitive.
|
||||||
|
- Resizing disks is not supported.
|
||||||
|
- Removing existing disks of virtual machine is not supported.
|
||||||
- 'Valid attributes are:'
|
- 'Valid attributes are:'
|
||||||
- ' - C(size_[tb,gb,mb,kb]) (integer): Disk storage size in specified unit.'
|
- ' - C(size_[tb,gb,mb,kb]) (integer): Disk storage size in specified unit.'
|
||||||
- ' - C(type) (string): Valid values are:'
|
- ' - C(type) (string): Valid values are:'
|
||||||
- ' C(thin) thin disk, C(eagerzeroedthick) eagerzeroedthick disk, added in version 2.5, Default: C(None) thick disk, no eagerzero.'
|
- ' - C(thin) thin disk'
|
||||||
|
- ' - C(eagerzeroedthick) eagerzeroedthick disk, added in version 2.5'
|
||||||
|
- ' Default: C(None) thick disk, no eagerzero.'
|
||||||
- ' - C(datastore) (string): Datastore to use for the disk. If C(autoselect_datastore) is enabled, filter datastore selection.'
|
- ' - C(datastore) (string): Datastore to use for the disk. If C(autoselect_datastore) is enabled, filter datastore selection.'
|
||||||
- ' - C(autoselect_datastore) (bool): select the less used datastore.'
|
- ' - C(autoselect_datastore) (bool): select the less used datastore. Specify only if C(datastore) is not specified.'
|
||||||
cdrom:
|
cdrom:
|
||||||
description:
|
description:
|
||||||
- A CD-ROM configuration for the VM.
|
- A CD-ROM configuration for the VM.
|
||||||
- 'Valid attributes are:'
|
- 'Valid attributes are:'
|
||||||
- ' - C(type) (string): The type of CD-ROM, valid options are C(none), C(client) or C(iso). With C(none) the CD-ROM will be disconnected but present.'
|
- ' - C(type) (string): The type of CD-ROM, valid options are C(none), C(client) or C(iso). With C(none) the CD-ROM will be disconnected but present.'
|
||||||
- ' - C(iso_path) (string): The datastore path to the ISO file to use, in the form of C([datastore1] path/to/file.iso). Required if type is iso.'
|
- ' - C(iso_path) (string): The datastore path to the ISO file to use, in the form of C([datastore1] path/to/file.iso). Required if type is set C(iso).'
|
||||||
version_added: '2.5'
|
version_added: '2.5'
|
||||||
resource_pool:
|
resource_pool:
|
||||||
description:
|
description:
|
||||||
- Affect machine to the given resource pool.
|
- Affect machine to the given resource pool.
|
||||||
|
- This parameter is case sensitive.
|
||||||
- Resource pool should be child of the selected host parent.
|
- Resource pool should be child of the selected host parent.
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
wait_for_ip_address:
|
wait_for_ip_address:
|
||||||
description:
|
description:
|
||||||
- Wait until vCenter detects an IP address for the VM.
|
- Wait until vCenter detects an IP address for the VM.
|
||||||
- This requires vmware-tools (vmtoolsd) to properly work after creation.
|
- This requires vmware-tools (vmtoolsd) to properly work after creation.
|
||||||
|
- "vmware-tools needs to be installed on given virtual machine in order to work with this parameter."
|
||||||
default: 'no'
|
default: 'no'
|
||||||
type: bool
|
type: bool
|
||||||
snapshot_src:
|
snapshot_src:
|
||||||
description:
|
description:
|
||||||
- Name of an existing snapshot to use to create a clone of a VM.
|
- Name of the existing snapshot to use to create a clone of a VM.
|
||||||
|
- This parameter is case sensitive.
|
||||||
version_added: '2.4'
|
version_added: '2.4'
|
||||||
linked_clone:
|
linked_clone:
|
||||||
description:
|
description:
|
||||||
|
@ -151,31 +170,37 @@ options:
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Ignore warnings and complete the actions.
|
- Ignore warnings and complete the actions.
|
||||||
|
- This parameter is useful while removing virtual machine which is powered on state.
|
||||||
default: 'no'
|
default: 'no'
|
||||||
type: bool
|
type: bool
|
||||||
datacenter:
|
datacenter:
|
||||||
description:
|
description:
|
||||||
- Destination datacenter for the deploy operation.
|
- Destination datacenter for the deploy operation.
|
||||||
|
- This parameter is case sensitive.
|
||||||
default: ha-datacenter
|
default: ha-datacenter
|
||||||
cluster:
|
cluster:
|
||||||
description:
|
description:
|
||||||
- The cluster name where the VM will run.
|
- The cluster name where the virtual machine will run.
|
||||||
|
- This parameter is case sensitive.
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
esxi_hostname:
|
esxi_hostname:
|
||||||
description:
|
description:
|
||||||
- The ESXi hostname where the VM will run.
|
- The ESXi hostname where the virtual machine will run.
|
||||||
|
- This parameter is case sensitive.
|
||||||
annotation:
|
annotation:
|
||||||
description:
|
description:
|
||||||
- A note or annotation to include in the VM.
|
- A note or annotation to include in the virtual machine.
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
customvalues:
|
customvalues:
|
||||||
description:
|
description:
|
||||||
- Define a list of customvalues to set on VM.
|
- Define a list of custom values to set on virtual machine.
|
||||||
- A customvalue object takes 2 fields C(key) and C(value).
|
- A custom value object takes two fields C(key) and C(value).
|
||||||
|
- Incorrect key and values will be ignored.
|
||||||
version_added: '2.3'
|
version_added: '2.3'
|
||||||
networks:
|
networks:
|
||||||
description:
|
description:
|
||||||
- A list of networks (in the order of the NICs).
|
- A list of networks (in the order of the NICs).
|
||||||
|
- All parameters and VMware object names are case sensetive.
|
||||||
- 'One of the below parameters is required per entry:'
|
- 'One of the below parameters is required per entry:'
|
||||||
- ' - C(name) (string): Name of the portgroup for this interface.'
|
- ' - C(name) (string): Name of the portgroup for this interface.'
|
||||||
- ' - C(vlan) (integer): VLAN number for this interface.'
|
- ' - C(vlan) (integer): VLAN number for this interface.'
|
||||||
|
@ -196,6 +221,7 @@ options:
|
||||||
customization:
|
customization:
|
||||||
description:
|
description:
|
||||||
- Parameters for OS customization when cloning from template.
|
- Parameters for OS customization when cloning from template.
|
||||||
|
- All parameters and VMware object names are case sensetive.
|
||||||
- 'Common parameters (Linux/Windows):'
|
- 'Common parameters (Linux/Windows):'
|
||||||
- ' - C(dns_servers) (list): List of DNS servers to configure.'
|
- ' - C(dns_servers) (list): List of DNS servers to configure.'
|
||||||
- ' - C(dns_suffix) (list): List of domain suffixes, aka DNS search path (default: C(domain) parameter).'
|
- ' - C(dns_suffix) (list): List of domain suffixes, aka DNS search path (default: C(domain) parameter).'
|
||||||
|
@ -337,7 +363,7 @@ EXAMPLES = r'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
instance:
|
instance:
|
||||||
description: metadata about the new virtualmachine
|
description: metadata about the new virtual machine
|
||||||
returned: always
|
returned: always
|
||||||
type: dict
|
type: dict
|
||||||
sample: None
|
sample: None
|
||||||
|
|
Loading…
Reference in a new issue