From f63b44637aed57b04f233b2a17ba3f77e63e0034 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 6 Sep 2022 10:44:52 +0200 Subject: [PATCH 1/2] Fix one volume issue --- IM/connectors/OpenNebula.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/IM/connectors/OpenNebula.py b/IM/connectors/OpenNebula.py index 83ce0caa6..03af4e8cc 100644 --- a/IM/connectors/OpenNebula.py +++ b/IM/connectors/OpenNebula.py @@ -314,9 +314,6 @@ def setDisksFromTemplate(vm, template): if disk.TARGET and not vm.info.systems[0].getValue("disk." + str(disk.DISK_ID) + ".device"): vm.info.systems[0].setValue( "disk." + str(disk.DISK_ID) + ".device", disk.TARGET) - if disk.FORMAT and not vm.info.systems[0].getValue("disk." + str(disk.DISK_ID) + ".fstype"): - vm.info.systems[0].setValue( - "disk." + str(disk.DISK_ID) + ".fstype", disk.FORMAT) @staticmethod def setIPsFromTemplate(vm, template): @@ -649,11 +646,8 @@ def getONETemplate(self, radl, sgs, auth_data, vm): else: disk_size = system.getFeature( "disk." + str(cont) + ".size").getValue('M') - disk_fstype = system.getValue("disk." + str(cont) + ".fstype") - if not disk_fstype: - disk_fstype = 'ext3' - disks += ' DISK = [ SAVE = no, TYPE = fs , FORMAT = %s, SIZE = %d' % (disk_fstype, int(disk_size)) + disks += ' DISK = [ SAVE = no, TYPE = fs , FORMAT = qcow2, SIZE = %d' % int(disk_size) if disk_device: disks += ', TARGET = %s' % disk_device From a57882df0db9e6e94f757bac3f5b69e8e533c4d0 Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 6 Sep 2022 10:55:30 +0200 Subject: [PATCH 2/2] Fix test --- test/unit/connectors/OpenNebula.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/connectors/OpenNebula.py b/test/unit/connectors/OpenNebula.py index 5aabc7ad0..e6e51b585 100755 --- a/test/unit/connectors/OpenNebula.py +++ b/test/unit/connectors/OpenNebula.py @@ -144,7 +144,7 @@ def test_20_launch(self, save_data, getONEVersion, server_proxy): OS = [ ARCH = "x86_64" ] DISK = [ IMAGE_ID = "1" ] - DISK = [ SAVE = no, TYPE = fs , FORMAT = ext3, SIZE = 1024, TARGET = hdb ] + DISK = [ SAVE = no, TYPE = fs , FORMAT = qcow2, SIZE = 1024, TARGET = hdb ] SCHED_REQUIREMENTS = "CLUSTER_ID=\\"0\\""\n"""