Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

vCenter customization wizard for CentOS

Luca Dell'Oca, December 13, 2012December 4, 2016

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:

/etc/udev/rules.d/70-persistent-net.rules
/etc/sysconfig/network-scripts/ifcfg-eth0

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.

 

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tech centoscustomizazioneth0howtospecificationudevvCenterwizard

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy