Virtual machine memory conversion wrong #11666

Closed
opened 2025-12-29 21:48:17 +01:00 by adam · 2 comments
Owner

Originally created by @4ydan on GitHub (Sep 30, 2025).

NetBox Edition

NetBox Community

NetBox Version

4.4.1

Python Version

3.11

Steps to Reproduce

  • Create a new vm
  • Enter 8192 as memory
  • Inspect vm details and see 8.19GB

Expected Behavior

  • Create a new vm
  • Enter 8192 as memory
  • Inspect vm details and see 8GB

I would expect it to work the same as the disk field.

Observed Behavior

8.19GB instead of 8GB

Originally created by @4ydan on GitHub (Sep 30, 2025). ### NetBox Edition NetBox Community ### NetBox Version 4.4.1 ### Python Version 3.11 ### Steps to Reproduce - Create a new vm - Enter 8192 as memory - Inspect vm details and see 8.19GB ### Expected Behavior - Create a new vm - Enter 8192 as memory - Inspect vm details and see 8GB I would expect it to work the same as the disk field. ### Observed Behavior 8.19GB instead of 8GB
adam added the type: bug label 2025-12-29 21:48:17 +01:00
adam closed this issue 2025-12-29 21:48:17 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 30, 2025):

@4ydan this works fine for me. Note there are two separate configuration params for disk and memory, DISK_BASE_UNIT and RAM_BASE_UNIT. RAM_BASE_UNIT is used for this, I suspect you might have these configured differently in your configuration.py file?

Note in the two screenshots I only changed the RAM_BASE_UNITS from 1000 to 1024

Image Image
@arthanson commented on GitHub (Sep 30, 2025): @4ydan this works fine for me. Note there are two separate configuration params for disk and memory, `DISK_BASE_UNIT` and `RAM_BASE_UNIT`. RAM_BASE_UNIT is used for this, I suspect you might have these configured differently in your configuration.py file? Note in the two screenshots I only changed the RAM_BASE_UNITS from 1000 to 1024 <img width="1507" height="1028" alt="Image" src="https://github.com/user-attachments/assets/4a73f378-77b6-49f2-b0cb-930729334d65" /> <img width="1548" height="1067" alt="Image" src="https://github.com/user-attachments/assets/4c0a5518-2011-4a80-8f6c-edc8ba51355a" />
Author
Owner

@4ydan commented on GitHub (Sep 30, 2025):

Thank you for the fast reply. I see, was not aware of that config.

@4ydan commented on GitHub (Sep 30, 2025): Thank you for the fast reply. I see, was not aware of that config.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11666