community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

vmware_export_ovf: frequently times out

Open necouchman opened this issue 4 years ago • 2 comments

SUMMARY

When trying to use the vmware_export_ovf plugin to export OVFs of a VM, anything over a certain size (or amount of time?) generates an error: get exception: The read operation timed out. Exporting the exact same VM with ovftool works perfectly fine.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_export_ovf

ANSIBLE VERSION
ansible 2.9.21
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/nick/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
COLLECTION VERSION

(Doesn't seem to work)

usage: ansible-galaxy collection [-h] COLLECTION_ACTION ...
ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: u'list' (choose from 'init', 'build', 'publish', 'install')

CONFIGURATION
ANSIBLE_SSH_ARGS(/home/nick/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKe
CACHE_PLUGIN(/home/nick/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/nick/ansible/ansible.cfg) = ./tmp/facts_cache
CACHE_PLUGIN_TIMEOUT(/home/nick/ansible/ansible.cfg) = 86400
DEFAULT_ACTION_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/action_plugins']
DEFAULT_CALLBACK_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/callback_plugins'
DEFAULT_CONNECTION_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/connection_plug
DEFAULT_FILTER_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/filter_plugins']
DEFAULT_FORKS(/home/nick/ansible/ansible.cfg) = 10
DEFAULT_GATHERING(/home/nick/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/home/nick/ansible/ansible.cfg) = [u'/home/nick/ansible/hosts']
DEFAULT_LOG_PATH(/home/nick/ansible/ansible.cfg) = /home/nick/ansible/logs/ansible.lo
DEFAULT_LOOKUP_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/lookup_plugins']
DEFAULT_MANAGED_STR(/home/nick/ansible/ansible.cfg) = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by
DEFAULT_POLL_INTERVAL(/home/nick/ansible/ansible.cfg) = 15
DEFAULT_ROLES_PATH(/home/nick/ansible/ansible.cfg) = [u'/home/nick/ansible/roles']
DEFAULT_TIMEOUT(/home/nick/ansible/ansible.cfg) = 60
DEFAULT_TRANSPORT(/home/nick/ansible/ansible.cfg) = smart
DEFAULT_VARS_PLUGIN_PATH(/home/nick/ansible/ansible.cfg) = [u'/usr/share/ansible_plugins/vars_plugins']
DEFAULT_VAULT_PASSWORD_FILE(/home/nick/ansible/ansible.cfg) = /home/nick/ansible/.vau
RETRY_FILES_SAVE_PATH(/home/nick/ansible/ansible.cfg) = /home/nick/ansible/tmp/retry
OS / ENVIRONMENT

CentOS 7 VMware vSphere 6.7

STEPS TO REPRODUCE
  • Create a VM to export with a good amount of data (more than 50GB)
  • Use vmware_export_ovf to export the VM
  • Watch it fail
- name: Export broken way
  vmware_export_ovf:
    datacenter: "{{ datacenter }}"
    download_timeout: 172800
    export_dir: "{{ backup_location }}"
    export_with_images: no
    folder: "{{ vmfolder }}"
    hostname: "{{ vchost }}"
    moid: "{{ _vmclone.instance.moid }}"
    password: "{{ vcpass }}"
    username: "{{ vcuser }}"
    validate_certs: no
  connection: ssh
  delegate_to: "{{ backup_server }}"
  async: 172800
  poll: 60
  when: false
EXPECTED RESULTS

A successful OVF export (works fine with ovftool).

ACTUAL RESULTS
fatal: [vm_to_export -> 10.1.2.3]: FAILED! => {
    "ansible_job_id": "372686434781.22966", 
    "changed": false, 
    "finished": 1, 
    "invocation": {
        "module_args": {
            "datacenter": "My Data Center", 
            "download_timeout": 172800, 
            "export_dir": "/mnt/export/vm_snapshots/", 
            "export_with_images": false, 
            "folder": "/My Data Center/vm/VMs to Export", 
            "hostname": "vcenter.example.com", 
            "moid": "vm-1078895", 
            "name": null, 
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", 
            "port": 443, 
            "proxy_host": null, 
            "proxy_port": null, 
            "username": "[email protected]", 
            "uuid": null, 
            "validate_certs": false
        }
    }, 
    "msg": "get exception: The read operation timed out"
}

necouchman avatar Jul 09 '21 20:07 necouchman

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

ansibullbot avatar Jul 09 '21 20:07 ansibullbot

I am experiencing the exact same issue, the time out appears to occur at approximately an hour and a half.

PrymalInstynct avatar Jul 29 '22 17:07 PrymalInstynct