vCenter customization wizard for CentOS
Customazion Wizard is a really cool feature in vCenter, but I often found many customers not using it, mainly because they do not even know it exists, or because they had a weak knowledge about how to use it. This is even more true if the template is a linux VM. On CentOS, the main problem comes from Network Manager and its non-friendly management of ethernet connection: since it identifies ethernet cards by mac address, everytime you clone a VM a new network interface is created, with a different and randomly generated mac address. Previous configuration get lost, and Network Manager is not able to find eth0.
Usually, people ends up updating by hand network configurations everytime a new VM is deployed, thus wasting the benefits of automatic deploys. However, once you know some little tricks that needs to be applied, even deploying CentOS VMs from templates and automatically customizing it, can become an easy task.
First, you obviously need to prepare the template. Install CentOS as you would do for a standard VM, add all the packages you want, and remember to install also VMware Tools. Just before powering it down, delete these two files:
This will ensure the new VM will not have any reference to the previous MAC address used while creating the template.
Then, you have to “cheat” vCenter: customization wizard does not supports CentOS, but it does support RedHat. So, simply edit the VM settings and configure the VM as a RedHat 6 64bit VM.
Next, convert the VM into a template.
Create a new customization wizard, choosing linux as type. Use your preferred configuration settings and save the Customization.
You are now ready to deploy a new VM: select the template you created and choose to deploy a new VM from this template. At the customization tab, choose to customize the new VM using an existing customization (the one you created before…).
Depending on how many parameters you already configured into the Customization, the wizard is going to ask you for the remaining ones. Set every parameter and finish the wizard itself. My wizard for example uses the VM name as hostname inside linux, and asks me only for the IP address, while subnet, gateway and DNS servers and even time zone are all pre-configured.
Then, let vCenter finish the deployment of the new VM. After it has finished, you will see directly in the summary of the VM, it is using the TCP parameters you configured:
and also inside the Guest OS, everything is working as expected:
The chosen IP address has been assigned to the “new” eth0 network interface, all the network parameters has been correctly configured, and the hostname has been configured from the VM name itself.
vCenter customization wizard for CentOS by Luca Dell'Oca is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This post is also available in: Italian
|Print article||This entry was posted by Luca Dell'Oca on December 13, 2012 at 16:00, and is filed under Tutorial. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site.|
No comments yet.
No trackbacks yet.
about 1 month ago - No comments
TweetRecently a customer has added a new ESXi server to his vSphere cluster. Since he has vCloud Standard licenses, I already created a distributed switch to allow an automatic, consistent and error-free configuration of the network settings of all servers. The network migration wizard had worked great and the new server was added and configured…
about 4 months ago - No comments
TweetIn a previous post, I explained how to install and configure HP Insight Control for VMware vCenter 7.1.1 to monitor and manage an HP LeftHand storage directly inside vCenter Web Client. The HP software also adds VASA capabilities to vCenter, useful to create Storage Profiles based on effective storage capabilities directly acquired from the storage rather…
about 5 months ago - No comments
TweetHP has recently released the latest version of their Insight Control, numbered 7.1.1. As per the official webpage: The HP Insight Control extension for VMware vCenter Server delivers powerful HP hardware management capabilities to virtualization administrators, enabling comprehensive deployment, provisioning, monitoring, remote control and power optimization directly from the vCenter console. One of the most interesting…
about 1 year ago - 2 comments
TweetI received during the weekend my new license codes for the 5.0 lineup of VMware products, so I tried and found a couple of hours to test the upgrade process of vCenter. This is the first element of a 4.1 cluster you need to upgrade to 5.0, cause it can manage both ESXi 4.1 and…