# Ping my virtual machine through Ansible

**URL:** <https://forum.ansible.com/t/ping-my-virtual-machine-through-ansible/24480>\
**Category:** Ansible Project\
**Created:** [May 13, 2017, 4:53pm UTC](https://forum.ansible.com/t/ping-my-virtual-machine-through-ansible/24480 "2017-05-13T16:53:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Nian](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_Nian](https://forum.ansible.com/u/Bob_Nian)\
**Post date:** [May 13, 2017, 4:53pm UTC](https://forum.ansible.com/t/ping-my-virtual-machine-through-ansible/24480/1 "2017-05-13T16:53:39Z")

</div>

Been wondering, since I’m new to Ansible, I am trying to ping my Virtual Machine which is running on a Bare-Metal ESXI 6.5 using Ansible’s ’ ansible ping -m \<vm’s IP\>’ but it seems unsuccessful even though I am able to ping the host itself which is the ESXI. Any idea on how to let Ansible detect my VM? Do I need to install pfSense and create WAN/LAN (I only have 1 nic though) to allow connections? Any help would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![Listing](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@Listing](https://forum.ansible.com/u/Listing)\
**Post date:** [May 13, 2017, 8:32pm UTC](https://forum.ansible.com/t/ping-my-virtual-machine-through-ansible/24480/2 "2017-05-13T20:32:24Z")

</div>

Hi Bob,

What happens if you do ‘ssh ’? Do you still need to provide a password?

Ping in this module is not the ping we are used to use, it just establishes a connection and returns ‘pong’ if all is working. It is not doing an ICMP ping (which I think you are expecting).

---

<div class="post-metadata">

**Author:** ![Bob\_Nian](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_Nian](https://forum.ansible.com/u/Bob_Nian)\
**Post date:** [May 14, 2017, 7:39am UTC](https://forum.ansible.com/t/ping-my-virtual-machine-through-ansible/24480/3 "2017-05-14T07:39:21Z")

</div>

Yes, I am aware that the ansible ping is not the normally ping we do. Tried doing ssh , but it seems that the ssh port is not open and I’ll need to download the openssh-server package offline since I have no internet connection on my vm which is a pain in the butt. Thanks anyway.
