# Transfer a file from a virtual machine managed by a Vmware Vcenter server to Ansible controller using ansible.

**URL:** <https://forum.ansible.com/t/transfer-a-file-from-a-virtual-machine-managed-by-a-vmware-vcenter-server-to-ansible-controller-using-ansible/24080>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [March 28, 2017, 1:03pm UTC](https://forum.ansible.com/t/transfer-a-file-from-a-virtual-machine-managed-by-a-vmware-vcenter-server-to-ansible-controller-using-ansible/24080 "2017-03-28T13:03:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mick\_st\_john](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mick\_st\_john](https://forum.ansible.com/u/Mick_st_john)\
**Post date:** [March 28, 2017, 1:03pm UTC](https://forum.ansible.com/t/transfer-a-file-from-a-virtual-machine-managed-by-a-vmware-vcenter-server-to-ansible-controller-using-ansible/24080/1 "2017-03-28T13:03:39Z")

</div>

I am trying to copy a file from a virtual machine which is managed by a vCenter server to my Ansible controller.  
I don’t want to use “fetch” module as it needs SSH connectivity. Is there any way I **could transfer a file by not using fetch(SSH).**

I’ve been through some modules like **vsphere\_guest** but, did not find anything that transfer files from a VM to ansible controller.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 29, 2017, 11:46am UTC](https://forum.ansible.com/t/transfer-a-file-from-a-virtual-machine-managed-by-a-vmware-vcenter-server-to-ansible-controller-using-ansible/24080/2 "2017-03-29T11:46:33Z")

</div>

Well for what its worth, when you are targeting windows hosts, fetch works, but doesn’t use ssh, it uses winrm. But I’m guessing you aren’t using a windows vm?

A more viable option would be to add some kind of web server to your virtual machine and then retrieve files from it onto your ansible controller using get\_url

I’m curious what’s so bad about ssh connectivity in this case though - surely you make plenty of use of that controlling your machines via ansible?

Jon
