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_guest : remove_vm does not remove associated resources #37337

Closed
Poil opened this issue Mar 13, 2018 · 7 comments
Closed

vmware_guest : remove_vm does not remove associated resources #37337

Poil opened this issue Mar 13, 2018 · 7 comments
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community

Comments

@Poil
Copy link

Poil commented Mar 13, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_guest

ANSIBLE VERSION

2.4

SUMMARY

Calling state: absent does not remove associated files (vmdk ...)

It seems that ansible call vm.Destroy but it should call vm.Destroy_Task (ref. : https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.ManagedEntity.html#destroy , example : https://code.vmware.com/samples/563/destroy-vm?h=vSphere%20Management#)

@ansibot
Copy link
Contributor

ansibot commented Mar 13, 2018

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 Mar 13, 2018

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 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 Mar 13, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Mar 13, 2018
@Akasurde
Copy link
Member

@Poil Thanks for reporting this issue.

Could you please elaborate more on which file are not removed after absent is called ? In my local environment, I able to remove every file associated with given VM.

needs_info

@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Mar 14, 2018
@Poil
Copy link
Author

Poil commented Mar 19, 2018

Hi,

Here it does not remove the VMDK files and other attached files, like if ansible only does a remove from inventory and not a delete from disk action.

We have a VCenter 5.5.
We also manage our VM via PyVmomi, and when we delete our VMs with Destroy_Task we don't have this problem.

Best regards

@ansibot ansibot removed the needs_info This issue requires further information. Please answer any outstanding questions. label Mar 27, 2018
@ansibot
Copy link
Contributor

ansibot commented May 6, 2018

@Poil
Copy link
Author

Poil commented May 6, 2018

It seems we have no more problem with Ansible 2.5

@Poil Poil closed this as completed May 6, 2018
@Bareliah
Copy link

HI @Poil,
can you please post how you wrote it? I'm using ansible 2.7 and still facing this problem with vmware_guest - it's succeed remove from inventory but not delete from disk

@ansible ansible locked and limited conversation to collaborators May 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
None yet
Development

No branches or pull requests

4 participants