Recently I had a problem changing the boot order on a Windows VM hosted on vSphere 6.7 with BIOS configured as boot software.
When I tried to change the boot order I could locate the message:
All items on this menu cannot be modified in user mode. If any items require changes, please consult your system Supervisor.
As a result I could not boot from the CD device. This happens because the boot order is defined on the .vmx file of the virtual machine. In more detail the bios.bootOrder attribute should be changed accordingly.
Download and edit .vmx. You should add cdrom as the first option.
Rename the existing .vmx for backup purposes
Force a BIOS boot on setup screen
Upload the .vmx file on VM datastore folder.
Then the boot will be performed from CD as expected.
Sometimes it could be tricky in Ansible to loop over a nested key-value list. Take for example the below dictionary which includes a nested list of disks. The upper element of the .yml file is vms which includes name, folder, cpus, sockets, memory and disk.
The disk element consists of disksize and disktype. This .yml file has been created on a previous post which explains how to automatically provision VMware servers.