Creare (IP alias / secondary administration network) on VMware ESXi

source:
http://www.tumfatig.net/20120301/create-an-ip-alias-secondary-administration-network-on-vmware-esxi/
 

For some reasons, I need to create a secondary administration network on my ESXi servers. As I don’t need the routing stuff, I thought I’d create IP aliases as I would do with any UNIX server. But on the ESXi, it is just no possible, AFAIK.

The solution is to create another VMkernel port, used for management, on the ESXi. As I don’t want to use any extra hardware, I’ll create the portgroup in the existing vSwitch. Here’s how.

# esxcfg-vswitch -l

01

Let’s create the new VMkernel port group in the current vSwitch:

02

Then, just assign the VMkernel IP to the new portgroup:

03

The ESXi can now be managed either via vmk0 and/or vmk1.

Using the vSphere Client, here’s what we see:

Beware that “(…) Only 1 VMkernel port is allowed per subnet on a vSwitch in ESX/ESXi.”
One has tested setting DHCP on the secondary interface and it just wrapped the ESXi. In such case, either restore default IP settings from the console or use the following command, from console shell:

# esxcfg-vmknic -d -p “VPN Network”

###############################
ROUTE STATICA
##############################

#esxcfg-route -a 192.168.90.0 (spazio) 255.255.255.0(spazio) 192.168.1.1

Per le versioni 5.1 e 5.5 della esxi va modificato cosi:

esxcli network ip route ipv4 add –gateway 192.168.0.1 –network 192.168.100.0/24

Fonte:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2001426