a
This commit is contained in:
parent
fb940b60d7
commit
7b614da847
1 changed files with 3 additions and 3 deletions
|
@ -107,7 +107,7 @@ def need_running_vm(func):
|
||||||
|
|
||||||
|
|
||||||
def create(vm_entry: VMEntry):
|
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:
|
if WITHOUT_CEPH:
|
||||||
_command_to_create = [
|
_command_to_create = [
|
||||||
|
@ -120,7 +120,7 @@ def create(vm_entry: VMEntry):
|
||||||
"qemu-img",
|
"qemu-img",
|
||||||
"resize",
|
"resize",
|
||||||
os.path.join("/var/vm", vm_entry.uuid),
|
os.path.join("/var/vm", vm_entry.uuid),
|
||||||
vm_entry.specs["hdd"],
|
"{}M".format(vm_hdd),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
_command_to_create = [
|
_command_to_create = [
|
||||||
|
@ -135,7 +135,7 @@ def create(vm_entry: VMEntry):
|
||||||
"resize",
|
"resize",
|
||||||
"uservms/{}".format(vm_entry.uuid),
|
"uservms/{}".format(vm_entry.uuid),
|
||||||
"--size",
|
"--size",
|
||||||
"{}G".format(vm_hdd),
|
vm_hdd,
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue