Feature Request: Sync VMware VM Host to NetBox "Host Device" field
Problem
When synchronizing VMware virtual machines to NetBox, netbox-sync creates and updates both ESXi hosts (Devices) and Virtual Machines. However, the relationship between a VM and its current ESXi host is not populated in NetBox.
As a result, the Host Device field of Virtual Machines remains empty, even though this information is available from vCenter (vm.runtime.host).
Proposed Enhancement
Add support for populating the NetBox Virtual Machine Host Device field during VMware synchronization.
Suggested behavior:
- Determine the ESXi host running the VM from vCenter (
vm.runtime.host).
- Match the corresponding ESXi host Device already created by
netbox-sync.
- Set the VM's
host_device attribute in NetBox.
- Update the relationship on subsequent sync runs if a VM is migrated to another ESXi host (vMotion).
Benefits
- Improved visibility of VM placement in NetBox.
- Easier troubleshooting and capacity management.
- Accurate representation of the current VMware environment.
- Automatic tracking of vMotion operations.
- Better integration with NetBox virtualization features.
Additional Notes
This could be implemented either:
- always enabled by default, or
- through an optional configuration parameter (for example
sync_vm_host_device = true).
Since netbox-sync already synchronizes both ESXi hosts and VMs, all required information appears to be available from the VMware source and should not require additional vCenter permissions.
Thank you for considering this enhancement.
Feature Request: Sync VMware VM Host to NetBox "Host Device" field
Problem
When synchronizing VMware virtual machines to NetBox,
netbox-synccreates and updates both ESXi hosts (Devices) and Virtual Machines. However, the relationship between a VM and its current ESXi host is not populated in NetBox.As a result, the Host Device field of Virtual Machines remains empty, even though this information is available from vCenter (
vm.runtime.host).Proposed Enhancement
Add support for populating the NetBox Virtual Machine Host Device field during VMware synchronization.
Suggested behavior:
vm.runtime.host).netbox-sync.host_deviceattribute in NetBox.Benefits
Additional Notes
This could be implemented either:
sync_vm_host_device = true).Since
netbox-syncalready synchronizes both ESXi hosts and VMs, all required information appears to be available from the VMware source and should not require additional vCenter permissions.Thank you for considering this enhancement.