Imagine having to deploy all Windows IaaS boxes and bring them into vRSLCM for the vRA deployment – and now imagine – someone doing all the hard work for you – vRSLCM 2.0 does just that! Let’s take a quick tour to see how this is done.
The vRealize Lifecycle Manager 2.0 can now be used to deploy the windows VMs required by the vRA components. You can either provide a Windows Template in the vCenter Server or just a plain Windows ISO File for deployment. It’s also possible to customize the Virtual Machine alongside deployment by providing the vCenter Custom Specifications created in the vCenter Server or you can input the values in vRSLCM.
You can provide VM details if you have already deployed it without using vRSLCM. In this case, the “Configure Windows Box” option will be set to “No”. For deploying the Windows VMs through vRSLCM, there are two options described below.
Prerequisites
- If using custom spec or template, then trigger the vCenter Server data collection of the vCenter that you are using. Go to Data Centers -> Manage vCenter Servers -> Refresh the data collection.
- This is necessary if new Templates/Custom specifications are added in the vCenter Server.
- Also, the previous versions of vRSLCM do not collect templates and custom spec as part of data collection. Therefore, refreshing it is mandatory if vRSLCM is being upgraded to 2.0.
- The data collection will only collect the Windows Templates and Windows Custom Specifications.
Deployment using a Windows Template
In the “Configure Windows Box” option, there are two options to create a windows box. For deployment using a template, a Template name (in the vCenter) must be provided. Furthermore, you can provide any Custom Specification or specific input for customization. The template provided should have the latest VMware Tools depending on vCenter Server. This prerequisite is mandatory for successful deployment.
You can override this top-level specification or input to provide component specific spec files using the advanced settings in each component. Details like DNS servers, Domain, etc., given while creating the environment will be overridden by the same in the custom spec.
For more information about how to create and use custom specification in VC, refer the below link:-
Deployment using an ISO
If the “ISO” option is selected in the “Create Windows Box Using” in configure Windows box, then you just need the iso file name. Before using the ISO based deployment option, an ISO mapping needs to be done in the “Product Binaries” inside the “Settings” page of vRSLCM.
ISO Mapping
- In the “Add Product Binaries”, select the “Windows ISO” option and the location can be Local or NFS. Next, click on “Discover”.
- It will discover all the ISO files present at the specified location.
- Further, the ISO along with its OS Version, License Key and Image Name need to be provided. Please note that if there is any discrepancy in this data (OS version, license or image name is incorrect/invalid), then it will not be caught here in the iso mapping. This will however fail the deployment in future. Also, when you select an OS version of the image, there is a default image name appearing in the “Image Name” section. The ISO should support this image name. The following command when executed in PowerShell provides all the supported image names with the ISO.
- Dism /Get-ImageInfo /imagefile:C:\test\win-iso\sources\install.wim
- C:\test\win-iso\sources\install.wim is the path to the windows image (wim) file inside the sources folder in a given iso image(win-iso in this case).
- Four different versions of iso are supported –
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Only a single ISO can be mapped and used for deployment for a particular Windows version. If you want to map a different ISO for the same version, you can unmap the previous mapping. The unmapping can be done on the Settings page itself.
- Once the details are filled, a Windows ISO Generation request is submitted and can be tracked in the Requests section
- Currently, the admin password and locale are not configurable in deployment through iso
- Once done with iso mapping, we are good to use this mapped iso for our deployment
When the deployment starts, it first creates a content library named “LCM-LOCAL-ISO-LIB” in the vCenter and places the iso in it. If due to any error, the deployment fails after the iso is being uploaded in the library, then neither it deletes it from the library nor uploads it again on retry. Therefore, you need to delete the iso if we are remapping the ISO of the same version.
Note: Database (SQL) VM will not be installed using this deployment method since it is not feasible if the SQL servers are clustered or used as physical servers.
After selecting either the template or ISO option, click on “Validate & Deploy”. It will perform “Virtual Machine Template Validations” and deploy the windows machines in the given vCenter Server. The deployed Iaas machine will be 4 CPU, 16 GB and 40 GB Disk Size.
For iso it looks like –
If seen at VM console in the vCenter Server, it looks like –
For template it looks like –
Finally,
Errors in deployment
- If there are errors either in the deployment or customization, for troubleshooting, it is advisable to refer to var/log/vlcm/vrlcm-server.log in vRSLCM
- Windows Setup creates log files for all actions that occur during installation. For these logs, you can refer https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-log-files-and-event-logs
- For better troubleshooting, it is advisable to open the VM console in the vCenter Server if it is installed for errors like a wrong license key, wrong inputs/custom spec
- For errors in custom spec/inputs, you need to deploy the VMs again (but delete the existing in the VC as mentioned above in the article)
- If a wrong license key is given, then a new mapping with the correct key needs to be done after deleting the old mapping. Deployment needs to be done again.
- If there is any error at any stage, retry must be triggered but before that the VM already installed in the vCenter Server (if any) needs to be deleted
Once deployment is done, you cannot modify the deployed VM or recreate the Windows VM again.
After the Validate & Deploy succeeds, click on “Run Precheck” (fulfil the prerequisites listed before) for completing the vRA deployment.
That’s all folks!