From 7b614da847d18211a8e4bdb85705dc99fa6f70b0 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Tue, 17 Sep 2019 13:07:17 +0500 Subject: [PATCH] a --- virtualmachine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtualmachine.py b/virtualmachine.py index a898adb..15fd06f 100755 --- a/virtualmachine.py +++ b/virtualmachine.py @@ -107,7 +107,7 @@ def need_running_vm(func): def create(vm_entry: VMEntry): - vm_hdd = int(bitmath.Byte(int(vm_entry.specs["hdd"])).to_GB()) + vm_hdd = int(bitmath.Byte(int(vm_entry.specs["hdd"])).to_MB()) if WITHOUT_CEPH: _command_to_create = [ @@ -120,7 +120,7 @@ def create(vm_entry: VMEntry): "qemu-img", "resize", os.path.join("/var/vm", vm_entry.uuid), - vm_entry.specs["hdd"], + "{}M".format(vm_hdd), ] else: _command_to_create = [ @@ -135,7 +135,7 @@ def create(vm_entry: VMEntry): "resize", "uservms/{}".format(vm_entry.uuid), "--size", - "{}G".format(vm_hdd), + vm_hdd, ] try: