How to switch vSphere Guest OS Customization engine for Linux virtual machine
search cancel

How to switch vSphere Guest OS Customization engine for Linux virtual machine

book

Article ID: 311873

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article provides the steps of switching vSphere Guest OS Customization engine for Linux virtual machine. Specifically, Perl based customization engine is used when disabling Guest OS Customization with cloud-init, cloud-init based customization engine is used when enabling Guest OS Customization with cloud-init.

Resolution

To switch vSphere Guest OS Customization engine, please follow the guidelines given below:

Switch to cloud-init based customization engine by enabling Guest OS Customization with cloud-init

Prerequisites:

  • Ensure that VMware Tools version 10.3.5 or later is installed.
  • Ensure that cloud-init version 18.4 or later is installed.
  • Ensure that Datasource OVF (cloud-init ver < 23.1) or Datasource VMware (cloud-init ver >= 23.1) is included in cloud-init Datasource search list.

Steps:

  1. Power-on and login to Linux virtual machine.
  2. Edit cloud-init configuration file /etc/cloud/cloud.cfg to insert below entry at the bottom line:

disable_vmware_customization: false

  1. Ensure that network configuration is not disabled in cloud-init configuration files located at /etc/cloud/cloud.cfg or /etc/cloud/cloud.cfg.d/*.cfg.

For example, below configuration disables network configuration by cloud-init.
network:
config: disabled

Please comment out these 2 lines to enable network configuration by cloud-init.
#network:
#config: disabled

  1. Execute command 'sudo cloud-init clean --seed' to make sure virtual machine becomes a clean cloud-init instance.
  2. Power-off Linux virtual machine

By now, cloud-init based customization engine will be used when customizing this Linux virtual machine.
 

Switch to Perl based customization engine by disabling Guest OS Customization with cloud-init.

Prerequisites:

  • Ensure that VMware Tools is installed.
  • Ensure that Perl is installed.

Perl based customization engine is the default engine when cloud-init is not installed.
If cloud-init is installed, please follow below steps to make sure Perl based customization engine is used:

  1. Power-on and login to Linux virtual machine.
  2. Edit cloud-init configuration file /etc/cloud/cloud.cfg to remove below entry if it exists:
disable_vmware_customization: false
  1. Ensure that network configuration is disabled by creating file /etc/cloud/cloud.cfg.d/80_disable_network.cfg with below content:

   network:
  config: disabled

  1. Power-off Linux virtual machine.

By now, Perl based customization engine will be used when customizing this Linux virtual machine.
Particularly, if cloud-init user data is provided and Linux virtual machine is also customized and powered-on, cloud-init could fail to apply user data since it's terminated by rebooting triggered by Perl based customization, please upgrade VMware Tools version 12.1.5 or later to avoid such conflict, for more information, please refer KB 90331.

Notes:

  1. For information on customize guest operating systems, see the Customizing Guest Operating Systems guide.
  2. For information on a full list of guest operating systems supporting customization, see Guest OS Customization Support Matrix guide.
  3. vSphere Guest OS Customization can customize a Linux virtual machine with cloud-init metadata and user data, for more information see KB 82250 and KB 90331.