Friday, April 30, 2010

How Is The Front Bumper Put On A 645

Despiste 10: Cambiar la IP de la Service Console

recently asked me to change an ESX 3.5 host our production VLAN to another VLAN. This change implies a change of IP addresses portgroups Service Console and the vmkernel. Initially, this task could be viewed as a simple task, to log into the ESX host and change the IP physically, but this change is more hidden implications that could lead to serious problems such as losing the HA or VMotion capabilities in the affected host.

Change Service Console IP is quite simple and the procedure looks like (based on the information based on this great post ):

    List the port
  1. actuales groups of service console: esxcfg-vswitch
  2. -l This command will return it Configuración current vSwitch, something like:
    Switch Name
    a
    Ports Used Ports
    Configured Ports MTU
    Uplinks
    vSwitch0
    64 13 64
    1500
    vmnic0, vmnic2

    PortGroup Name
    VLAN ID
    Used Ports
    Uplinks
    VM Network
    0
    8
    vmnic0,vmnic2
    Service Console
    0
    1
    vmnic0,vmnic2
    Switch Name
    Num Ports
    Used Ports
    Configured Ports
    MTU
    Uplinks
    vSwitch0
    64
    13
    64
    1500
    vmnic1,vmnic3

    VLAN ID Used Ports
    PortGroup Name
    uplinks
    VMkernel
    0
    1
    vmnic1, vmnic3
    so you can find the name of port group in your Service Console, in our example the one in bold. We seek
  3. interfazvirtual port associated with that group, you have to have a name like vswif where n is the number of the interface virtual, and will be returned by the command esxcfg-vswif -l, plus all the IP settings associated with each virtual interface:
  4. Name
    Port Group IP Address
    Netmask Broadcast Enabled
    DHCP
    vswif0
    Service Console
    xxx.xxx.xxx.xxx
    nnn.nnn.nnn.nnn
    bbb.bbb.bbb.bbb
    true false
  5. Once we have located the virtual interface associated with our Service Console, the only way to change the IP settings is to delete the virtual interface and create a new interface virtual target range. The steps to perform the procedure are:


    1. Clear virtual interface: esxcfg-vswif -d vswif0
    2. Create a new virtual interface associates with our port of the service group called console Service console: esxcfg-vswif
      -a-p "Service Console" -i  <new IP Address>  -n  <netmask>  vswif0
  6. También deberíamos modificar la puerta de enlace por defecto asociada con la interfaz virtual modificando  /etc/sysconfig/network-scripts/ifcfg-vswif0  y añadiendo GATEWAY=ggg.ggg.ggg.ggg  en el fichero.
  7. Este paso es bastante importante si quieres ahorrarte un montón de dolores de cabeza. Modifica la entrada correspondiente en el fichero  /etc/hosts
  8. At this point you have two options, reboot the ESX host and enable or disable vswif l interface. If you choose to disable and enable the interface vswif should do the following:


    • To disable the interface vswif: esxcfg-vswif -s vswif0
    • To enable vswif interface: esxcfg-vswif -e vswif0

    Once you have completed all these steps, just look for the ESX affected in VirtualCenter, Disconnect them and reconnect. This process will uninstall the agent vpxa isntalado the ESX host and reinstalled during the reconnection process .

    If after this you still tienendo connection problems / VMotion / HA checks the ESX host entry in the VirtualCenter database. Duncan Epping has a great post on Yellow-Bricks that record should be checked and changed http://www.yellow-bricks.com/2008/09/29/storage-vmotion-fails-after-service-console -ip-change /

    is time to change the IP address of the VMkernel. This change can be conducted via vClient, or can be made directly from the Service Console. Changing the IP address of the VMkernel through vClient is quite easy, so I will focus on how to make this change manually.

    As we saw with the method for changing the IP of the Service Console, this procedure depends on vmknic hit delete and create a new one.

  1. Again, the recommended first step is to list all available vmknics your ESX host. This can be done using the command esxcfg-vmknic -l will produce output similar to this:
  2. Interface
    Port Group
    IP Address
    Netmask
    Broadcast
    MAC Address
    MTU
    TSO MSS
    Enabled
    vmk0
    VMkernel
    xxx.xxx.xxx.xxx
    nnn.nnn.nnn.nnn
    bbb.bbb.bbb.bbb
    00:50:56:aa:bb:cc
    1500 40960
    true
  3. Then let's clear the affected vmknic (which is bold in our example). We also need the associated port group: esxcfg-
  4. vmknic-d-p VMkernel vmk0
  5. Finally, we construct the desired configuration vmknic and associate with the correct port group. Remember that this procedure will generate a new MAC address:
  6. esxcfg-vmknic VMkernel-a-p-i-n mmm.mmm.mmm.mmm vmk0 yyy.yyy.yyy.yyy
    Note that these proceedings are valid only for Standard vSwitch, and the need for a slight modification to suit the Distributed vSwitch available on ESX 4. But that's another story.
    I have based this post on my personal experience and information gathered from:
I hope this post can help someone.

0 comments:

Post a Comment