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: vmware_guest throws vmdk already exists #58721

Closed
nicolaibaralmueller opened this issue Jul 4, 2019 · 7 comments · Fixed by #58737
Closed

VMware: vmware_guest throws vmdk already exists #58721

nicolaibaralmueller opened this issue Jul 4, 2019 · 7 comments · Fixed by #58737
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community

Comments

@nicolaibaralmueller
Copy link

nicolaibaralmueller commented Jul 4, 2019

SUMMARY

vmware_guest throws error that vmdk already exists although it does not. It is created during running the module but somehow fails.

pyvmomi-6.7.1.2018.12

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_guest

ANSIBLE VERSION
2.8.1
STEPS TO REPRODUCE
- name: Create new VM
  vmware_guest:
    hostname: "{{ vcenter_hostname }}"
    esxi_hostname: "{{ esxi_host }}"
    username: '{{domain_user}}'
    password: "{{ domain_user_password }}"
    validate_certs: False
    datacenter: TM
    name: "{{ vm_hostname }}"
    folder: "{{ vm_destination }}"      
    state: poweredon
    disk:
    - size_gb: '{{ disk_size }}'
      type: thin
      autoselect_datastore: True
    hardware:
      memory_mb: "{{ memory }}"
      num_cpus: "{{ cores }}"
      num_cpu_cores_per_socket: "{{ cores }}"
    networks:
    - name: LAN
      domain: "{{ domain }}"
      dns_servers:
      -  "{{ dns1 }}"
      -  "{{ dns2 }}"
      type: static
      ip: "{{ ip }}"
      netmask: 255.255.254.0
      gateway: 192.168.1.5
    customization:
      autologon: True
      hostname: "{{ vm_hostname }}"
      domain: "{{ domain }}"
      password: vagrant
      domainadmin: "{{ domain_user }}"
      domainadminpassword: "{{ domain_user_password }}"
      joindomain: "{{ domain }}"
      timezone: 105
      runonce:
      - powershell.exe -ExecutionPolicy Unrestricted -File C:\StartupScripts\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP
      - powershell.exe -ExecutionPolicy Unrestricted -File C:\StartupScripts\DisableFirewall.ps1 
    wait_for_customization: yes
    template: "{{ vm_template }}"
    wait_for_ip_address: yes
EXPECTED RESULTS

Should just create the VM.

ACTUAL RESULTS
Failed to create a virtual machine : Cannot complete the operation because the file or folder [EL02] ********/********.vmdk already exists"
@ansibot
Copy link
Contributor

ansibot commented Jul 4, 2019

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

@ansibot
Copy link
Contributor

ansibot commented Jul 4, 2019

@ansibot
Copy link
Contributor

ansibot commented Jul 4, 2019

@nicolaibaralmueller, just so you are aware we have a dedicated Working Group for vmware.
You can find other people interested in this in #ansible-vmware on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

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. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community labels Jul 4, 2019
@Akasurde
Copy link
Member

Akasurde commented Jul 5, 2019

@nicolaibaralmueller Thanks for reporting this issue. Could you please check if PR #58737 works for you and let me know ? Thanks

needs_info

@Akasurde
Copy link
Member

Akasurde commented Jul 5, 2019

resolved_by_pr #58737

@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jul 5, 2019
@Akasurde Akasurde changed the title vmware_guest throws vmdk already exists VMware: vmware_guest throws vmdk already exists Jul 5, 2019
@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Jul 5, 2019
@cgoeller
Copy link

Will this bug be fixed in Ansible 2.8.3 ?

@Akasurde
Copy link
Member

@cgoeller I have created backport PR #59087 and once this is merged, change will be available in 2.8.3.
Thanks.

@ansible ansible locked and limited conversation to collaborators Aug 12, 2019
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. cloud module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants