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

vmware_deploy_ovf: The virtual machine is not supported on the target datastore #670

Closed
Tomorrow9 opened this issue Feb 18, 2021 · 5 comments · Fixed by #687
Closed

vmware_deploy_ovf: The virtual machine is not supported on the target datastore #670

Tomorrow9 opened this issue Feb 18, 2021 · 5 comments · Fixed by #687
Assignees
Labels
bug This issue/PR relates to a bug cloud has_pr module module plugins plugin (any type) python3

Comments

@Tomorrow9
Copy link
Collaborator

Tomorrow9 commented Feb 18, 2021

SUMMARY
ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_deploy_ovf

ANSIBLE VERSION
ansible 2.10.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.5 (default, Apr  1 2018, 05:46:30) [GCC 7.3.0]
CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
(1) one datacenter in VC,
(2) two hosts added in this datacenter, no cluster,
(3) "datastore2" is the datastore of host1, "datastore2 (1)" is the datastore of host2, "test-ds" is the shared datastore of these two hosts,
(4) deploy ovf template in "datastore2" and "test-ds" succeed, deploy ovf template in "datastore2 (1)" failed.
- hosts: localhost
  tasks:
    - name: Deploy VM from ovf template
      vmware_deploy_ovf:
        hostname: "xx.xx.xx.xx"
        username: "[email protected]"
        password: "xxxxxx"
        validate_certs: "False"
        datacenter: "vcDC"
        datastore: "datastore2 (1)"
        networks: "{{ ovf_networks | default({'VM Network': 'VM Network'}) }}"
        ovf: "./openwrt_19.07.2_x86.ova"
        name: test_ovf_deploy
        allow_duplicates: False
        disk_provisioning: "thin"
        power_on: False
        wait_for_ip_address: False
      register: ovf_deploy
    - debug: var=ovf_deploy
EXPECTED RESULTS

OVF can be deployed successfully

ACTUAL RESULTS
PLAY [localhost] *****************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************
ok: [localhost]

TASK [Deploy VM from ovf template] ***********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failure validating OVF import spec: The virtual machine is not supported on the target datastore."}

PLAY RECAP ***********************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 
@ansibullbot
Copy link

Files identified in the description:

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
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module needs_triage Needs a first human triage before being processed. plugins plugin (any type) python3 labels Feb 18, 2021
@Tomorrow9
Copy link
Collaborator Author

I assume if add "esxi_hostname" to specify the exact ESXi host can resolve this issue in this scenario?

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (vmware_deploy_ovf) module: esxi_hostname 

Supported parameters include: allow_duplicates, cluster, datacenter, datastore, deployment_option, disk_provisioning, fail_on_spec_warnings, folder, hostname, inject_ovf_env, name, networks, ovf, password, port, power_on, properties, proxy_host, proxy_port, resource_pool, username, validate_certs, wait, wait_for_ip_address"}

@Tomorrow9
Copy link
Collaborator Author

Like what defined in vmware_guest module:

  cluster:
    description:
    - The cluster name where the virtual machine will run.
    - This is a required parameter, if C(esxi_hostname) is not set.
    - C(esxi_hostname) and C(cluster) are mutually exclusive parameters.
    - This parameter is case sensitive.
    type: str
  esxi_hostname:
    description:
    - The ESXi hostname where the virtual machine will run.
    - This is a required parameter, if C(cluster) is not set.
    - C(esxi_hostname) and C(cluster) are mutually exclusive parameters.
    - This parameter is case sensitive.
    type: str

@Tomorrow9 Tomorrow9 self-assigned this Feb 19, 2021
@ansibullbot ansibullbot removed the needs_triage Needs a first human triage before being processed. label Feb 19, 2021
@sky-joker
Copy link
Collaborator

resolved_by_pr #687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud has_pr module module plugins plugin (any type) python3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants