Create Template for vCenter Virtual Server

Linux Templates

SUDO installation is required for the VMware Linux templates.

  1. Connect to vCenter
  2. Create a virtual machine using a New Virtual Server wizard.
  3. Open VS settings and attach ISO with OS
  4. Install OS on this VS
  5. Install VMware tools inside the VS by following the VMware instructions. (This step is required!)
  6. Make sure that the network service is enabled and the NetworkManager service is disabled before converting a CentOS VS to template:

    chkconfig NetworkManager --levels 2345 off
    chkconfig network --levels 2345 on
  7. Select your VS > Template > Clone to Template
  8. After this, add the record manually to the OnApp templates table. For example:

          label: CentOS 6.4
          created_at: 2015-03-31 10:06:44
          updated_at: 2015-03-31 10:06:44
          version: 1.0
          file_name: centos-6.4-x64-1.0-vmware.ova
          operating_system: linux
          operating_system_distro: centos
          allowed_swap: 1
          state: active
          checksum: NULL
          allow_resize_without_reboot: NULL
          min_disk_size: 5
          user_id: NULL
          template_size: 0
          allowed_hot_migrate: 0
          operating_system_arch: NULL
          operating_system_edition: NULL
          operating_system_tail: NULL
          parent_template_id: NULL
          virtualization: vcenter
          min_memory_size: NULL
          disk_target_device: NULL
          cdn: 0
          backup_server_id: NULL
          ext4: 0
          smart_server: 0
          baremetal_server: 0
          initial_password: NULL
          initial_username: NULL
          remote_id: NULL
          manager_id: NULL
          resize_without_reboot_policy: --- {}

    Where file_name is the template's name. The template file name (file_name) must match the letter case of a VMware template label in the vCenter.

    See the following table for the values of the initial_password and initial_username parameters:

    Template NameLoginPassword
    ubuntu-13.10-x64-1.0-vmware.ovarootubuntu-13.10-x64
    centos-6.4-x64-1.0-vmware.ovarootcentos-6.4-x64
    centos-6.3-x64-1.2-vmware.ovarootpassword1
    win08_x64_std_r2-ver3.2-vmware.ovaAdministratorpassword1
    win12_x64_std_r2-ver3.2-vmware.ovaAdministratorpassword1
  • OnApp supports templates with not more than one disk.
  • To be able to use Ubuntu templates later than 9 version for VMware virtual server creation, you need to remove the absolute pathnames in /etc/pam.d/vmtoolsd file. For example: /lib/security/pam_unix.so > pam_unix.so

Example for CentOS

insert into templates (id,label,created_at,updated_at,version,file_name,operating_system,operating_system_distro,allowed_swap,state,checksum, allow_resize_without_reboot,min_disk_size,template_size,allowed_hot_migrate,operating_system_arch,operating_system_edition,operating_system_tail,virtualization, min_memory_size,disk_target_device,cdn,backup_server_id,ext4,initial_password) values ('','CentOS 5.8 vmware','','','1.0','CentOSTemplate','linux','centos','0','active','','0','10','0','1','','','','vcenter','128','','0',NULL,'0','');

Example for Win2008 x64 STD R2

insert into templates (id,label,created_at,updated_at,version,file_name,operating_system,operating_system_distro,allowed_swap,state,checksum, allow_resize_without_reboot,min_disk_size,template_size,allowed_hot_migrate,operating_system_arch,operating_system_edition,operating_system_tail,virtualization, min_memory_size,disk_target_device,cdn,backup_server_id,ext4,initial_password) values ('','Windows 2008 Standard Edition R2 x64 vmware','','','3.1','win2008R2Template','windows','2008','0','active','','0','20','13714564','1','x64','STD','R2','vcenter','1024','','0',NULL,'0','');