Question
How to create a Template for VMware Virtual Machine?
Answer
- Connect to vCenter (use rdp+vsphere client).
- Create a virtual machine using a New Virtual Machine wizard.
- Open VM settings and attach ISO with OS
- Install OS on this VM
- Install VMware tools inside the VM by following the VMware instructions.
- Select your VM > Template > Clone to Template
-
After this, add the record manually to the OnApp templates table. For example:
id:
5
label: CentOS
5
created_at:
2012
-
06
-
18
13
:
32
:
06
updated_at:
2012
-
06
-
18
13
:
32
:
06
version:
1.0
file_name: CentOS
operating_system: linux
operating_system_distro: rhel
allowed_swap:
0
state: active
checksum: NULL
allow_resize_without_reboot: NULL
min_disk_size:
25
user_id: NULL
template_size: NULL
allowed_hot_migrate:
0
operating_system_arch: NULL
operating_system_edition: NULL
operating_system_tail: NULL
parent_template_id: NULL
virtualization: NULL
min_memory_size: NULL
disk_target_device: NULL
cdn:
0
backup_server_id: NULL
ext4:
0
Where file_name is the template's name.
Additional info
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) values ( '' , 'CentOS 5.8 vmware' , '' , '' , '1.0' , 'CentOSTemplate' , 'linux' , 'rhel' , '0' , 'active' , '' , '0' , '10' , '0' , '1' , '' , '' , '' , 'vmware' , '128' , '' , '0' , '' , '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) values (
''
,
'Windows 2008 Standard Edition R2 x64 vmware'
,
''
,
''
,
'3.1'
,
'win2008R2Template'
,
'windows'
,
'2008'
,
'0'
,
'active'
,
''
,
'0'
,
'20'
,
'13714564'
,
'1'
,
'x64'
,
'STD'
,
'R2'
,
'vmware'
,
'1024'
,
''
,
'0'
,
''
,
'0'
);
Comments
0 comments
Please sign in to leave a comment.