Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy VM, ESX hosts in maintenance #68426

Closed
fkempers opened this issue Mar 24, 2020 · 2 comments
Closed

Unable to deploy VM, ESX hosts in maintenance #68426

fkempers opened this issue Mar 24, 2020 · 2 comments
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@fkempers
Copy link

SUMMARY

VMs are being deployed on a datastore that is on a host in maintenance.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware-guest

ANSIBLE VERSION

$ ansible --version
ansible 2.8.4
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

CONFIGURATION

$ ansible-config dump --only-changed
ANSIBLE_NOCOWS(/etc/ansible/ansible.cfg) = True
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 30
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = [u'/admin/etc/ansible/inventory']
DEFAULT_LOCAL_TMP(/etc/ansible/ansible.cfg) = /home/aa101825/.ansible_local/ansible-local-889UrQv3D
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = root
DEFAULT_VAULT_PASSWORD_FILE(/etc/ansible/ansible.cfg) = /admin/var/.adm/.vlt
TRANSFORM_INVALID_GROUP_CHARS(/etc/ansible/ansible.cfg) = true

OS / ENVIRONMENT

RHEL 7.7, ESX 6.7

STEPS TO REPRODUCE

1 Datacenter
2 clusters, all nodes have their own datastore.

  • 1st with 2active ESX-hosts
  • 2nd with 3 hosts in maintenance (even datastores can be in maintenance)
EXPECTED RESULTS

I would expect a VM deplyed on a host in the 1st cluster

ACTUAL RESULTS

Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_guest.py
Pipelining is enabled.
EXEC /bin/sh -c '/usr/bin/python2 && sleep 0'
FAILED - RETRYING: Create VMs (1 retries left).Result was: {
"attempts": 3,
"changed": false,
"invocation": {
"module_args": {
"annotation": "Deployed by username in Ansible 2020-03-24-12-21-26",
"cdrom": {},
"cluster": "cluster-001",
"convert": null,
"customization": {
"dns_servers": [
"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
],
"domain": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"hostname": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
},
"customization_spec": null,
"customvalues": [],
"datacenter": "HIT_DCOS_DCA",
"datastore": null,
"disk": [
{
"autoselect_datastore": true,
"size_mb": 500,
"type": "thick"
},
{
"autoselect_datastore": true,
"size_gb": 32,
"type": "thick"
},
{
"autoselect_datastore": true,
"size_gb": 72,
"type": "thick"
},
{
"autoselect_datastore": true,
"size_gb": 96,
"type": "thick"
}
],
"esxi_hostname": null,
"folder": "DCOS-PROD3T-01",
"force": false,
"guest_id": null,
"hardware": {
"memory_mb": 32768,
"num_cpus": 6
},
"hostname": "vc103",
"is_template": false,
"linked_clone": false,
"name": "vm-name",
"name_match": "first",
"networks": [
{
"device_type": "vmxnet3",
"gateway": "gw",
"ip": "ip",
"name": "network",
"netmask": "255.255.224.0",
"type": "static"
}
],
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"resource_pool": null,
"snapshot_src": null,
"state": "poweredon",
"state_change_timeout": 0,
"template": "Template_RHEL7x_x64_v1.2",
"use_instance_uuid": false,
"username": "username",
"uuid": null,
"validate_certs": false,
"vapp_properties": [],
"wait_for_customization": false,
"wait_for_ip_address": true
}
},
"retries": 4
}

MSG:

Failed to create a virtual machine : Unable to access the virtual machine configuration: Unable to access file [Datastore_1_esx002]

@ansibot
Copy link
Contributor

ansibot commented Mar 24, 2020

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Mar 24, 2020
@Akasurde
Copy link
Member

Issue migrated to ansible-collections/community.vmware#63

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Mar 24, 2020
@ansible ansible locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

4 participants