- Information About Virtual Machine Tracker
- Enabling Virtual Machine Tracker
- Creating a New Connection to vCenter
- Synchronizing Information with VMware vCenter
- Verifying the Virtual Machine Tracker Configuration
- Enabling Virtual Machine Tracker on Specific Interfaces
- Configuring Dynamic VLAN Creation
- Example Configuration for Virtual Machine Tracker
Configuring Virtual Machine Tracker
This chapter contains the following sections:
- Information About Virtual Machine Tracker
- Enabling Virtual Machine Tracker
- Creating a New Connection to vCenter
- Synchronizing Information with VMware vCenter
- Verifying the Virtual Machine Tracker Configuration
- Enabling Virtual Machine Tracker on Specific Interfaces
- Configuring Dynamic VLAN Creation
- Example Configuration for Virtual Machine Tracker
Information About Virtual Machine Tracker
Guidelines and Limitations for VM Tracker
VM Tracker has the following guidelines and limitations:
- VM Tracker supports up to four vCenter connections.
- VM Tracker supports high availability and the fault tolerance features of vCenter.
- VM Tracker supports up to 64 VMs per host.
- VM Tracker supports up to 350 hosts across all vCenters.
- VM Tracker supports up to 600 VLANs.
- VM Tracker supports only 507 VLANs in Per VLAN Rapid Spanning Tree (PVRST) mode due to hardware limitations. To enable more than 507 VLANs, use Multiple Spanning Tree (MST).
- The current version of VM Tracker is supported only on ESXi 5.1 and ESXi 5.5 on Windows and Linux.
- The current version of VM Tracker supports only VMware orchestration. It does not support orchestration with other hypervisors.
- The current version of VM Tracker relies on Cisco Discovery Protocol (CDP) information. It does not support Link Layer Discovery Protocol (LLDP).
- For all ports on which VM Tracker is enabled, you must not perform any Layer 2 or Layer 3 configuration that is related to switchports and VLANs. However, you can update the native VLAN.
- VM Tracker does not support VLAN 4095.
- VM Tracker is not supported on the virtual port channel (vPC) switch although it can be configured on the downstream switch on the vPC setup.
- You must connect the host directly to the Cisco Nexus 3000 Series ports. Host connectivity through the IOM, fabric extender (FEX), or chassis is not supported.
- If you do not specify the virtual routing and forwarding (VRF) while configuring the remote IP address, the management VRF is used.
- If you do not configure a VLAN as a native VLAN on the interface, VM Tracker cannot remove this VLAN and disable VM Tracker.
- For vCenter version 5.1 and 5.5, the CDP information can contain a maximum of 32 characters for the name of the switch. If the name of the switch exceeds 32 characters, VM Tracker will not work.
Enabling Virtual Machine Tracker
By default, the VM Tracker feature is enabled on all interfaces.
| Command or Action | Purpose |
|---|
This example shows how to enable VM Tracker:
switch# configure terminal switch(config)# feature vmtracker switch(config)#
Creating a New Connection to vCenter
This example shows how to create a new connection to VMware vCenter:
switch# configure terminal switch(config)# vmtracker connection conn1 switch(config-vmt-conn)# remote ip address 20.1.1.1 port 80 vrf management switch(config-vmt-conn)# username user1 password abc1234 switch(config-vmt-conn)# connect
Synchronizing Information with VMware vCenter
By default, VM Tracker tracks all asynchronous events from VMware vCenter and updates the switchport configuration immediately. Optionally, you can also configure a synchronizing mechanism that synchronizes all host, VM, and port group information automatically with VMware vCenter at a specified interval.
|
Command |
Purpose |
|---|---|
| [no] set interval find-new-host val |
Sets the interval, in seconds, for finding hosts that are newly connected to vCenter. The no form of the command disables the previously configured interval. The default duration is 3600 seconds. |
| [no] set interval sync-full-info val |
Sets the interval, in seconds, for synchronizing all host, VM, and port group related information with vCenter. The no form of the command disables the previously configured interval. The default duration is 3600 seconds. |
| vmtracker connection connection-name refresh |
Synchronizes all host, VM, and port group related information with vCenter immediately for the specified connection. |
This example shows how to set an interval for finding hosts that are newly connected to vCenter:
switch(config-vmt-conn)# set interval find-new-host 300
This example shows how to set an interval for synchronizing all host, VM, and port group information with vCenter:
switch(config-vmt-conn)# set interval sync-full-info 120
This example shows how to immediately synchronize all host, VM, and port group information with vCenter:
switch(config-vmt-conn)# vmtracker connection conn1 refresh
Verifying the Virtual Machine Tracker Configuration
Use the following commands to display and verify VM Tracker configuration information:
|
Command |
Purpose |
|---|---|
| show running-config vmtracker [all] |
Displays the VM Tracker configuration. |
| show vmtracker [connection conn_name] {{info [interface intf_id ]{summary | detail | host | vm | port-group}} | event-history} |
|
| show vmtracker [connection conn_name] status |
Displays the IP address and connection status of the vCenter connection specified. |
| show logging level vmtracker |
Displays the logging level of the syslog messages for VM Tracker. |
| show system internal vmtracker info all |
Displays the complete configuration information of VM Tracker. |
Enabling Virtual Machine Tracker on Specific Interfaces
When VM Tracker is enabled by using the [no] feature vmtracker command, it is enabled on all interfaces by default. You can optionally disable and enable it on specific interfaces by using the [no] vmtracker enable command.
This example shows how to enable VM Tracker on a specified interface:
switch# configure terminal switch(config)# interface ethernet 1/3/1 switch(config-if)# vmtracker enable
Configuring Dynamic VLAN Creation
Enabling Dynamic VLAN Creation
Dynamic creation and deletion of VLANs globally is enabled by default. When dynamic VLAN creation is enabled, if a VM is moved from one host to another and the VLAN required for this VM does not exist on the switch, the required VLAN is automatically created on the switch. You can also disable this capability. However, if you disable dynamic VLAN creation, you must manually create all the required VLANs.
Ensure that the VM Tracker feature is enabled.
This example shows how to enable dynamic VLAN creation:
switch# configure terminal switch(config)# vmtracker connection conn1 switch(config-vmt-conn)# autovlan enable
Configuring an Allowed VLAN List
By default, all VLANs can be configured dynamically on interfaces. You can also define a restricted list of such VLANs.
Ensure that the VM Tracker feature is enabled.
This example shows how to configure a list of allowed VLANs:
switch# configure terminal switch(config)# vmtracker connection test switch(config-vmt-conn)# allowed-vlans 100-101
Example Configuration for Virtual Machine Tracker
This example shows how to create a connection with vCenter:
switch# configure terminal switch(config)# feature vmtracker switch(config)# vmtracker connection test switch(config-vmt-conn)# remote ip address 20.1.1.1 port 80 vrf management switch(config-vmt-conn)# username user1 password abc@123 switch(config-vmt-conn)# connect switch(config-vmt-conn)# show vmtracker status Connection Host/IP status ----------------------------------------------------------------------------- test 20.1.1.1 Connected switch(config-vmt-conn)# show vmtracker info detail ------------------------------------------------------------------------------ Interface Host VMNIC VM State PortGroup VLAN-Range ------------------------------------------------------------------------------ Ethernet1/3/1 20.2.2.2 vmnic4 No-OS1 on PGroup100 100 ------------------------------------------------------------------------------ switch(config-vmt-conn)# show running-config vmtracker !Command: show running-config vmtracker !Time: Mon Mar 10 09:07:47 2014 version 6.0(2)U3(1) feature vmtracker vmtracker connection test remote ip address 20.1.1.1 port 80 username user1 password abc@123 connect switch(config-vmt-conn)# show running-config interface ethernet 1/3/1 !Command: show running-config interface Ethernet1/3/1 !Time: Mon Mar 10 09:09:13 2014 version 6.0(2)U3(1) interface Ethernet1/3/1 switchport mode trunk switchport trunk allowed vlan 1,100
![]() Note | VLAN 1 is the native VLAN on interface Ethernet1/3/1. |
This example shows how to verify VM Tracker information after you power off the VM on vCenter:
switch(config-vmt-conn)# show vmtracker info detail ------------------------------------------------------------------------------ Interface Host VMNIC VM State PortGroup VLAN-Range ------------------------------------------------------------------------------ Ethernet1/3/1 20.2.2.2 vmnic4 No-OS1 off PGroup100 100 ------------------------------------------------------------------------------ switch(config-vmt-conn)# show running-config interface ethernet 1/3/1 !Command: show running-config interface Ethernet1/3/1 !Time: Mon Mar 10 09:09:13 2014 version 6.0(2)U3(1) interface Ethernet1/3/1 switchport mode trunk switchport trunk allowed vlan 1, 100
This example shows how to verify VM Tracker information after you add a new VLAN through vCenter:
switch(config-vmt-conn)# show vmtracker info detail ------------------------------------------------------------------------------ Interface Host VMNIC VM State PortGroup VLAN-Range ------------------------------------------------------------------------------ Ethernet1/3/1 20.2.2.2 vmnic4 No-OS1 on PGroup100 100 Ethernet1/3/1 20.2.2.2 vmnic4 No-OS1 on PGroup103 103 ------------------------------------------------------------------------------ switch(config-vmt-conn)# show running-config interface ethernet 1/3/1 !Command: show running-config interface Ethernet1/3/1 !Time: Mon Mar 10 09:11:06 2014 version 6.0(2)U3(1) interface Ethernet1/3/1 switchport mode trunk switchport trunk allowed vlan 1,100,103
This example shows how verify VM Tracker event-history information:
switch(config-vmt-conn)# show vmtracker event-history ------------------------------------------------------------------------------ Event History (Connection:test NumEv:6 IP:20.1.1.1) ------------------------------------------------------------------------------ EventId Event Msg ------------------------------------------------------------------------------ 77870 Reconfigured No-OS1 on 20.2.2.2 in N3K-VM 77867 No-OS1 on 20.2.2.2 in N3K-VM is powered on 77863 Reconfigured No-OS1 on 20.2.2.2 in N3K-VM 77858 No-OS1 on 20.2.2.2 in N3K-VM is powered off
This example shows how to display all internal information about VM Tracker:
switch(config)# show system internal vmtracker info all
VM-Interface Mapping (Device:FOC1727R115)
------------------------------------------------------------------------------
Interface Host VMNIC VM State PortGroup VLAN-Range
------------------------------------------------------------------------------
Ethernet1/3/1 20.2.2.2 vmnic4 No-OS1 on PGroup100 100
------------------------------------------------------------------------------
Host VM Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host VM State PortGroup
------------------------------------------------------------------------------
20.2.2.2 No-OS1 on PGroup100
20.2.2.2 VM-L--2 on VM Network
20.2.2.2 VM-PROD on VM Network
------------------------------------------------------------------------------
Host CDP Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host Switch Port VMNIC Status
------------------------------------------------------------------------------
20.2.2.2 FOC1727R115 Ethernet1/3/1 vmnic4 connected
------------------------------------------------------------------------------
Host vSwitch Port Group Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host vSwitch PortGroup
------------------------------------------------------------------------------
20.2.2.2 vSwitch0 Management Network
20.2.2.2 vSwitch0 VM Network
20.2.2.2 vSwitch1 PGroup100
20.2.2.2 vSwitch1 PGroup101
20.2.2.2 vSwitch1 PGroup102
20.2.2.2 vSwitch1 PGroup103
20.2.2.2 vSwitch1 PGroup11
20.2.2.2 vSwitch1 PGroup200
20.2.2.2 vSwitch1 PGroup201
20.2.2.2 vSwitch1 PGroup202
20.2.2.2 vSwitch1 PGroup22
20.2.2.2 vSwitch1 PGroup301
20.2.2.2 vSwitch1 PGroup302
20.2.2.2 vSwitch1 PGroup33
20.2.2.2 vSwitch1 PGroup44
------------------------------------------------------------------------------
Host vSwitch VMNIC Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host vSwitch VMNIC
------------------------------------------------------------------------------
20.2.2.2 vSwitch0 vmnic5
20.2.2.2 vSwitch1 vmnic4
------------------------------------------------------------------------------
Host DVS Switch Port Group Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host DVS-Name PortGroup Vlan-Range
------------------------------------------------------------------------------
20.2.2.2 dvSwitchNEW dvPortGroup
20.2.2.2 dvSwitchNEW dvPortGroup2 1000-1300
20.2.2.2 dvSwitchNEW dvSwitchNEW-DVUplinks-1329 0-4094
------------------------------------------------------------------------------
Host DVS Switch VMNIC Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host DVS-Name VMNIC
------------------------------------------------------------------------------
20.2.2.2 dvSwitchNEW
------------------------------------------------------------------------------
Host Port Group Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host PortGroup VLAN
------------------------------------------------------------------------------
20.2.2.2 Management Network 0
20.2.2.2 PGroup100 100
20.2.2.2 PGroup101 101
20.2.2.2 PGroup102 1021
20.2.2.2 PGroup103 113
20.2.2.2 PGroup11 11
20.2.2.2 PGroup123456789123456789 1112
20.2.2.2 PGroup200 200
20.2.2.2 PGroup201 201
20.2.2.2 PGroup202 202
20.2.2.2 PGroup22 22
20.2.2.2 PGroup301 3011
20.2.2.2 PGroup302 302
20.2.2.2 PGroup33 33
20.2.2.2 PGroup44 44
20.2.2.2 VM Network 0
------------------------------------------------------------------------------
Distributed Switch Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
DVS Name PortGroup VLAN Range
------------------------------------------------------------------------------
dvSwitch dvPortGroup
dvSwitch dvSwitch-DVUplinks-911 0-4094
dvSwitch2 dvPortGroup
dvSwitch2 dvSwitch2-DVUplinks-1099 0-4094
dvSwitchNEW dvPortGroup
dvSwitchNEW dvPortGroup2 1000-1300
dvSwitchNEW dvSwitchNEW-DVUplinks-132 0-4094
------------------------------------------------------------------------------
Event History (Conn:dc1 NumEv:1 IP:20.1.1.1)
------------------------------------------------------------------------------
EventId Time Event Msg
------------------------------------------------------------------------------
107990 Mar 27 2014 14:56:24:798698 Reconfigured No-OS1 on 20.2.2.2
in N3K-VM
------------------------------------------------------------------------------
Time Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Type Time (ms)
------------------------------------------------------------------------------
Total Fetching Time for All Host : 7122
Total Fetching Time for All DVS : 2500
Max Time to Sync Full Host Info : 0
Max Time to Check unconnected Host Info : 0
Max Time to Sync Host Info : 0
Max Time to get one Host info : 1031
Max Time to get one Virtual Machine info : 1011
Max Time to get one CDP info : 77
Max Time to get VM port group Info : 52
Max Time to get task info : 0
Max Time to process recv event : 56
Max Time to get dvs info : 48
Max Time to get dvs port group info : 52
------------------------------------------------------------------------------
Counters Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Type Counter
------------------------------------------------------------------------------
Property Retrieval Fail : 0
Wait for Update Fail : 0
Wait for Update Timeout : 11
Create Task Collector Fail : 0
Create Event Collector Fail : 0
Create Event Filter Fail : 0
CDP Info Retrieval Fail : 5
Connect to vCenter Fail : 0
SOAP Memory Alloc Fail : 0
Num Datacenter Property Retrieval : 22
Num Connection Verification : 4
Num Host Property Retrieval : 12
Num VM Property Retrieval : 4
Num CDP Info Retrieval : 12
Num Task Info Retrieval : 0
Num DVS Info Retrieval : 3
Num DVS PG Info Retrieval : 7
Num Switch Info Retrieval : 0
Num Interface Configuration Time : 0
Num of VLAN Creation Time : 0
Num of VLAN Removal Time : 0
Wait for Update Success : 3
Num Recv Event VmPoweredOnEvent : 0
Num Recv Event VmPoweredOffEvent : 0
Num Recv Event VmBeingHotMigratedEvent : 0
Num Recv Event VmMigratedEvent : 0
Num Recv Event VmFailedMigrateEvent : 0
Num Recv Event VmReconfiguredEvent : 1
Num Recv Event VmCreatedEvent : 0
Num Recv Event VmClonedEvent : 0
Num Recv Event VmRenamedEvent : 0
Num Recv Event VmRemovedEvent : 0
Num Recv Event VmSuspendedEvent : 0
Num Recv Event VmRelocatedEvent : 0
Num Recv Event TaskEvent : 1
Num Recv Event EventEx : 0
Num Recv Event HostConnectionLostEvent : 0
Num Recv Event HostDisconnectedEvent : 0
Num Recv Event HostConnectedEvent : 0
Num Recv Event HostShutdownEvent : 0
Num Recv Event HostRemovedEvent : 0
Num Recv Event HostIpChangedEvent : 0
Num Recv Event DVPortgroupCreatedEvent : 0
Num Recv Event DVPortgroupReconfiguredEvent : 0
Num Recv Event DVPortgroupDestroyedEvent : 0
Num Recv Event DVPortgroupRenamedEvent : 0
Num Recv Event DvsCreatedEvent : 0
Num Recv Event DvsDestroyedEvent : 0
Num Recv Event DvsRenamedEvent : 0
Num Recv Event DvsReconfiguredEvent : 0
Num Recv Event DvsMergedEvent : 0
Num Recv Task UpdateNetworkConfig : 0
Num Recv Task UpdatePortGroup : 0
Num Recv Task RemovePortGroup : 0
Num Recv Task UpdateVirtualSwitch : 0
------------------------------------------------------------------------------
Global Counters Info
------------------------------------------------------------------------------
Type Counter
------------------------------------------------------------------------------
Num Elem VMTrackerElemRoot : 3
Num Elem VMTrackerElemConn : 1
Num Elem VMTrackerElemHost : 12
Num Elem VMTrackerElemHostCDP : 1
Num Elem VMTrackerElemHostVM : 3
Num Elem VMTrackerElemHostVMPortGroup : 3
Num Elem VMTrackerElemHostvSwitch : 2
Num Elem VMTrackerElemHostvSwitchVMNIC : 2
Num Elem VMTrackerElemHostvSwitchPortGroup : 16
Num Elem VMTrackerElemHostPortGroup : 16
Num Elem VMTrackerElemHostDVSSwitch : 1
Num Elem VMTrackerElemHostDVSSwitchVMNIC : 0
Num Elem VMTrackerElemDVS : 3
Num Elem VMTrackerElemDVSPortGroup : 7
Num Elem VMTrackerElemDVSPortGroupVlanRange : 4
Num Elem VMTrackerElemDeviceID : 1
Num Elem VMTrackerElemDevicePort : 1
Num Elem VMTrackerElemDevicePortHost : 1
Num Elem VMTrackerElemDevicePortVM : 1
Num Elem VMTrackerElemDevicePortVMPortGroup : 1
Num Elem VMTrackerElemDevicePortVMPortGroupVlanRange : 1
Num Elem VMTrackerElemSwitchDeviceID : 2
Num Elem VMTrackerElemSwitchDeviceIntf : 73
Num Elem VMTrackerElemIfRunTimeRoot : 1
Num Elem VMTrackerElemIfDeviceId : 1
Num Elem VMTrackerElemIfSwitchPort : 1
------------------------------------------------------------------------------
Unconnected Host Info (Conn:dc1 IP:20.1.1.1)
------------------------------------------------------------------------------
Host Name
------------------------------------------------------------------------------
20.1.1.2
20.1.1.3
20.1.1.4
20.1.1.5
20.1.1.6
20.1.1.7
20.1.1.8
20.1.1.9
20.1.1.10
20.1.1.11
20.1.1.12
--------------------------------------------------------------------------------
Dev-Id Intf IfIndex Member of PO NativeVlan VMT Enable
--------------------------------------------------------------------------------
FOC1727R115 Ethernet1/1/1 1a000000 1 1
FOC1727R115 Ethernet1/1/2 1a001000 1 1
FOC1727R115 Ethernet1/1/3 1a002000 1 1
FOC1727R115 Ethernet1/1/4 1a003000 1 1
FOC1727R115 Ethernet1/3/1 1a008000 200 1
FOC1727R115 Ethernet1/3/2 1a009000 port-channel300 1 1
FOC1727R115 Ethernet1/3/3 1a00a000 1 1
FOC1727R115 Ethernet1/3/4 1a00b000 1 1
FOC1727R115 Ethernet1/4/1 1a00c000 port-channel20 1 1
FOC1727R115 Ethernet1/4/2 1a00d000 port-channel300 1 1
FOC1727R115 Ethernet1/4/3 1a00e000 1 1
FOC1727R115 Ethernet1/4/4 1a00f000 1 1
--------------------------------------------------------------------------------
This example shows how to disconnect from vCenter:
switch(config)# vmtracker connection test switch(config-vmt-conn)# no connect switch(config-vmt-conn)# show vmtracker status Connection Host/IP status ----------------------------------------------------------------------------- test 20.1.1.1 No Connect switch(config-vmt-conn)# sh running-config interface ethernet 1/3/1 !Command: show running-config interface Ethernet1/3/1 !Time: Mon Mar 10 09:15:43 2014 version 6.0(2)U3(1) interface Ethernet1/3/1 switchport mode trunk switchport trunk allowed vlan 1 switch(config-vmt-conn)# show vmtracker info detail ------------------------------------------------------------------------------ Interface Host VMNIC VM State PortGroup VLAN-Range ------------------------------------------------------------------------------ ------------------------------------------------------------------------------

Feedback