From 32fa0be9de134eb72e1149a702d6629fc01afa5e Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 14:30:18 +0100 Subject: [PATCH 1/7] Replace builtin CentOS 5.x with 8.0 templates Replace builtin CentOS 5.x with 8.0 templates --- setup/db/templates.sql | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup/db/templates.sql b/setup/db/templates.sql index ba514894b961..3047978ec34c 100755 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -34,16 +34,18 @@ INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, VALUES (2, UUID(), 'centos53-x86_64', 'CentOS 5.3(64-bit) no GUI (XenServer)', 1, now(), now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/templates/builtin/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', 'b63d854a9560c013142567bbae8d98cf', 0, 'CentOS 5.3(64-bit) no GUI (XenServer)', 'VHD', 12, 1, 1, 'XenServer', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, display_text, enable_password, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) - VALUES (4, UUID(), 'centos55-x86_64', 'CentOS 5.5(64-bit) no GUI (KVM)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2', 'ed0e788280ff2912ea40f7f91ca7a249', 'CentOS 5.5(64-bit) no GUI (KVM)', 0, 'QCOW2', 112, 1, 1, 'KVM', 1); + VALUES (4, UUID(), 'default-tmpl-centos8.0-kvm', 'CentOS 8.0(64-bit) no GUI (KVM)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.qcow2.bz2', '80da87ecc67d1e4fcf90079873241619', 'CentOS 8.0(64-bit) no GUI (KVM)', 0, 'QCOW2', 274, 1, 1, 'KVM', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) - VALUES (5, UUID(), 'centos56-x86_64-xen', 'CentOS 5.6(64-bit) no GUI (XenServer)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/templates/builtin/centos56-x86_64.vhd.bz2', '905cec879afd9c9d22ecc8036131a180', 0, 'CentOS 5.6(64-bit) no GUI (XenServer)', 'VHD', 142, 1, 1, 'XenServer', 1); + VALUES (5, UUID(), 'default-tmpl-centos7.2-xen', 'CentOS 7.2(64-bit) no GUI (XenServer)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.vhd.bz2', '9a2726a0d7680fb15a24af874f2a26e8', 0, 'CentOS 7.2(64-bit) no GUI (XenServer)', 'VHD', 274, 1, 1, 'XenServer', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) VALUES (6, UUID(), 'centos64-x64', 'CentOS 6.4(64-bit) GUI (Hyperv)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.3/centos6_4_64bit.vhd.bz2', 'eef6b9940ea3ed01221d963d4a012d0a', 0, 'CentOS 6.4 (64-bit) GUI (Hyperv)', 'VHD', 182, 1, 1, 'Hyperv', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) - VALUES (7, UUID(), 'centos53-x64', 'CentOS 5.3(64-bit) no GUI (vSphere)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/2.2.0/CentOS5.3-x86_64.ova', 'f6f881b7f2292948d8494db837fe0f47', 0, 'CentOS 5.3(64-bit) no GUI (vSphere)', 'OVA', 12, 1, 1, 'VMware', 1); + VALUES (7, UUID(), 'default-tmpl-centos8.0-vmware', 'CentOS 8.0(64-bit) no GUI (vSphere)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.ova', '85168c007c6ab85c516274cdf23eda48', 0, 'CentOS 8.0(64-bit) no GUI (vSphere)', 'OVA', 274, 1, 1, 'VMware', 1); +INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`, `display`) VALUES (1, 7, 'nicAdapter', 'Vmxnet3', 1); +INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`, `display`) VALUES (2, 7, 'rootDiskController', 'pvscsi', 1); INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (1, UUID(), 'CentOS'); INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (2, UUID(), 'Debian'); From 5428dbff11274b25de1ca87b4f84d0a675b953f0 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 19:48:11 +0100 Subject: [PATCH 2/7] delete an ancient centos53-x86_64 template Delete an ancient template added in ACS 2.2, which was set as removed in ACS 4.5. Just for sake of cleanup and easier overview of builtin templates we provide. --- .../main/resources/META-INF/db/schema-41300to41400-cleanup.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql index 57c4a611f0e7..32f7d8a0068d 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql @@ -19,3 +19,5 @@ -- Schema upgrade cleanup from 4.13.0.0 to 4.14.0.0 --; +# Delete an ancient template added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates +DELETE FROM `cloud`.`vm_template` WHERE `id`=2 AND `unique_name`="centos53-x86_64" AND `name`="CentOS 5.3(64-bit) no GUI (XenServer)"; From e0e82bf0e38913541a4095593dbf04dc3d339732 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 19:52:52 +0100 Subject: [PATCH 3/7] desc update --- .../main/resources/META-INF/db/schema-41300to41400-cleanup.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql index 32f7d8a0068d..ec7643b75ba9 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql @@ -19,5 +19,6 @@ -- Schema upgrade cleanup from 4.13.0.0 to 4.14.0.0 --; -# Delete an ancient template added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates +# Delete an ancient template added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates. +# This DOES assume one is not running any VMs from this template! DELETE FROM `cloud`.`vm_template` WHERE `id`=2 AND `unique_name`="centos53-x86_64" AND `name`="CentOS 5.3(64-bit) no GUI (XenServer)"; From 768974a03773ffefcfcd70a47b606c0a2217b8bd Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 19:53:48 +0100 Subject: [PATCH 4/7] desc fix --- .../resources/META-INF/db/schema-41300to41400-cleanup.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql index ec7643b75ba9..dc6a10beb034 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400-cleanup.sql @@ -19,6 +19,6 @@ -- Schema upgrade cleanup from 4.13.0.0 to 4.14.0.0 --; -# Delete an ancient template added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates. -# This DOES assume one is not running any VMs from this template! +-- Delete an ancient template added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates. +-- This DOES assume one is not running any VMs from this template! DELETE FROM `cloud`.`vm_template` WHERE `id`=2 AND `unique_name`="centos53-x86_64" AND `name`="CentOS 5.3(64-bit) no GUI (XenServer)"; From 3ea08a7be8b7089223e6b7baec203916936e87c7 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 22:43:32 +0100 Subject: [PATCH 5/7] cent8 it is cent8 - works when XS 6.5 sp1 updated to patch 1066 (all patches...) --- setup/db/templates.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/db/templates.sql b/setup/db/templates.sql index 3047978ec34c..d68d48087fa2 100755 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -37,7 +37,7 @@ INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, VALUES (4, UUID(), 'default-tmpl-centos8.0-kvm', 'CentOS 8.0(64-bit) no GUI (KVM)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.qcow2.bz2', '80da87ecc67d1e4fcf90079873241619', 'CentOS 8.0(64-bit) no GUI (KVM)', 0, 'QCOW2', 274, 1, 1, 'KVM', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) - VALUES (5, UUID(), 'default-tmpl-centos7.2-xen', 'CentOS 7.2(64-bit) no GUI (XenServer)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.vhd.bz2', '9a2726a0d7680fb15a24af874f2a26e8', 0, 'CentOS 7.2(64-bit) no GUI (XenServer)', 'VHD', 274, 1, 1, 'XenServer', 1); + VALUES (5, UUID(), 'default-tmpl-centos8.0-xen', 'CentOS 8.0(64-bit) no GUI (XenServer)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.vhd.bz2', '440acfd548a7391b26559c4763377118', 0, 'CentOS 8.0(64-bit) no GUI (XenServer)', 'VHD', 274, 1, 1, 'XenServer', 1); INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) VALUES (6, UUID(), 'centos64-x64', 'CentOS 6.4(64-bit) GUI (Hyperv)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.3/centos6_4_64bit.vhd.bz2', 'eef6b9940ea3ed01221d963d4a012d0a', 0, 'CentOS 6.4 (64-bit) GUI (Hyperv)', 'VHD', 182, 1, 1, 'Hyperv', 1); From 168b9d8545f605c0e2a8b2ca2ac4ba1627f7196a Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 22:51:30 +0100 Subject: [PATCH 6/7] Remove "centos53-x86_64" for clean install From the clean install of (master/4.14?) - delete an ancient template "centos53-x86_64" added in 2.2, which was set as removed in 4.5. For sake of cleanup and easier overview of builtin templates in DB. --- setup/db/templates.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup/db/templates.sql b/setup/db/templates.sql index d68d48087fa2..44ae2816943a 100755 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -30,9 +30,6 @@ INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type) VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloudstack.org/systemvm/4.6/systemvm64template-4.6.0-hyperv.vhd.zip', '53e24bddfa56ea3139ed37af4b519013', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv' ); -INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, removed, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) - VALUES (2, UUID(), 'centos53-x86_64', 'CentOS 5.3(64-bit) no GUI (XenServer)', 1, now(), now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/templates/builtin/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', 'b63d854a9560c013142567bbae8d98cf', 0, 'CentOS 5.3(64-bit) no GUI (XenServer)', 'VHD', 12, 1, 1, 'XenServer', 1); - INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, display_text, enable_password, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) VALUES (4, UUID(), 'default-tmpl-centos8.0-kvm', 'CentOS 8.0(64-bit) no GUI (KVM)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.qcow2.bz2', '80da87ecc67d1e4fcf90079873241619', 'CentOS 8.0(64-bit) no GUI (KVM)', 0, 'QCOW2', 274, 1, 1, 'KVM', 1); From 7323d4804c6bf7a919658787fcefb755207ef217 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Sun, 24 Nov 2019 23:38:39 +0100 Subject: [PATCH 7/7] Display field not yet there... --- setup/db/templates.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/db/templates.sql b/setup/db/templates.sql index 44ae2816943a..61a722a778ef 100755 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -41,8 +41,8 @@ INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, extractable) VALUES (7, UUID(), 'default-tmpl-centos8.0-vmware', 'CentOS 8.0(64-bit) no GUI (vSphere)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloudstack.org/releases/4.14/default-tmpl-centos8.0.ova', '85168c007c6ab85c516274cdf23eda48', 0, 'CentOS 8.0(64-bit) no GUI (vSphere)', 'OVA', 274, 1, 1, 'VMware', 1); -INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`, `display`) VALUES (1, 7, 'nicAdapter', 'Vmxnet3', 1); -INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`, `display`) VALUES (2, 7, 'rootDiskController', 'pvscsi', 1); +INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`) VALUES (1, 7, 'nicAdapter', 'Vmxnet3'); +INSERT INTO `cloud`.`vm_template_details` (`id`, `template_id`, `name`, `value`) VALUES (2, 7, 'rootDiskController', 'pvscsi'); INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (1, UUID(), 'CentOS'); INSERT INTO `cloud`.`guest_os_category` (id, uuid, name) VALUES (2, UUID(), 'Debian');