$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
3 Nov // php the_time('Y') ?>
As I wrote earlier today I am provisioning Virtual Machines with PowerCLI. I don’t know if this is intentional behaviour but after Deploying (Cloning) a Virtual Machine from a template the Network Adapter is not automatically connected at power on.
This made the Join Domain operation which is party of the Customization Specification to fail. I noticed this in the log file which can be found in %WINDIR%\Temp\vmware-imc\guestcust.log:
Joining domain mydomain using account mydomain\myaccount and password ‘*****’
The specified domain either does not exist or could not be contacted.
So I wrote a small fix script in PowerCLI:
1 2 3 4 5 6 7 8 | ForEach ($VM in Get-VM) { ForEach ($NetworkAdapter in $VM.NetworkAdapters) { Write-Host "Set-NetworkAdapter -NetworkAdapter $NetworkAdapter -StartConnected $true" -ForegroundColor Blue Set-NetworkAdapter -NetworkAdapter $NetworkAdapter -StartConnected $true -Confirm:$false } } |
And of course I changed the Provisioning script to do this as well 😀
6 Responses for "VM not joined to Domain after Deploying from Template"
Im having the same issue with the joining of the domain. I dont want to use PowerCLI to join the domain since Ill be using this in a VMWare View environment. How can you edit the provisioning script?
@Justin: My provisioning script is written in PowerCLI, but the issue I was describing is that after cloning the Virtual Network Card was not connected so you must connect the network card either with a script or manually in the vSphere Console before powering on.
This is awesome man, thanks.
We have several VMs with 10 NICs, and till now i had to check them manually.
@Konflikt: thansk for you reply, good to hear!
The line “Joining domain mydomain using account mydomain\myaccount and password ‘*****’” is not present at all in my guestcust.log. It works perfectly using the GUI, but with PowerCLI it seems like VmWare doesn’t even try to join the domain. I cannot find the join domain attempt in my DC logs either.
K.
I am having the same issue as Ketil. Has anyone cracked this in the past year?
Leave a reply