Commit cbf15087 by Dudás Ádám

vm: convert memory size unit from MiB to KiB for vmdriver

fixes #22
parent 8aa156e5
...@@ -489,8 +489,8 @@ class Instance(BaseResourceConfigModel, TimeStampedModel): ...@@ -489,8 +489,8 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
return { return {
'name': self.vm_name, 'name': self.vm_name,
'vcpu': self.num_cores, 'vcpu': self.num_cores,
'memory': self.ram_size, 'memory': self.ram_size * 1024, # convert from MiB to KiB
'memory_max': self.max_ram_size, 'memory_max': self.max_ram_size * 1024, # convert from MiB to KiB
'cpu_share': self.priority, 'cpu_share': self.priority,
'arch': self.arch, 'arch': self.arch,
'boot_menu': self.boot_menu, 'boot_menu': self.boot_menu,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment