Skip to content

Commit

Permalink
Fix one volume issue
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer authored Sep 6, 2022
1 parent d9a0c4b commit f63b446
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions IM/connectors/OpenNebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f63b446

Please sign in to comment.