preloader
6 September 2012 / #Vsphere

Customizing Ubuntu 12.04 TLS

As Ubuntu 12.04 LTS was released, you’ll not be able to succeed guest customization during template deployment. This version is not yet supported for guest customization in vCenter, as you can read in Release Note for version 5.0 Update 1 :

Guest Operating System Customization Improvements: vCenter Server adds support for customization of the following guest operating systems:

  • Windows 8
  • Ubuntu 11.10
  • Ubuntu 11.04
  • Ubuntu 10.10
  • Ubuntu 10.04 LTS
  • SUSE Linux Enterprise Server 11 SP2

Deployment will succeed but guest customization will fail with error message like:

ubuntu1204_customization_01

When you look in the VM log file /var/log/vmware-imc/toolsDeployPkg.log, you can see:

DEBUG: opening file for writing (/etc/resolv.conf)
DEBUG: Command: chmod 644 /etc/resolv.conf
DEBUG: Result:
INFO: Query config for ^(DNS|SUFFIX|)
DEBUG: Match Found : DNS|SUFFIX|1
DEBUG: 0
ERROR: Fatal error occoured during customization !! Customization halted.

Ubuntu 12.04 changes the way DNS setup is handled. Rather than adding nameservers to /etc/resolv.conf, they need to be added to /etc/network/interfaces You just have to edit /etc/network/interfaces, look for your primary ethernet device (such as eth0), and add this line under your primary ethernet device:

dns-nameservers <DNS>

A simple restart of the networking service will applied the change (and populate the /etc/resolv.conf file as well) :

/etc/init.d/networking restart

For instance, a working configuration would be:

root@PTV:~# cat /etc/network/interfaces
iface lo inet loopback
auto lo

auto eth0
iface eth0 inet static
address 192.168.69.203
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
up route add default gw 192.168.69.253

In order the guest customization to succeed, you must not set DNS configuration, and use a script/command in order to do it, or use post-installation tasks.

We just have to wait for vSphere 5.1 release note in order to see if this Ubuntu version will be fully supported.


> Frederic MARTIN