{% extends 'base/layout.html' %} {% load helpers %} {% block title %}Import VMs from vCenter{% endblock %} {% block content %}
Import VMs from {{ server }}
{% if existing_count > 0 %}
{{ existing_count }} VM(s) already exist in NetBox. Check "Update existing VMs" below to sync their specs.
{% endif %} {% if new_count > 0 %}

The following {{ new_count }} VM(s) will be imported to NetBox:

{% for vm in vms %} {% endfor %}
VM Name Power vCPUs Memory Disk Status
{{ vm.name }} {% if vm.exists_in_netbox %} Exists {% endif %} {% if vm.power_state == 'on' %} ON {% else %} OFF {% endif %} {{ vm.vcpus|default:'-' }} {{ vm.memory_mb|default:'-' }} MB {{ vm.disk_gb|default:'-' }} GB {% if vm.exists_in_netbox %} Skip {% else %} Import {% endif %}
{% csrf_token %} {{ form.selected_vms }} {{ form.vcenter_server }}
{{ form.cluster }} Select the NetBox cluster to assign these VMs to.
{% if existing_count > 0 %}
{{ form.update_existing }}
{{ form.update_existing.help_text }}
{% endif %}
Cancel
{% else %}
All {{ existing_count }} selected VM(s) already exist in NetBox.
{% csrf_token %} {{ form.selected_vms }} {{ form.vcenter_server }}
{{ form.cluster }} Select the NetBox cluster (used for any new VMs).
{{ form.update_existing }}
{{ form.update_existing.help_text }}

Cancel
{% endif %}
Import Notes
  • New VMs are created in the selected cluster.
  • Update existing syncs:
    • vCPUs, Memory, Disk
    • Power state → Status
    • Primary IP address
  • Name matching uses configured mode (hostname, exact, or regex).
  • IP addresses create interfaces as needed.
{% endblock %}