virtual-machine table shows disk size in MB, but should display unit GB #10604

Closed
opened 2025-12-29 21:33:36 +01:00 by adam · 1 comment
Owner

Originally created by @broerman on GitHub (Jan 3, 2025).

Deployment Type

Self-hosted

Triage priority

I'm a NetBox Labs customer

NetBox Version

v4.1.10

Python Version

3.10

Steps to Reproduce

  1. Update disk size via API
    curl -X PATCH
    -H "Authorization: Token $TOKEN"
    -H "Content-Type: application/json"
    -d '{"disk": 32}'
    https://netbox/api/virtualization/virtual-machines//

Expected Behavior

virtual-machines table displays disk 32GB

Observed Behavior

virtual-machines table displays disk 32 MB

Originally created by @broerman on GitHub (Jan 3, 2025). ### Deployment Type Self-hosted ### Triage priority I'm a NetBox Labs customer ### NetBox Version v4.1.10 ### Python Version 3.10 ### Steps to Reproduce 1. Update disk size via API curl -X PATCH \ -H "Authorization: Token $TOKEN" \ -H "Content-Type: application/json" \ -d '{"disk": 32}' \ https://netbox/api/virtualization/virtual-machines/<id>/ ### Expected Behavior virtual-machines table displays disk 32GB ### Observed Behavior virtual-machines table displays disk 32 MB
adam closed this issue 2025-12-29 21:33:36 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 6, 2025):

This is working as expected. From the v4.1.0 release notes:

The unit size for VirtualMachine.disk and VirtualDisk.size has been changed from 1 gigabyte to 1 megabyte. Existing values will be adjusted automatically during the upgrade process.

@jeremystretch commented on GitHub (Jan 6, 2025): This is working as expected. From the [v4.1.0 release notes](https://netboxlabs.com/docs/netbox/en/stable/release-notes/version-4.1/#v410-2024-09-03): > The unit size for `VirtualMachine.disk` and `VirtualDisk.size` has been changed from 1 gigabyte to 1 megabyte. Existing values will be adjusted automatically during the upgrade process.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10604