Guest customization of an Ubuntu virtual machine fails to update IP address settings
search cancel

Guest customization of an Ubuntu virtual machine fails to update IP address settings

book

Article ID: 302654

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Attempting to deploy an Ubuntu virtual machine with guest customization fails.
  • Guest customization of an Ubuntu virtual machine fails to update IP address settings.
  • You see the error:
An error occurred while customizing VM_NAME. For details, reference the log file /var/log/vmware-imc/toolsDeployPkg.log in the guest OS
  • The toolsDeployPkg.log file located in /var/log/vmware-imc/contains entries similar to:

    ERROR: Fatal error occurred during customization !! Customization halted.
    ERROR: Error : Could not create file /etc/dhcp3/dhclient.conf! at /tmp/.vmware/linux/deploy/scripts/Utils.pm line 475.
    INFO: Return code is 252.
    Customization process returned with error.
    Deployment result = 252
  • The guest operating system does not have a /etc/dhcp3 directory.


Environment

VMware ESXi 4.1.x Installable
VMware ESX 4.1.x
VMware vSphere ESXi 5.1
VMware vCenter Server Appliance 5.0.x
VMware vCenter Server 4.1.x
VMware ESXi 4.0.x Installable
VMware vCenter Server 5.0.x
VMware vSphere ESXi 5.0
VMware vCenter Server 5.1.x
VMware ESXi 4.1.x Embedded
VMware ESX 4.0.x
VMware vSphere ESXi 5.5
VMware vCenter Server 4.0.x
VMware ESXi 4.0.x Embedded
VMware vCenter Server 5.5.x
VMware vCenter Server Appliance 5.1.x

Cause

This issue occurs when the /etc/dhcp3 directory does not exist on the Ubuntu virtual machine. VMware Tools attempts to create a file within this directory which causes the failure.

Resolution

To resolve the issue, create a symbolic link from /etc/dhcp3 to /etc/dhcp or create a /etc/dhcp3 directory if it does not exist.

To create a symbolic link from /etc/dhcp3 to /etc/dhcp:

Caution: Ensure the symbolic link is created between /etc/dhcp3 to /etc/dhcp only.

  1. Convert the template to a virtual machine. Power on the virtual machine if necessary.
  2. Log in to the virtual machine with root privileges.
  3. Create a symbolic link from /etc/dhcp3 to /etc/dhcp using the command:

    ln -s /etc/dhcp /etc/dhcp3

    <LN dhcp3<br="" etc="" dhcp="" -s=""></LN>
  4. Convert the virtual machine back to a template and deploy a virtual machine with guest customization.
To manually create a /etc/dhcp3 directory if it does not exist:

  1. Convert the template to a virtual machine. Power on the virtual machine if necessary.
  2. Log in to the virtual machine with root privileges.
  3. Create the /etc/dhcp3 directory manually. For more information, see Common Linux-based operating system operations (1022050).

    Note: You can use a package such as whereami to create the directory. To install whereami, use the command:

    sudo apt-get install whereami

    For more information, see the Ubuntu Man Pages.

  4. Convert the virtual machine back to a template and deploy a virtual machine with guest customization.


Additional Information

For more information in 4.x versions, see Customize Linux During Cloning or Deployment in:

For more information in 5.x versions, see Customize Linux During Cloning or Deployment in the vSphere Client in:

Common Linux-based operating system operations
Ubuntu 仮想マシンのゲストのカスタマイズで IP アドレス設定の更新に失敗する