This post has already been read 4542 times!
The Problem: VMware vCloud Director having a windows VM run through guest customization, change the name, get a fixed IP from the network pool, join an Active Directory Domain and move to a specific OU in the AD.
The issue with this seems to be with having a static IP address and the domain part of the guest customization, for some reason it will only work when you have the IP set to DHCP – I am not sure why this is and I am sure that VMware will address this in future releases of the product. However, this did not help me currently so I had to use a work-around I found on this blog: http://www.tech-tap.com/2011/10/01/vcloud-trick-joining-a-domain-and-specifying-a-machine-ou
So, there is an option on the vCloud director to add the machine to a domain (seen below)
If you fill out the options here then it will ONLY work if your vApp is set to use DHCP for addressing, this is down to VMTools not enabling the NIC and therefore not being able to contact the domain controllers to add the machine.
To get around this you have to utilise the post setup routines that Microsoft Windows Server 2008 will run after the initial setup completes.
Create the following file:
and add the following line to it (obviously changing the details to that of your AD domain)
netdom join %COMPUTERNAME% /domain:dclabs.local /ou:OU=vCloud,DC=dclabs,DC=local /userd:dclabs\administrator /passwordd:*** /reboot
This will add the machine to the domain as a final task and restart the server.
If you want more information on the Microsoft post setup scripts you can read more here.
Hope this helps and as normal – please comment and share!