Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -964,11 +964,6 @@ INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type,
INSERT INTO `cloud`.`vm_template` (id, 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 (8, 'routing-8', 'SystemVM Template (vSphere)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloudstack.org/releases/2.2.0/systemvm.ova', '3c9d4c704af44ebd1736e1bc78cec1fa', 0, 'SystemVM Template (vSphere)', 'OVA', 15, 0, 1, 'VMware');

INSERT INTO `cloud`.`vm_template` (id, 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, '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);

INSERT INTO `cloud`.`vm_template` (id, 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, '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);
UPDATE vm_instance SET guest_os_id=15 where vm_template_id=1;
UPDATE vm_instance SET vm_template_id=(SELECT id FROM vm_template WHERE name='systemvm-xenserver-2.2.4' AND removed IS NULL) where vm_template_id=1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,6 @@ UPDATE `cloud`.`event` e set e.domain_id = (select acc.domain_id from `cloud`.`a

update `cloud`.`vm_template` set removed=now() where id=2;

INSERT INTO `cloud`.`vm_template` (id, 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, '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', 12, 1, 1, 'XenServer', 1);

DELETE from `cloud`.`configuration` where name='firewall.rule.ui.enabled';

DELETE FROM `cloud`.`resource_limit` WHERE domain_id = 1 AND account_id IS NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ ALTER TABLE `cloud`.`volumes` ADD COLUMN `hv_ss_reserve` int(32) unsigned DEFAUL
UPDATE `cloud`.`disk_offering` SET `state`='Inactive' WHERE `removed` IS NOT NULL;
UPDATE `cloud`.`disk_offering` SET `removed`=NULL;

UPDATE `cloud`.`vm_template` SET `guest_os_id`= "142" WHERE `id` = "5";
UPDATE `cloud`.`vm_template` SET `state`='Inactive' WHERE `removed` IS NOT NULL;
UPDATE `cloud`.`vm_template` SET `state`='Active' WHERE `removed` IS NULL;
UPDATE `cloud`.`vm_template` SET `removed`=NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,11 @@ CREATE TABLE IF NOT EXISTS `cloud`.`instance_boot_group_details` (
PRIMARY KEY (`id`),
CONSTRAINT `fk_instance_boot_group_details__group_id` FOREIGN KEY (`boot_group_id`) REFERENCES `instance_boot_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Set the guest OS of the built-in Debian 13 templates to 'Debian GNU/Linux 12 (64-bit)', which is only added by later upgrade scripts and is not available in templates.sql
UPDATE `cloud`.`vm_template` SET `guest_os_id` = (SELECT `id` FROM `cloud`.`guest_os` WHERE `display_name` = 'Debian GNU/Linux 12 (64-bit)' AND `removed` IS NULL LIMIT 1)
WHERE `id` = 4 AND `unique_name` = 'debian13-x86_64-kvm' AND `type` = 'BUILTIN';
UPDATE `cloud`.`vm_template` SET `guest_os_id` = (SELECT `id` FROM `cloud`.`guest_os` WHERE `display_name` = 'Debian GNU/Linux 12 (64-bit)' AND `removed` IS NULL LIMIT 1)
WHERE `id` = 5 AND `unique_name` = 'debian13-x86_64-xen' AND `type` = 'BUILTIN';
UPDATE `cloud`.`vm_template` SET `guest_os_id` = (SELECT `id` FROM `cloud`.`guest_os` WHERE `display_name` = 'Debian GNU/Linux 12 (64-bit)' AND `removed` IS NULL LIMIT 1)
WHERE `id` = 7 AND `unique_name` = 'debian13-x86_64-vmware' AND `type` = 'BUILTIN';
602 changes: 602 additions & 0 deletions scripts/util/build-acs-image.sh

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions setup/db/templates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ 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(), 'debian13-x86_64-kvm', 'Debian 13 (64-bit) no GUI (KVM)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://10.0.34.8/templates/debian-13-genericcloud-amd64/debian-13-genericcloud-amd64-20261021-2638-acs.qcow2', '{SHA-512}732c2b760089386ac8017ed64568c2441923e0107b9b6262586096d5fcf78393b83b561d289a7eb3f008187c17258d0be53a42651040168fc11468197619adcc', 'Debian 13 (64-bit) no GUI (KVM)', 0, 'QCOW2', 184, 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(), 'debian13-x86_64-xen', 'Debian 13 (64-bit) no GUI (XenServer)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://10.0.34.8/templates/debian-13-genericcloud-amd64/debian-13-genericcloud-amd64-20261021-2638-acs-xen.vhd.bz2', '{SHA-512}454ad1a131f05bb50938ef1b4b28068181015c8afb492ad2e8f83d4cd2bf16cda55a142eae6f550ebb936a37a58b60bf7bd1e98ff965db338544db84f5fd85bd', 0, 'Debian 13 (64-bit) no GUI (XenServer)', 'VHD', 184, 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(), 'debian13-x86_64-vmware', 'Debian 13 (64-bit) no GUI (vSphere)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://10.0.34.8/templates/debian-13-genericcloud-amd64/debian-13-genericcloud-amd64-20261021-2638-acs.ova', '{SHA-512}d199ef7728c73b6f172429aacd7f5942737d8bde5742be8a8b0d01b9330621eb55c5a521251cbb44ef091023af02ece38d5b7120d81f6b7dbeac98f4e4ec94e0', 0, 'Debian 13 (64-bit) no GUI (vSphere)', 'OVA', 184, 1, 1, 'VMware', 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');
Expand Down
8 changes: 4 additions & 4 deletions test/integration/smoke/test_affinity_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from marvin.lib.base import *
from marvin.lib.common import (get_domain,
get_zone,
get_template,
get_suitable_test_template,
list_virtual_machines)
from nose.plugins.attrib import attr

Expand All @@ -44,14 +44,14 @@ def setUpClass(cls):
cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
cls.hypervisor = cls.testClient.getHypervisorInfo()

cls.template = get_template(
cls.template = get_suitable_test_template(
cls.apiclient,
cls.zone.id,
cls.hypervisor
hypervisor=cls.hypervisor
)

if cls.template == FAILED:
assert False, "get_template() failed to return template"
assert False, "get_suitable_test_template() failed to return template"

cls.services["virtual_machine"]["zoneid"] = cls.zone.id

Expand Down
11 changes: 3 additions & 8 deletions test/integration/smoke/test_attach_multiple_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
Volume,
DiskOffering,
)
from marvin.lib.common import (get_domain,
from marvin.lib.common import (get_template, get_domain,
get_zone,
get_suitable_test_template,
find_storage_pool_type)
from marvin.codes import (
PASS,
Expand Down Expand Up @@ -69,13 +68,9 @@ def setUpClass(cls):
)
cls._cleanup.append(cls.disk_offering)

template = get_suitable_test_template(
cls.apiclient,
cls.zone.id,
cls.services["ostype"],
cls.hypervisor)
template = get_template(cls.apiclient, cls.zone.id, cls.services["ostype"])
if template == FAILED:
assert False, "get_suitable_test_template() failed to return template with description %s" % cls.services["ostype"]
assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]

cls.services["domainid"] = cls.domain.id
cls.services["zoneid"] = cls.zone.id
Expand Down
6 changes: 3 additions & 3 deletions test/integration/smoke/test_backup_recovery_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.lib.utils import (cleanup_resources)
from marvin.lib.base import (Account, ServiceOffering, DiskOffering, VirtualMachine, BackupOffering, Configurations, Backup, Volume)
from marvin.lib.common import (get_domain, get_zone, get_template)
from marvin.lib.common import (get_domain, get_zone, get_suitable_test_template)
from nose.plugins.attrib import attr
from marvin.codes import FAILED
import time
Expand All @@ -37,9 +37,9 @@ def setUpClass(cls):
cls.services["mode"] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.domain = get_domain(cls.api_client)
cls.template = get_template(cls.api_client, cls.zone.id, cls.services["ostype"])
cls.template = get_suitable_test_template(cls.api_client, cls.zone.id, cls.services["ostype"])
if cls.template == FAILED:
assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
assert False, "get_suitable_test_template() failed to return template with description %s" % cls.services["ostype"]
cls.services["small"]["zoneid"] = cls.zone.id
cls.services["small"]["template"] = cls.template.id
cls._cleanup = []
Expand Down
2 changes: 1 addition & 1 deletion test/integration/smoke/test_backup_recovery_kboss.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from marvin.lib import utils
from marvin.lib.base import (Account, ServiceOffering, DiskOffering, VirtualMachine, BackupOffering,
Backup, Configurations, Volume, StoragePool)
from marvin.lib.common import (get_domain, get_zone, get_template)
from marvin.lib.common import (get_template, get_domain, get_zone)
from nose.plugins.attrib import attr
from marvin.codes import FAILED
import time
Expand Down
18 changes: 9 additions & 9 deletions test/integration/smoke/test_backup_recovery_nas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from marvin.lib.utils import (cleanup_resources)
from marvin.lib.base import (Account, Network, ServiceOffering, DiskOffering, VirtualMachine, BackupOffering,
NetworkOffering, BackupRepository, Backup, Configurations, Volume, StoragePool)
from marvin.lib.common import (get_domain, get_zone, get_template)
from marvin.lib.common import (get_template, get_domain, get_zone)
from nose.plugins.attrib import attr
from marvin.codes import FAILED
import time
Expand Down Expand Up @@ -122,7 +122,7 @@ def vm_backup_create_vm_from_backup_int(self, templateid=None, networkids=None):
# Create a file and take backup
try:
ssh_client_vm = self.vm.get_ssh_client(reconnect=True)
ssh_client_vm.execute("touch test_backup_and_recovery.txt")
ssh_client_vm.execute("touch test_backup_and_recovery.txt; sync")
except Exception as err:
self.fail("SSH failed for Virtual machine: %s due to %s" % (self.vm.ipaddress, err))

Expand Down Expand Up @@ -314,7 +314,7 @@ def test_incremental_chain_cadence(self):
self._set_full_every(3)
try:
ssh_client_vm = self.vm.get_ssh_client(reconnect=True)
ssh_client_vm.execute("touch /root/incremental_marker_1.txt")
ssh_client_vm.execute("touch /root/incremental_marker_1.txt; sync")

created = []
for i in range(5):
Expand Down Expand Up @@ -435,15 +435,15 @@ def test_restore_from_incremental(self):
self._set_full_every(5)
try:
ssh_client_vm = self.vm.get_ssh_client(reconnect=True)
ssh_client_vm.execute("touch /root/marker_full.txt")
ssh_client_vm.execute("touch /root/marker_full.txt; sync")
Backup.create(self.apiclient, self.vm.id, "rfi_full")
time.sleep(3)

ssh_client_vm.execute("touch /root/marker_inc1.txt")
ssh_client_vm.execute("touch /root/marker_inc1.txt; sync")
Backup.create(self.apiclient, self.vm.id, "rfi_inc1")
time.sleep(3)

ssh_client_vm.execute("touch /root/marker_inc2.txt")
ssh_client_vm.execute("touch /root/marker_inc2.txt; sync")
Backup.create(self.apiclient, self.vm.id, "rfi_inc2")
time.sleep(3)

Expand Down Expand Up @@ -484,13 +484,13 @@ def test_delete_middle_incremental_repairs_chain(self):
self._set_full_every(5)
try:
ssh_client_vm = self.vm.get_ssh_client(reconnect=True)
ssh_client_vm.execute("touch /root/dmi_full.txt")
ssh_client_vm.execute("touch /root/dmi_full.txt; sync")
Backup.create(self.apiclient, self.vm.id, "dmi_full")
time.sleep(3)
ssh_client_vm.execute("touch /root/dmi_inc1.txt")
ssh_client_vm.execute("touch /root/dmi_inc1.txt; sync")
Backup.create(self.apiclient, self.vm.id, "dmi_inc1")
time.sleep(3)
ssh_client_vm.execute("touch /root/dmi_inc2.txt")
ssh_client_vm.execute("touch /root/dmi_inc2.txt; sync")
Backup.create(self.apiclient, self.vm.id, "dmi_inc2")
time.sleep(3)

Expand Down
6 changes: 3 additions & 3 deletions test/integration/smoke/test_backup_recovery_veeam.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from marvin.lib.utils import wait_until
from marvin.lib.base import (Account, ServiceOffering, DiskOffering, Volume, VirtualMachine,
BackupOffering, Configurations, Backup, BackupSchedule)
from marvin.lib.common import (get_domain, get_zone, get_template)
from marvin.lib.common import (get_domain, get_zone, get_suitable_test_template)
from nose.plugins.attrib import attr
from marvin.codes import FAILED

Expand All @@ -39,9 +39,9 @@ def setUpClass(cls):
cls.services["mode"] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.domain = get_domain(cls.apiclient)
cls.template = get_template(cls.apiclient, cls.zone.id, cls.services["ostype"])
cls.template = get_suitable_test_template(cls.apiclient, cls.zone.id, cls.services["ostype"])
if cls.template == FAILED:
assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
assert False, "get_suitable_test_template() failed to return template with description %s" % cls.services["ostype"]
cls.services["small"]["zoneid"] = cls.zone.id
cls.services["small"]["template"] = cls.template.id
cls._cleanup = []
Expand Down
8 changes: 4 additions & 4 deletions test/integration/smoke/test_console_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from marvin.lib.base import *
from marvin.lib.common import (get_domain,
get_zone,
get_template)
get_suitable_test_template)
from nose.plugins.attrib import attr

class TestConsoleEndpoint(cloudstackTestCase):
Expand All @@ -36,14 +36,14 @@ def setUpClass(cls):
cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
cls.hypervisor = cls.testClient.getHypervisorInfo()

cls.template = get_template(
cls.template = get_suitable_test_template(
cls.apiclient,
cls.zone.id,
cls.hypervisor
hypervisor=cls.hypervisor
)

if cls.template == FAILED:
assert False, "get_template() failed to return template"
assert False, "get_suitable_test_template() failed to return template"

cls.services["virtual_machine"]["zoneid"] = cls.zone.id

Expand Down
4 changes: 2 additions & 2 deletions test/integration/smoke/test_deploy_vm_extra_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Host)
from marvin.lib.common import (get_domain,
get_zone,
get_template,
get_suitable_test_template,
list_hosts)
from marvin.lib.utils import *
from nose.plugins.attrib import attr
Expand Down Expand Up @@ -155,7 +155,7 @@ def deploy_vm(self, hypervisor, extra_config=None):
if extra_config is not None:
cmd.extraconfig = extra_config

template = get_template(
template = get_suitable_test_template(
self.apiclient,
self.zone.id,
hypervisor=hypervisor
Expand Down
4 changes: 2 additions & 2 deletions test/integration/smoke/test_gateway_on_shared_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
)
from marvin.lib.common import (get_domain,
get_zone,
get_template,
get_suitable_test_template,
find_storage_pool_type,
get_builtin_template_info)
from marvin.codes import (
Expand Down Expand Up @@ -69,7 +69,7 @@ def setUpClass(cls):
cls.services["template"]["hypervisor"] = builtin_info[1]
cls.services["template"]["format"] = builtin_info[2]

cls.template = get_template(
cls.template = get_suitable_test_template(
cls.apiclient,
cls.zone.id
)
Expand Down
6 changes: 3 additions & 3 deletions test/integration/smoke/test_host_control_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.lib.common import (get_domain,
get_zone,
get_template,
get_suitable_test_template,
list_hosts,
list_routers,
list_ssvms,
Expand Down Expand Up @@ -55,10 +55,10 @@ def setUpClass(cls):
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__

cls.template = get_template(
cls.template = get_suitable_test_template(
cls.apiclient,
cls.zone.id,
cls.hypervisor
hypervisor=cls.hypervisor
)

cls.services["virtual_machine"]["zoneid"] = cls.zone.id
Expand Down
Loading
Loading