When you use static IP address in your service blueprint the BSA DNS settings in the VGP are not passed over to CLM ..
- BBSA VGP supports specifying DNS server config and when provisioned directly from BBSA the usecase works fine (i.e., VM does get enrolled into DNS correctly for both linux and windows).
- When CLM provisions VM, it provides inputs to the VirtualGuestJob (VGJ) based on the information it retrieved from BBSA, blueprint and partially from VGP itself. At the end of it, the input data supplied to VGJ overrides whatever info is in the source VGP.
There is a way to get around this:
Option#1: Enroll by name and update DNS: Use a pre-provisioning AO callout ("VirtualGuest_CONSTRUCTOR" pre-operation) to register the VM name into the DNS.
Option#2: Enroll by IP and update DNS: You could either use a post-provisioning AO callout like above or an NSH script as described below.
- Have an NSH script to setup the DNS config correctly be part of an NSH script job
- Have this NSH script job be part of an ACT batch job (lets say your ACT name is "Update DNS Config")
- Use this ACT in your blueprint (very similar to how you use other software)
How about DNS forworder within your VM 192.x.x.x segment of the network? Your thoughts? Thus, you can use the hostname for everything. I had similar setup. Here is document:
Here is the KB from VMWare:
I just had to do this exact scenario for a customer. What Bret suggested above is 100% correct and way to go. We used a VirtualGuest_CONSTRUCTOR postCallout AO Callout to initiate the "net join" command on our Windows 2008 server.
With that said, if you have never worked with CLM AO Callouts or BAO (Atrium Orchestrator) - this is NOT the way to go.
I would suggest you create a Component Template (now its called Application Component Template - ACT) in BBSA, create batch job that contains the required Discovery Job and an NSH Script Job, and in the NSH Script job have an "nexec -e <net join command>" to join your box.
Publish that ACT into CLM, and add the ACT into the CLM Blueprint. It will run later than when the AO Callout would have ran, but is much easier to accomplish.
Let us know how it goes.
My customer required adding DNS entries to the provisioned Windows VMs and joining them to the domain.
I added lines to the OOTB NSH script called create_user_windows.nsh (in the CSM_scripts folder on BL) that does those operations to the provisioned Windows VMs.
Below is an example of the lines I added:
nexec $SERVER netsh interface ip set dns "Local Area Connection 5" static 10.14.10.13
nexec $SERVER netsh interface ip add dns "Local Area Connection 5" 10.6.10.13 index=2
nexec $SERVER netsh interface ip set dns "Local Area Connection 6" static 10.14.10.13
nexec $SERVER netsh interface ip add dns "Local Area Connection 6" 10.6.10.13 index=2
nexec $SERVER netdom join /d:prod.mobily.lan $SERVER /userd:sampleuser /passwordd:samplepassword /uo:sampleuser /po:samplepassword
I hope my answer helps.