{% extends 'base/layout.html' %} {% load helpers %} {% block title %}vCenter vs NetBox Comparison{% endblock %} {% block content %}
Compare vCenter with NetBox
{% if not server %}
Select a vCenter server to compare with NetBox VMs.
{% elif not cached_data %}
No cached data for {{ server }}. Sync first.
{% else %}

{{ in_both_count }}

In Both

{{ only_vcenter_count }}

Only in vCenter

{{ only_netbox_count }}

Only in NetBox

{{ diff_count }}

Spec Differences
{% if comparison.only_in_vcenter %}
{{ only_vcenter_count }} Only in vCenter (Can Import)
{% for vm in comparison.only_in_vcenter %} {% endfor %}
VM Name Power vCPUs Memory Disk Cluster
{{ vm.name }} {% if vm.power_state == 'on' %} ON {% else %} OFF {% endif %} {{ vm.vcpus|default:'-' }} {{ vm.memory_mb|default:'-' }} {{ vm.disk_gb|default:'-' }} {{ vm.cluster|default:'-' }}
{% endif %} {% if diff_count > 0 %}
{{ diff_count }} VMs with Spec Differences
{% csrf_token %}
{% for vm in comparison.in_both %} {% if vm.has_differences %} {% if vm.vcenter.vcpus != vm.netbox.vcpus %} {% endif %} {% if vm.vcenter.memory_mb != vm.netbox.memory_mb %} {% endif %} {% if vm.vcenter.disk_gb != vm.netbox.disk_gb %} {% endif %} {% endif %} {% endfor %}
VM Name Field vCenter NetBox
{{ vm.name }} vCPUs {{ vm.vcenter.vcpus|default:'-' }} {{ vm.netbox.vcpus|default:'-' }}
{{ vm.name }} Memory (MB) {{ vm.vcenter.memory_mb|default:'-' }} {{ vm.netbox.memory_mb|default:'-' }}
{{ vm.name }} Disk (GB) {{ vm.vcenter.disk_gb|default:'-' }} {{ vm.netbox.disk_gb|default:'-' }}
{% endif %} {% if comparison.only_in_netbox %}
{{ only_netbox_count }} Only in NetBox (Not in {{ server }})
{% for vm in comparison.only_in_netbox %} {% endfor %}
VM Name vCPUs Memory NetBox Cluster
{{ vm.name }} {{ vm.vcpus|default:'-' }} {{ vm.memory_mb|default:'-' }} {{ vm.cluster|default:'-' }}

These VMs exist in NetBox but were not found in {{ server }}. They may be on a different vCenter or have been deleted.

{% endif %} {% endif %}
{% endblock %}