vmware_guest - Failed to set static IP - VCenter 6.5

113 views
Skip to first unread message

Saketha Vamshi d

unread,
Oct 21, 2020, 2:05:01 PM10/21/20
to Ansible Project
Hello guys, 

I'm trying to deploy a new VM on ESXi host with ansible 2.9.13 with a device_type=e1000. 
But unfortunately it is not accepting my static IP value, even when I mentioned type=static in playbook. 

For e.g.: 
      networks:
      - name: VM Network
        type: static
        ip: 192.**.**.**
        netmask: 255.**.**.**
        gateway: 192.**.**.**
        device_type: e1000
        dns_servers:
          - 8.8.8.8

Does anyone come across the same issue? I'm just wondering am I missing any parameter here. 

Thanks in advance!!

Antony Stone

unread,
Oct 21, 2020, 2:14:47 PM10/21/20
to ansible...@googlegroups.com
On Wednesday 21 October 2020 at 20:05:01, Saketha Vamshi d wrote:

> Hello guys,
>
> I'm trying to deploy a new VM on ESXi host with ansible 2.9.13 with a
> device_type=e1000.
> But unfortunately it is not accepting my static IP value, even when I
> mentioned type=static in playbook.
>
> For e.g.:
> networks:
> - name: VM Network
> type: static
> ip: 192.**.**.**
> netmask: 255.**.**.**
> gateway: 192.**.**.**
> device_type: e1000
> dns_servers:
> - 8.8.8.8

I'm going to assume that the number following 192 above is 168, and if that's
true, there's no point in obfuscating RFC 1918 addresses - it tells us nothing
sensitive about your network, and there's just a chance that this additional
information would help us to answer your question.


Regards,

Antony.

--
Salad is what food eats.

Please reply to the list;
please *don't* CC me.

Saketha Vamshi d

unread,
Oct 21, 2020, 2:18:58 PM10/21/20
to Ansible Project
Yes Antony, Its 168 that comes after 192 in this value... 

Antony Stone

unread,
Oct 21, 2020, 2:26:32 PM10/21/20
to ansible...@googlegroups.com
On Wednesday 21 October 2020 at 20:18:58, Saketha Vamshi d wrote:

> Yes Antony, Its 168 that comes after 192 in this value...

Maybe I wasn't clear.

I meant "if you are using an RFC 1918 address (ie: one that starts with
192.168) then please show us the full address (and the netmask and the
gateway) because you are not giving away any sensitive information, and
knowing what you have written in full might help someone to answer your
question".

So, please re-post your network stanza with nothing obscured.
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

Saketha Vamshi d

unread,
Oct 21, 2020, 2:46:40 PM10/21/20
to Ansible Project
yep, got you...

Here are the complete details:

      networks:
      - name: VM Network
        type: static
        ip: 192.168.2.60
        netmask: 255.255.252.0
        gateway: 192.168.0.1
        device_type: e1000
        dns_servers:
          - 8.8.8.8

Abhijeet Kasurde

unread,
Oct 22, 2020, 12:20:48 AM10/22/20
to ansible...@googlegroups.com
Hi Saketha,

Can you please provide the details about the operating system of the virtual machine and vCenter/ESXi version? Also, can check if vmware-tools or openvm-tools is running in the given virtual machine?

Please file an issue against https://github.com/ansible-collections/community.vmware/issues with appropriate details.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7e3938b8-a5ba-4f4d-b535-a0d4c849b4dan%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde

Saketha Vamshi d

unread,
Oct 22, 2020, 4:29:20 AM10/22/20
to Ansible Project
Hi Abhijeet,

I'm using "Centos-7 64bit" Operating system for deploying a new VM. And VCenter 6.5 version, ansible - 2.9.13. 
Regarding vmware_tools., I see the below thing from vSphere client after I deploy a new VM. 


And, you can also observe here that, it is not showing up any IP address assigned to it. 

I think the vmware_tools are installed and running. Please suggest me if anything went wrong here. 

Abhijeet Kasurde

unread,
Oct 22, 2020, 5:32:16 AM10/22/20
to Ansible Project
The image is not visible. Could you please use some other image hosting service.

Saketha Vamshi d

unread,
Oct 22, 2020, 6:02:25 AM10/22/20
to Ansible Project
I didn't find an option to attach the image. So., let me type it here what I see on my vSphere client. 

----------------------------------------------------------------------------------
VMware Tools:     Running(Guest managed)
IP Addresses:       

DNS Name:           localhost.localdomain
EVC mode:            N/A

State:                     Powered On
---------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages