vmware_guest customization fullname not being set on Windows Server 2025 #2297
Open
Description
SUMMARY
The customization of the VM, specially the renaming of the local administrator account is not taking place.
On the windows logs I can see several security events stating that the account is renamed from Administrator
to newadmin
and then renamed back to Administrator. The ansible task is completed successfully and the vmware events state that the customization was terminated successfully.
ISSUE TYPE
- Bug Report
COMPONENT NAME
community.vmware.vmware_guest
ANSIBLE VERSION
ansible [core 2.16.3]
config file = /home/xxxx/vsc/ansible/sbx/ansible.cfg
configured module search path = ['/home/xxxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.12/site-packages/ansible
ansible collection location = /home/xxxx/.ansible/collections:/usr/share/ansible/collections
executable location = /bin/ansible
python version = 3.12.8 (main, Dec 9 2024, 15:25:01) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.12)
jinja version = 3.1.2
libyaml = True
COLLECTION VERSION
Collection Version
---------------- -------
community.vmware 5.3.0
CONFIGURATION
CONFIG_FILE() = /home/xxxx/vsc/ansible/sbx/ansible.cfg
DEFAULT_STDOUT_CALLBACK(/home/xxxx/vsc/ansible/sbx/ansible.cfg) = yaml
ENABLE_TASK_DEBUGGER(/home/xxxx/vsc/ansible/sbx/ansible.cfg) = True
OS / ENVIRONMENT
Target OS is Windows Server 2025 21600
STEPS TO REPRODUCE
- Create a vmware Windows Server 2025 VM template
- Use this template to instanciate a new VM as described above:
- name: Playbook
hosts: localhost
become: false
gather_facts: false
tasks:
- name: "Clone the template"
community.vmware.vmware_guest:
hostname: "*****"
username: "user@test.com"
password: "****"
name: "mynewvm"
template: "Win2025"
datacenter: "mydatacenter"
annotation: "Test Server"
folder: "VM/TST"
state: "poweredon"
cluster: "mycluster"
datastore: "mydatastore"
disk:
- size_gb: 60
type: "thin"
datastore: "mydatastore"
hardware:
memory_mb: 4096
num_cpus: 2
num_cpu_cores_per_socket: 1
scsi: "paravirtual"
hotadd_cpu: false
hotremove_cpu: false
hotadd_memory: true
networks:
- name: "dvpg"
type: static
ip: "172.21.80.50"
netmask: "255.255.255.0"
gateway: "172.21.80.254"
domain: "test.com"
dns_servers:
- "172.21.80.15"
- "172.21.80.16"
device_type: "vmxnet3"
wait_for_customization: true
customization:
timezone: "110"
password: "****"
fullname: "newadmin"
dns_servers:
- "172.21.80.15"
- "172.21.80.16"
dns_suffix:
- "test.com"
- "test.net"
become: false
delegate_to: localhost
delegate_facts: true
# ansible-playbook -i localhost main.yml -v
EXPECTED RESULTS
- The "Clone the template" task completes with success.
- The local administrator username is
newadmin
as configured on thecustomization
block.
Please note that when using a Windows Server 2019 template the local administrator is renamed to newadmin
.
ACTUAL RESULTS
- The "Clone the template" task completes with success.
- The local administrator username is
Administrator
(default value) not as configured on thecustomization
block.
Metadata
Assignees
Labels
No labels