diff options
Diffstat (limited to 'deploy')
28 files changed, 171 insertions, 54 deletions
diff --git a/deploy/cloud/deploy.py b/deploy/cloud/deploy.py index 679b0ad6f..e00934bd9 100644 --- a/deploy/cloud/deploy.py +++ b/deploy/cloud/deploy.py @@ -22,6 +22,7 @@ from common import ( check_file_exists, commafy, ArgParser, + log, ) YAML_CONF_DIR = '/var/lib/opnfv' @@ -29,9 +30,12 @@ YAML_CONF_DIR = '/var/lib/opnfv' class Deploy(object): - def __init__(self, dea_file, no_health_check): + def __init__(self, dea_file, no_health_check, deploy_timeout, + no_deploy_environment): self.dea = DeploymentEnvironmentAdapter(dea_file) self.no_health_check = no_health_check + self.deploy_timeout = deploy_timeout + self.no_deploy_environment = no_deploy_environment self.macs_per_blade = {} self.blades = self.dea.get_node_ids() self.blade_node_dict = self.dea.get_blade_node_map() @@ -42,8 +46,8 @@ class Deploy(object): def assign_roles_to_cluster_node_ids(self): self.node_roles_dict = {} for blade, node in self.blade_node_dict.iteritems(): - if self.dea.get_node_role(blade): - roles = commafy(self.dea.get_node_role(blade)) + if self.dea.get_node_roles(blade): + roles = commafy(self.dea.get_node_roles(blade)) self.node_roles_dict[node] = (roles, blade) def configure_environment(self): @@ -59,8 +63,12 @@ class Deploy(object): def deploy_cloud(self): dep = Deployment(self.dea, YAML_CONF_DIR, self.env_id, - self.node_roles_dict, self.no_health_check) - dep.deploy() + self.node_roles_dict, self.no_health_check, + self.deploy_timeout) + if not self.no_deploy_environment: + dep.deploy() + else: + log('Configuration is done. Deployment is not launched.') def deploy(self): @@ -76,13 +84,22 @@ def parse_arguments(): parser.add_argument('-nh', dest='no_health_check', action='store_true', default=False, help='Don\'t run health check after deployment') + parser.add_argument('-dt', dest='deploy_timeout', action='store', + default=240, help='Deployment timeout (in minutes) ' + '[default: 240]') + parser.add_argument('-nde', dest='no_deploy_environment', + action='store_true', default=False, + help=('Do not launch environment deployment')) parser.add_argument('dea_file', action='store', help='Deployment Environment Adapter: dea.yaml') + args = parser.parse_args() check_file_exists(args.dea_file) kwargs = {'dea_file': args.dea_file, - 'no_health_check': args.no_health_check} + 'no_health_check': args.no_health_check, + 'deploy_timeout': args.deploy_timeout, + 'no_deploy_environment': args.no_deploy_environment} return kwargs diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py index 42bab09bb..306abf006 100644 --- a/deploy/cloud/deployment.py +++ b/deploy/cloud/deployment.py @@ -31,12 +31,13 @@ LIST_OF_CHAR_TO_BE_ESCAPED = ['[', ']', '"'] class Deployment(object): def __init__(self, dea, yaml_config_dir, env_id, node_id_roles_dict, - no_health_check): + no_health_check, deploy_timeout): self.dea = dea self.yaml_config_dir = yaml_config_dir self.env_id = env_id self.node_id_roles_dict = node_id_roles_dict self.no_health_check = no_health_check + self.deploy_timeout = deploy_timeout self.pattern = re.compile( '\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d') @@ -96,7 +97,6 @@ class Deployment(object): print(log_msg + '\n') def run_deploy(self): - WAIT_LOOP = 240 SLEEP_TIME = 60 LOG_FILE = 'cloud.log' @@ -105,7 +105,7 @@ class Deployment(object): % (self.env_id, LOG_FILE)) ready = False - for i in range(WAIT_LOOP): + for i in range(int(self.deploy_timeout)): env = parse(exec_cmd('fuel env --env %s' % self.env_id)) log('Environment status: %s' % env[0][E['status']]) r, _ = exec_cmd('tail -2 %s | head -1' % LOG_FILE, False) diff --git a/deploy/common.py b/deploy/common.py index cc418b59b..787a21a1d 100644 --- a/deploy/common.py +++ b/deploy/common.py @@ -133,8 +133,8 @@ def commafy(comma_separated_list): def check_if_root(): - r = exec_cmd('whoami') - if r != 'root': + uid = os.getuid() + if uid != 0: err('You need be root to run this application') diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml index e70d8ca82..851509871 100644 --- a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml +++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml @@ -36,3 +36,8 @@ disks: fuel: 100G controller: 100G compute: 100G + +number_cpus: + # Entry is not mandatory! If it is left empty + # the default is 2 cpus per node + controller: 2 diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml new file mode 100644 index 000000000..adca822fc --- /dev/null +++ b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml @@ -0,0 +1,22 @@ +plugin-config-metadata: + title: BGPVPN fuel Plugin configuration template + version: 0.3 + created: 08-Mar-16 + comment: None + +bgpvpn: + metadata: + class: plugin + default: false + enabled: true + label: BGPVPN plugin + toggleable: true + versions: + - metadata: + always_editable: false + label: BGPVPN plugin + plugin_version: 0.8.0 + restrictions: + - cluster:net_provider != 'neutron': Only neutron is supported by BGPVPN-plugin + weight: 90 + weight: 70 diff --git a/deploy/dea.py b/deploy/dea.py index b5b63f7cc..1ac048e06 100644 --- a/deploy/dea.py +++ b/deploy/dea.py @@ -65,9 +65,15 @@ class DeploymentEnvironmentAdapter(object): if node['id'] == node_id and property_name in node: return node[property_name] - def get_node_role(self, node_id): + def get_node_roles(self, node_id): return self.get_node_property(node_id, 'role') + def get_node_main_role(self, node_id, fuel_node_id): + if node_id == fuel_node_id: + return 'fuel' + roles = self.get_node_roles(node_id) + return 'controller' if 'controller' in roles else 'compute' + def get_node_ids(self): node_ids = [] for node in self.dea_struct['nodes']: diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py index a0a44c1ed..5351c1461 100644 --- a/deploy/deploy-config.py +++ b/deploy/deploy-config.py @@ -90,14 +90,51 @@ def sha_uri(uri): sha1.update(data) return sha1.hexdigest() +def merge_fuel_plugin_version_list(list1, list2): + final_list = [] + # When the plugin version in not there in list1 it will + # not be copied + for e_l1 in list1: + plugin_version = e_l1.get('metadata', + {'plugin_version', None}).get('plugin_version') + plugin_version_found = False + for e_l2 in list2: + if plugin_version == e_l2.get('metadata', + {'plugin_version', + None}).get('plugin_version'): + final_list.append(dict(mergedicts(e_l1, e_l2))) + plugin_version_found = True + if not plugin_version_found: + final_list.append(e_l1) + return final_list + +def merge_lists(list1, list2): + if list1 and list2: + if isinstance(list1[0], dict): + if 'plugin_version' in list1[0].get('metadata', {}): + return merge_fuel_plugin_version_list(list1, list2) + else: + raise Exception("Lists with dics inside are not merge able! " + "You have to code the merge them. " + "List1: %s; List2: %s" + % (list1, list2)) + else: + return list2 + elif list1: + return list1 + else: + return list2 + def mergedicts(dict1, dict2): for k in set(dict1.keys()).union(dict2.keys()): if k in dict1 and k in dict2: if isinstance(dict1[k], dict) and isinstance(dict2[k], dict): yield (k, dict(mergedicts(dict1[k], dict2[k]))) + elif isinstance(dict1[k], list) and isinstance(dict2[k], list): + yield (k, merge_lists(dict1[k], dict2[k])) else: - # If one of the values is not a dict, you can't continue - # merging it. + # If one of the values is not a dict nor a list, + # you can't continue merging it. # Value from second dict overrides one in first and we move on. yield (k, dict2[k]) elif k in dict1: @@ -194,7 +231,7 @@ if deploy_scenario_conf["stack-extensions"]: module_comments.append(str(module_conf['plugin-config-metadata']['comment'])) module_conf.pop('plugin-config-metadata') final_dea_conf['settings']['editable'].update(module_conf) - scenario_module_override_conf = module['module-config-override'] + scenario_module_override_conf = module.get('module-config-override') if scenario_module_override_conf: dea_scenario_module_override_conf = {} dea_scenario_module_override_conf['settings'] = {} diff --git a/deploy/deploy.py b/deploy/deploy.py index bf0b39d42..f86f2be12 100755 --- a/deploy/deploy.py +++ b/deploy/deploy.py @@ -61,7 +61,7 @@ class AutoDeploy(object): def __init__(self, no_fuel, fuel_only, no_health_check, cleanup_only, cleanup, storage_dir, pxe_bridge, iso_file, dea_file, dha_file, fuel_plugins_dir, fuel_plugins_conf_dir, - no_plugins): + no_plugins, deploy_timeout, no_deploy_environment): self.no_fuel = no_fuel self.fuel_only = fuel_only self.no_health_check = no_health_check @@ -75,6 +75,8 @@ class AutoDeploy(object): self.fuel_plugins_dir = fuel_plugins_dir self.fuel_plugins_conf_dir = fuel_plugins_conf_dir self.no_plugins = no_plugins + self.deploy_timeout = deploy_timeout + self.no_deploy_environment = no_deploy_environment self.dea = (DeploymentEnvironmentAdapter(dea_file) if not cleanup_only else None) self.dha = DeploymentHardwareAdapter(dha_file) @@ -197,7 +199,8 @@ class AutoDeploy(object): dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'], self.fuel_username, self.fuel_password, self.dea_file, self.fuel_plugins_conf_dir, - WORK_DIR, self.no_health_check) + WORK_DIR, self.no_health_check, self.deploy_timeout, + self.no_deploy_environment) return dep.deploy() def setup_execution_environment(self): @@ -223,7 +226,8 @@ class AutoDeploy(object): self.install_fuel_master() if not self.fuel_only: return self.deploy_env() - return True + # Exit status + return 0 def run(self): check_if_root() @@ -234,7 +238,9 @@ class AutoDeploy(object): if self.cleanup: self.cleanup_execution_environment() return deploy_success - return True + # Exit status + return 0 + def check_bridge(pxe_bridge, dha_path): with io.open(dha_path) as yaml_file: @@ -313,6 +319,12 @@ def parse_arguments(): help='Fuel Plugins Configuration directory') parser.add_argument('-np', dest='no_plugins', action='store_true', default=False, help='Do not install Fuel Plugins') + parser.add_argument('-dt', dest='deploy_timeout', action='store', + default=240, help='Deployment timeout (in minutes) ' + '[default: 240]') + parser.add_argument('-nde', dest='no_deploy_environment', + action='store_true', default=False, + help=('Do not launch environment deployment')) args = parser.parse_args() log(args) @@ -338,7 +350,9 @@ def parse_arguments(): 'dha_file': args.dha_file, 'fuel_plugins_dir': args.fuel_plugins_dir, 'fuel_plugins_conf_dir': args.fuel_plugins_conf_dir, - 'no_plugins': args.no_plugins} + 'no_plugins': args.no_plugins, + 'deploy_timeout': args.deploy_timeout, + 'no_deploy_environment': args.no_deploy_environment} return kwargs diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py index 735ea66a3..aa861e102 100644 --- a/deploy/deploy_env.py +++ b/deploy/deploy_env.py @@ -34,7 +34,8 @@ BLADE_RESTART_TIMES = 3 class CloudDeploy(object): def __init__(self, dea, dha, fuel_ip, fuel_username, fuel_password, - dea_file, fuel_plugins_conf_dir, work_dir, no_health_check): + dea_file, fuel_plugins_conf_dir, work_dir, no_health_check, + deploy_timeout, no_deploy_environment): self.dea = dea self.dha = dha self.fuel_ip = fuel_ip @@ -48,6 +49,8 @@ class CloudDeploy(object): self.fuel_plugins_conf_dir = fuel_plugins_conf_dir self.work_dir = work_dir self.no_health_check = no_health_check + self.deploy_timeout = deploy_timeout + self.no_deploy_environment = no_deploy_environment self.file_dir = os.path.dirname(os.path.realpath(__file__)) self.ssh = SSHClient(self.fuel_ip, self.fuel_username, self.fuel_password) @@ -103,8 +106,13 @@ class CloudDeploy(object): deploy_app = '%s/%s' % (self.work_dir, deploy_app) dea_file = '%s/%s' % (self.work_dir, os.path.basename(self.dea_file)) with self.ssh as s: - status = s.run('python %s %s %s' % ( - deploy_app, ('-nh' if self.no_health_check else ''), dea_file)) + status = s.run('python %s %s %s %s %s' % ( + deploy_app, + ('-nh' if self.no_health_check else ''), + ('-dt %s' % + self.deploy_timeout if self.deploy_timeout else ''), + ('-nde' if self.no_deploy_environment else ''), + dea_file)) return status def check_supported_release(self): diff --git a/deploy/dha_adapters/hardware_adapter.py b/deploy/dha_adapters/hardware_adapter.py index 2cd5ab842..55bb4002e 100644 --- a/deploy/dha_adapters/hardware_adapter.py +++ b/deploy/dha_adapters/hardware_adapter.py @@ -58,3 +58,8 @@ class HardwareAdapter(object): def get_disks(self): return self.dha_struct['disks'] + + def get_number_cpus(self, role): + role_cpus_dict = self.dha_struct.get('number_cpus') + if role_cpus_dict: + return role_cpus_dict.get(role) diff --git a/deploy/dha_adapters/libvirt_adapter.py b/deploy/dha_adapters/libvirt_adapter.py index c65dab554..85913ac9e 100644 --- a/deploy/dha_adapters/libvirt_adapter.py +++ b/deploy/dha_adapters/libvirt_adapter.py @@ -95,9 +95,12 @@ class LibvirtAdapter(HardwareAdapter): sources = disk.xpath('source') for source in sources: disk_file = source.get('file') - disk_size = exec_cmd('ls -l %s' % disk_file).split()[4] + disk_size = exec_cmd('qemu-img info ' + '%s |grep \"virtual size:\"' + % disk_file).split()[2] delete(disk_file) - exec_cmd('fallocate -l %s %s' % (disk_size, disk_file)) + exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_file, + disk_size)) def node_eject_iso(self, node_id): vm_name = self.get_node_property(node_id, 'libvirtName') diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py index 38e5bcdf7..c2e7a0b23 100644 --- a/deploy/environments/execution_environment.py +++ b/deploy/environments/execution_environment.py @@ -50,7 +50,7 @@ class ExecutionEnvironment(object): for file in disk_files: delete(file) - def define_vm(self, vm_name, temp_vm_file, disk_path): + def define_vm(self, vm_name, temp_vm_file, disk_path, number_cpus): log('Creating VM %s with disks %s' % (vm_name, disk_path)) with open(temp_vm_file) as f: vm_xml = etree.parse(f) @@ -60,10 +60,14 @@ class ExecutionEnvironment(object): uuids = vm_xml.xpath('/domain/uuid') for uuid in uuids: uuid.getparent().remove(uuid) + if number_cpus: + vcpus = vm_xml.xpath('/domain/vcpu') + for vcpu in vcpus: + vcpu.text = str(number_cpus) disks = vm_xml.xpath('/domain/devices/disk') for disk in disks: if (disk.get('type') == 'file' and - disk.get('device') == 'disk'): + disk.get('device') == 'disk'): sources = disk.xpath('source') for source in sources: disk.remove(source) diff --git a/deploy/environments/libvirt_environment.py b/deploy/environments/libvirt_environment.py index c8a2ef529..380262c7e 100644 --- a/deploy/environments/libvirt_environment.py +++ b/deploy/environments/libvirt_environment.py @@ -34,13 +34,9 @@ class LibvirtEnvironment(ExecutionEnvironment): self.net_names = self.collect_net_names() def create_storage(self, node_id, disk_path, disk_sizes): - if node_id == self.fuel_node_id: - disk_size = disk_sizes['fuel'] - else: - roles = self.dea.get_node_role(node_id) - role = 'controller' if 'controller' in roles else 'compute' - disk_size = disk_sizes[role] - exec_cmd('fallocate -l %s %s' % (disk_size, disk_path)) + role = self.dea.get_node_main_role(node_id, self.fuel_node_id) + disk_size = disk_sizes[role] + exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size)) def create_vms(self): temp_dir = tempfile.mkdtemp() @@ -53,9 +49,11 @@ class LibvirtEnvironment(ExecutionEnvironment): check_file_exists(vm_template) disk_path = '%s/%s.raw' % (self.storage_dir, vm_name) self.create_storage(node_id, disk_path, disk_sizes) + number_cpus = self.dha.get_number_cpus( + self.dea.get_node_main_role(node_id, self.fuel_node_id)) temp_vm_file = '%s/%s' % (temp_dir, vm_name) exec_cmd('cp %s %s' % (vm_template, temp_vm_file)) - self.define_vm(vm_name, temp_vm_file, disk_path) + self.define_vm(vm_name, temp_vm_file, disk_path, number_cpus) delete(temp_dir) def start_vms(self): diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py index 89a82c078..62082185f 100644 --- a/deploy/environments/virtual_fuel.py +++ b/deploy/environments/virtual_fuel.py @@ -55,11 +55,12 @@ class VirtualFuel(ExecutionEnvironment): disk_path = '%s/%s.raw' % (self.storage_dir, vm_name) disk_sizes = self.dha.get_disks() disk_size = disk_sizes['fuel'] - exec_cmd('fallocate -l %s %s' % (disk_size, disk_path)) + number_cpus = self.dha.get_number_cpus('fuel') + exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size)) temp_vm_file = '%s/%s' % (temp_dir, vm_name) exec_cmd('cp %s %s' % (vm_template, temp_vm_file)) self.set_vm_nic(temp_vm_file) - self.define_vm(vm_name, temp_vm_file, disk_path) + self.define_vm(vm_name, temp_vm_file, disk_path, number_cpus) delete(temp_dir) def setup_environment(self): diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml index 063b23d98..6fb37432a 100644 --- a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml +++ b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml @@ -48,7 +48,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml index d30a95dcf..cf62fbce2 100644 --- a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml +++ b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml @@ -48,7 +48,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml index a693c96f9..31e84798b 100644 --- a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml +++ b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml @@ -56,7 +56,7 @@ <readonly/> </disk> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcwo2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml index 7d06f2d60..b55b16e5f 100644 --- a/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml +++ b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml @@ -35,7 +35,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='block' device='cdrom'> diff --git a/deploy/templates/hardware_environment/vms/fuel.xml b/deploy/templates/hardware_environment/vms/fuel.xml index e3e3f80bb..72c15b577 100644 --- a/deploy/templates/hardware_environment/vms/fuel.xml +++ b/deploy/templates/hardware_environment/vms/fuel.xml @@ -35,7 +35,7 @@ <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='block' device='cdrom'> diff --git a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml index 063b23d98..6fb37432a 100644 --- a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml +++ b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml @@ -48,7 +48,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml index d30a95dcf..cf62fbce2 100644 --- a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml +++ b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml @@ -48,7 +48,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml index a693c96f9..67cccbb1e 100644 --- a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml +++ b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml @@ -56,7 +56,7 @@ <readonly/> </disk> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/virtual_environment/vms/compute.xml b/deploy/templates/virtual_environment/vms/compute.xml index fa4ef5d8d..f794b651a 100644 --- a/deploy/templates/virtual_environment/vms/compute.xml +++ b/deploy/templates/virtual_environment/vms/compute.xml @@ -21,7 +21,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/virtual_environment/vms/controller.xml b/deploy/templates/virtual_environment/vms/controller.xml index 50950db17..44dd5b655 100644 --- a/deploy/templates/virtual_environment/vms/controller.xml +++ b/deploy/templates/virtual_environment/vms/controller.xml @@ -21,7 +21,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/virtual_environment/vms/fuel.xml b/deploy/templates/virtual_environment/vms/fuel.xml index 4e7c7fd2a..bf8f3e288 100644 --- a/deploy/templates/virtual_environment/vms/fuel.xml +++ b/deploy/templates/virtual_environment/vms/fuel.xml @@ -29,7 +29,7 @@ <readonly/> </disk> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> @@ -61,6 +61,4 @@ <memballoon model='virtio'> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'/> </domain> - diff --git a/deploy/templates/virtual_environment_noha/vms/compute.xml b/deploy/templates/virtual_environment_noha/vms/compute.xml index fa4ef5d8d..f794b651a 100644 --- a/deploy/templates/virtual_environment_noha/vms/compute.xml +++ b/deploy/templates/virtual_environment_noha/vms/compute.xml @@ -21,7 +21,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/virtual_environment_noha/vms/controller.xml b/deploy/templates/virtual_environment_noha/vms/controller.xml index 50950db17..44dd5b655 100644 --- a/deploy/templates/virtual_environment_noha/vms/controller.xml +++ b/deploy/templates/virtual_environment_noha/vms/controller.xml @@ -21,7 +21,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <source file='disk.raw'/> <target dev='vda' bus='virtio'/> </disk> diff --git a/deploy/templates/virtual_environment_noha/vms/fuel.xml b/deploy/templates/virtual_environment_noha/vms/fuel.xml index 4e7c7fd2a..3e7576945 100644 --- a/deploy/templates/virtual_environment_noha/vms/fuel.xml +++ b/deploy/templates/virtual_environment_noha/vms/fuel.xml @@ -24,7 +24,7 @@ <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='cdrom'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='qcow2'/> <target dev='hdc' bus='ide'/> <readonly/> </disk> @@ -61,6 +61,5 @@ <memballoon model='virtio'> </memballoon> </devices> - <seclabel type='dynamic' model='apparmor' relabel='yes'/> </domain> |