mgdvmware
Contributor
Contributor

esx 3.5 - how to move a client from 1 vmnic to another (on same vswitch#)

I want to put a monitoring server on its own physical port. On my vmware ESX3.5 server, there are two onboard ports, and a 4-port PCI network card. The Service Console is on vSwitch0 on wmnic0. vmnic1 is the second onboard port, but it is not used. vmnics2-5 are the 4-port PCI network ports. vmnic2 is on vSwitch1 and contains all the current vmware clients. I want to move one specific vmware client from vmnic2 to vmnic3. Currently, both of  these are in vSwitch 1 which is in Port Group name "vlan2" and therefore no changes need to be made at the vlan layer. The monitoring server is called vecmon. Here is some output:

[root@Provider root]# esxcfg-vswitch -l
Switch Name    Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0       64          4           64                1500    vmnic0

  PortGroup Name      VLAN ID  Used Ports  Uplinks
  Service Console     0        1           vmnic0

Switch Name    Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch1       64          12          64                1500    vmnic4,vmnic3,vmnic2

  PortGroup Name      VLAN ID  Used Ports  Uplinks
  VLAN2               2        7           vmnic2,vmnic3

[root@Provider root]#

[root@Provider root]# esxcfg-nics -l
Name    PCI      Driver      Link Speed    Duplex MTU    Description
vmnic1  16:03.00 bnx2        Down 0Mbps    Half   1500   Broadcom Corporation NetXtreme II 5706 Gigabit Ethernet
vmnic5  30:00.01 e1000       Down 0Mbps    Half   1500   Intel Corporation Intel PRO/1000 PT Low Profile Quad Port PCIe Gigabit Ethernet Controller
vmnic0  16:02.00 bnx2        Up   100Mbps  Full   1500   Broadcom Corporation NetXtreme II 5706 Gigabit Ethernet
vmnic2  2f:00.00 e1000       Up   100Mbps  Full   1500   Intel Corporation Intel PRO/1000 PT Low Profile Quad Port PCIe Gigabit Ethernet Controller
vmnic3  2f:00.01 e1000       Down 0Mbps    Half   1500   Intel Corporation Intel PRO/1000 PT Low Profile Quad Port PCIe Gigabit Ethernet Controller
vmnic4  30:00.00 e1000       Down 0Mbps    Half   1500   Intel Corporation Intel PRO/1000 PT Low Profile Quad Port PCIe Gigabit Ethernet Controller
[root@Provider root]#

[root@Provider root]# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:13902593 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13902593 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2103158081 (2005.7 Mb)  TX bytes:2103158081 (2005.7 Mb)

vmnic0    Link encap:Ethernet  HWaddr 00:14:5E:5A:90:4C
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20235109 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7516292 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:709701218 (676.8 Mb)  TX bytes:1331305764 (1269.6 Mb)
          Interrupt:169 Memory:e2000000-e2012100

vmnic1    Link encap:Ethernet  HWaddr 00:14:5E:5A:90:4E
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:177 Memory:e4000000-e4012100

vmnic2    Link encap:Ethernet  HWaddr 00:15:17:A9:D0:E9
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:199942777 errors:0 dropped:0 overruns:0 frame:0
          TX packets:208797339 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2341186330 (2232.7 Mb)  TX bytes:3070693458 (2928.4 Mb)

vmnic3    Link encap:Ethernet  HWaddr 00:15:17:A9:D0:E8
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12561 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:797035 (778.3 Kb)

vmnic4    Link encap:Ethernet  HWaddr 00:15:17:A9:D0:EB
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:141 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:18471 (18.0 Kb)

vmnic5    Link encap:Ethernet  HWaddr 00:15:17:A9:D0:EA
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vswif0    Link encap:Ethernet  HWaddr 00:50:56:48:9F:83
          inet addr:172.16.0.20  Bcast:172.16.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14794813 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7182493 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:331746929 (316.3 Mb)  TX bytes:1100556629 (1049.5 Mb)

[root@Provider root]#

So, right now vmnic0 is plugged into a cisco switch port that is in vlan 2, our server vlan. vmnic2 is plugged into a switchport that is in trunking mode, even though it could be just in vlan 2.

So, is it possible to assign the vmclient "vecmon" to vmnic3? I would of course have to plug it into a switch in vlan 2 or in trunk mode.

0 Kudos
1 Reply
mgdvmware
Contributor
Contributor

Well, I didn't quite phrase my question correctly, but what I wanted to do was dedicate a physical port to a particular vm. Here is my solution:

Step 1:

I decided to use vmnic4 for the vecmon vm, but first I had to remove vmnic4 from vSwitch1.

#esxcfg-vswitch -U vmnic4 vSwitch1

Step 2:

I next had to create my new vswitch.

#esxcfg-vswitch -a vSwitch2

Step 3:

I then had to link vmnic4 to vSwitch2

#esxcfg-vswitch -L vmnic4 vSwitch2

Step 4:

This was the missing piece of the puzzle. I needed to create a new port group(which I called Monitor) and add it to vSwitch2.

#esxcfg-vswitch -A Monitor vSwitch2

Step 5:

I wanted this port group to be in vlan ID 2.

# esxcfg-vswitch -p Monitor -v 2 vSwitch2

Step 6:

This is the only step that I did using the GUI. At the site that I manage the vms, our installation is ESX 3.5, but at our mothership, we have a VMware vsphere/vCenter. However, I can connect to either using VIC and make the change. I selected vecmon in my listing of vms and choose the "Edit Settings" link. Once in the property sheet, I chose the "Hardware tab" and then clicked on Network Adapter. On the RHS, I changed the "Network Connection" from VLAN2 which is associated with vSwitch1 to "Monitor" and low and behold my vm moved to vSwitch2.

So, one moves a vm from one switch to another by changing the Network Connection! The only thing that I would like to know is how to do step 6 using the CLI.

0 Kudos