Skip to content

Commit 42e66aa

Browse files
Vijayendra Bhamidipatichaturvedia
authored andcommitted
CLOUDSTACK-4539: [VMWARE] vmware.create.full.clone is set to true in upgraded setup;default nature of vms are full clone
Description: Do not overwrite value of vmware.create.full.clone flag in the cloud db if it already exists. This will preserve the configured clone creation behaviour across upgrades. (cherry picked from commit a30a33c) Signed-off-by: animesh <animesh@apache.org>
1 parent 72a3cbb commit 42e66aa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎setup/db/db/schema-410to420.sql‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,12 @@ CREATE TABLE `cloud`.`user_vm_clone_setting` (
403403
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
404404

405405

406-
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'UserVmManager', 'vmware.create.full.clone' , 'true', 'If set to true, creates VMs as full clones on ESX hypervisor');
406+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description)
407+
SELECT tmp.category, tmp.instance, tmp.component, tmp.name, tmp.value, tmp.description FROM
408+
(SELECT 'Advanced' category, 'DEFAULT' instance, 'UserVmManager' component, 'vmware.create.full.clone' name, 'true' value, 'If set to true, creates VMs as full clones on ESX hypervisor' description) tmp
409+
WHERE NOT EXISTS (SELECT 1 FROM `cloud`.`configuration` WHERE name = 'vmware.create.full.clone');
410+
411+
407412

408413
CREATE TABLE `cloud`.`affinity_group` (
409414
`id` bigint unsigned NOT NULL auto_increment,

0 commit comments

Comments
 (0)