Archive for category vmware

Link Aggregation VMWARE ESXi

Networking – 802.1q Trunking and 802.3ad Link Aggregation using Cisco Switches Print E-mail
Resources ESX and ESXi Server
Ok so your server probably has more than one physical NIC, by default most have two built in.
You may have been wondering what is the best network configuration for ESX/ESXi Servers.
How many physical NICs to use, which vSwitch to assigned them to and what vSwitch to use for certain traffic.
If you have more than one physical switch that supports link aggregation 802.3ad then you may want to take advantage of that too.

The number of network cards you have and what your requirements are may differ but I belive the 4 NIC setup is the best for performance, reliability and functionality. You can have more if you like but 4 will certainly suffice.

Why would you want to go to the trouble of setting this up and annoying the network team…

1. To present trunk ports to all ESX network interfaces. This is to segregate traffic to different VLANs for improved security (802.1q). Meaning you will be able to put virtual machines onto different VLANs (Maybe you have dev, test and production VLANs).
2. To load balance across NICs and physical switches using the IP hash (802.3ad). This will improve bandwidth usage and increase reliability.

Setup the network configuration as follows on each ESX/ESXi Server:

Virtual Switch Layout:
Virtual Switch              Used For

vSwitch0                    Virtual Machines
vSwitch1                    Service Console and VMotion
vSwitch2                    Internal

Virtual Switch to Physical NIC to Physical Switch Mapping:
Physical Network Interface        Used by Virtual Switch        Connected to Physical Switch        Type

vmknic0                                            vSwitch0                                 Switch2                                Trunk
vmknic1                                            vSwitch1                                 Switch2                                Trunk
vmknic2                                            vSwitch0                                 Switch1                                Trunk
vmknic3                                            vSwitch1                                 Switch1                                Trunk

Virtual Networks:
Used For                    Port Group Type                VLAN ID

Server Network         Virtual Machines                 11
VMotion                       Vmkernel                             12
Service Console       Service Console                 12


Failover and Load Balancing Settings for vSwitchX:

Load Balancing:                        IP Hash
Network Failure Detection:      Link Status Only
Notify Switches:                         Yes
Failback:                                     Yes
Active Adaptors:                         vmnicX, vmnicX
Standby Adaptors:                     None
Unused Adaptors:                     None

NOTE: You cannot use VLAN 1 in virtual switches with trunking because the traffic is not tagged.

Switch Channel-Group Configuration for 802.3ad link aggregation
Create a port channel for each server.

interface Port-channel2
description ESX Server 1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk
end

Switch Port Configuration for 802.1q trunking
Make the port a trunk port and assign to that servers channel group.

interface GigabitEthernet2/10
description ESX Server 1
switchport trunk encapsulation dot1q
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk
channel-group 2 mode on
end

No Comments

backup ESXi perl script

http://communities.vmware.com/thread/164134?tstart=0

No Comments

Enable SSH ESXi

ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported).

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command *vi /etc/inetd.conf*).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you’re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Restart host or try kill -HUP `ps | grep inetd`

No Comments