You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to synchronize with Netbox v3.7.8, it aborts with the error: "The specified disk size (130) must match the aggregate size of assigned virtual disks (100).". On this Netbox version, it is not necessary to set Resources > Disk size on the VM properties. Disk size is managed via the attachment of virtual disks.
From XO logs:
xo:netbox DEBUG PATCH /virtualization/virtual-machines/ [ { disk: 130, id: 181 } ]
The VM (181) where the error occurs, has two disks in XO (100GB + 30GB), while it has only one disk (100GB) setup in Netbox. So, when the Sync plugin tries to set Total disk size to 130GB, Netbox checks the sum of the virtual disks and as they don't match, it throws an error.
Error message
netbox.synchronize
{
"pools": [
"ee8b0aa4-a0af-8720-4fc7-4d7950e90b85"
]
}
{
"originalUrl": "https://netbox/api/virtualization/virtual-machines/",
"url": "https://netbox/api/virtualization/virtual-machines/",
"method": "PATCH",
"requestBody": [
{
"platform": 26,
"tags": [
{
"id": 17
},
{
"id": 18
}
],
"id": 199
},
{
"platform": 10,
"id": 141
},
"and 56 others"
],
"netboxError": {
"disk": [
"The specified disk size (130) must match the aggregate size of assigned virtual disks (100)."
]
},
"message": "400 Bad Request",
"name": "Error",
"stack": "Error: 400 Bad Request
at Object.assertSuccess (/opt/xen-orchestra/node_modules/http-request-plus/index.js:162:19)
at httpRequestPlus (/opt/xen-orchestra/node_modules/http-request-plus/index.js:217:22)
at httpRequest (/opt/xen-orchestra/packages/xo-server-netbox/src/index.js:149:26)
at Netbox.#request (/opt/xen-orchestra/packages/xo-server-netbox/src/index.js:178:30)
at Netbox.#synchronize (/opt/xen-orchestra/packages/xo-server-netbox/src/index.js:643:21)
at Api.#callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:366:20)"
}
To reproduce
Go to 'Pools > Advanced'
Click on 'Synchronize with Netbox'
See error
Expected behavior
Not setting the total disk size in VM properties, would allow the sync.
For now, I've commented that check on Netbox code (netbox/virtualization/models/virtualmachines.py) which also allows the sync to complete.
Screenshots
No response
Node
18.20.2
Hypervisor
XCP-ng 8.2.0
Additional context
Netbox v3.7.8
The text was updated successfully, but these errors were encountered:
Ok, that makes sense then. From Netbox's point of view, either you set a disk size on the VM or you attach disks to the VM and the total size is computed automatically. But both can't work together if the sizes don't match. We might synchronize disks in the future but for now, you either need to let the plugin synchronize the size without adding disks, or you need to make sure you add the disks manually in Netbox when you create one in XO.
OK, I see what you mean, it makes sense. I don't know if it's possible, but it would be great to have information on which VM the synchronization was aborted. I had to enable XO debug to figure out the VM id and then figure out what was failing. Thanks.
Are you using XOA or XO from the sources?
XO from the sources
Which release channel?
stable
Provide your commit number
771b0
Describe the bug
When I try to synchronize with Netbox v3.7.8, it aborts with the error: "The specified disk size (130) must match the aggregate size of assigned virtual disks (100).". On this Netbox version, it is not necessary to set Resources > Disk size on the VM properties. Disk size is managed via the attachment of virtual disks.
From XO logs:
xo:netbox DEBUG PATCH /virtualization/virtual-machines/ [ { disk: 130, id: 181 } ]
The VM (181) where the error occurs, has two disks in XO (100GB + 30GB), while it has only one disk (100GB) setup in Netbox. So, when the Sync plugin tries to set Total disk size to 130GB, Netbox checks the sum of the virtual disks and as they don't match, it throws an error.
Error message
To reproduce
Expected behavior
Not setting the total disk size in VM properties, would allow the sync.
For now, I've commented that check on Netbox code (netbox/virtualization/models/virtualmachines.py) which also allows the sync to complete.
Screenshots
No response
Node
18.20.2
Hypervisor
XCP-ng 8.2.0
Additional context
Netbox v3.7.8
The text was updated successfully, but these errors were encountered: