Skip to content

Commit

Permalink
fix(vmware): sync VM memory (fixes #397) (#399)
Browse files Browse the repository at this point in the history
vmMemoryMB already has MB. and should not divide any more by 1000000. After this fix, correct values are shown in netbox.
  • Loading branch information
broerman authored Dec 30, 2024
1 parent f6a7fb8 commit 5d2368e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/source/vmware/vmware_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ func (vc *VmwareSource) syncVM(nbi *inventory.NetboxInventory, vmKey string, vm
Host: vmHost,
Platform: vmPlatform,
VCPUs: float32(vmVCPUs),
Memory: int(vmMemoryMB) / constants.MB, // MBs default unit for ram in netbox
Memory: int(vmMemoryMB),
Disk: int(vmDiskSizeB) / constants.MB, // MBs default unit for disk in netbox
Comments: vmComments,
Role: vmRole,
Expand Down

0 comments on commit 5d2368e

Please sign in to comment.