vmware_guest - Failed to set static IP - VCenter 6.5

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!!

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.

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

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.

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

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.

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.

The image is not visible. Could you please use some other image hosting service.

I didn’t find an option to attach the image. So., let me type it here what I see on my vSphere client.