# vmware\_guest customization

**URL:** <https://forum.ansible.com/t/vmware-guest-customization/24975>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [July 13, 2017, 8:07pm UTC](https://forum.ansible.com/t/vmware-guest-customization/24975 "2017-07-13T20:07:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anil](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Anil](https://forum.ansible.com/u/Anil)\
**Post date:** [July 13, 2017, 8:07pm UTC](https://forum.ansible.com/t/vmware-guest-customization/24975/1 "2017-07-13T20:07:52Z")

</div>

I am trying to provision a VM using vmware\_guest from template(which has a nic set to use DHCP vlan). Now When I provision VM with customization, it throws below error, however it provisions VM but fails to power on. And also I noticed that hostname in customization does not pick up.

my ansible version is 2.3  
vcenter : 6.0

$ ansible-playbook vm\_provision.yml -vv  
Using /home/athangal/playbooks/ansible.cfg as config file  
PLAYBOOK: vm\_provision.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in vm\_provision.yml  
PLAY [localhost] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
META: ran handlers  
TASK [rhel\_vm : Create VM] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/athangal/playbooks/roles/rhel\_vm/tasks/main.yml:2  
fatal: [localhost]: FAILED! =\> {“changed”: true, “failed”: true, “msg”: “fault.NicSettingMismatch.summary”}

- name: Create VM  
vmware\_guest:  
hostname: ‘{{vcenter\_hostname}}’  
username: ‘{{vcenter\_user}}’  
password: ‘{{vcenter\_password}}’  
datacenter: MCR  
cluster: ‘RHEL-DRS 2’  
folder: “/RHEL 7”  
name: ‘{{vm\_name}}’  
state: poweredon  
annotation: ‘{{notes}}’  
template: ‘{{vm\_template\_src}}’  
disk:
- size\_gb: 150  
type: thin  
datastore: ‘RHEL-DRS-2-VMFS10’  
networks:
- name: “{{ vm\_network }}”  
device\_type: vmxnet3  
customization:  
hostname: marx5093  
register: Create\_VM\_Status
