Skip to content

Commit

Permalink
Use MiB instead of MB for qvm-ls and qvm-prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Jan 2, 2025
1 parent a8e0bea commit 3b9da29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions doc/manpages/qvm-prefs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mac
For template-based HVM ``auto`` mode means to clone template MAC.

maxmem
Accepted values: memory size in MB
Accepted values: memory size in MiB

Maximum memory size available for this VM. Dynamic memory management (aka
qmemman) will not be able to balloon over this limit. For VMs with
Expand All @@ -168,7 +168,7 @@ maxmem
TemplateBasedVM uses its template's value as a default.

memory
Accepted values: memory size in MB
Accepted values: memory size in MiB

Initial memory size for VM. This should be large enough to allow VM startup
- before qmemman starts managing memory for this VM. For VM with qmemman
Expand Down Expand Up @@ -205,7 +205,7 @@ qrexec_timeout
TemplateBasedVM uses its template's value as a default.

stubdom_mem
Accepted values: memory in MB
Accepted values: memory in MiB

Amount of memory to allocate to stubdomain. By default let Xen choose
sensible value. This property is mostly for debugging early stubdomain
Expand Down
4 changes: 2 additions & 2 deletions qubesadmin/tools/qvm_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ def format(self, vm):


def calc_size(vm, volume_name):
''' Calculates the volume size in MB '''
''' Calculates the volume size in MiB '''
try:
return vm.volumes[volume_name].size // 1024 // 1024
except KeyError:
return 0

def calc_usage(vm, volume_name):
''' Calculates the volume usage in MB '''
''' Calculates the volume usage in MiB '''
try:
return vm.volumes[volume_name].usage // 1024 // 1024
except KeyError:
Expand Down

0 comments on commit 3b9da29

Please sign in to comment.