# vsphere\_guest : setting Guest IP address

**URL:** <https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282>\
**Category:** Ansible Project\
**Created:** [May 21, 2015, 2:55pm UTC](https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282 "2015-05-21T14:55:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.jolivot](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@benjamin.jolivot](https://forum.ansible.com/u/benjamin.jolivot)\
**Post date:** [May 21, 2015, 2:55pm UTC](https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282/1 "2015-05-21T14:55:30Z")

</div>

Hello,  
I’m looking for the best way to use Ansible for provisionning ESXi VM.

It’s easy to spin new VM via vsphere\_guest

It’s easy to use playbook on ssh connectable VM

…I’m just looking the best (easy ?) way between these 2 steps.  
How can I set static ip address in VM spined by vsphere\_guest ?

Ben

---

<div class="post-metadata">

**Author:** ![Romeo\_Theriault](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Post date:** [May 21, 2015, 6:54pm UTC](https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282/2 "2015-05-21T18:54:25Z")

</div>

Are you cloning a existing VM or are you creating a new one and want to know how to install the OS after creation?

---

<div class="post-metadata">

**Author:** ![benjamin.jolivot](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@benjamin.jolivot](https://forum.ansible.com/u/benjamin.jolivot)\
**Post date:** [May 22, 2015, 8:06am UTC](https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282/3 "2015-05-22T08:06:37Z")

</div>

Both option are open.

---

<div class="post-metadata">

**Author:** ![Larry\_Smith](https://avatars.discourse-cdn.com/v4/letter/l/ecae2f/32.png) [@Larry\_Smith](https://forum.ansible.com/u/Larry_Smith)\
**Post date:** [May 23, 2015, 3:08am UTC](https://forum.ansible.com/t/vsphere-guest-setting-guest-ip-address/18282/4 "2015-05-23T03:08:20Z")

</div>

Have a look here and see if it is of any help. I ended up creating scripts to go from phase to phase. Have a look in vm\_provisioning.

[https://github.com/mrlesmithjr/Ansible](https://github.com/mrlesmithjr/Ansible)
