Create Template for vCenter Virtual Server
Linux Templates
SUDO installation is required for the VMware Linux templates.
- Connect to vCenter
- Create a virtual machine using a New Virtual Server wizard.
- Open VS settings and attach ISO with OS
- Install OS on this VS
- Install VMware tools inside the VS by following the VMware instructions. (This step is required!)
- Make sure that Perl is installed on this VS. (This step is required!)
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
CODE- Select your VS > Template > Clone to Template
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: --- {}
CODE
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.
initial_password and initial_username - are the login and password set during the vCenter VS creation.
- OnApp supports templates with not more than one disk.
- Windows 2008 and Windows 2008 R2 templates are not supported since 6.0 Patch 9.
- 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','');
CODE