Thursday, January 28, 2010

Changing Service Console IP Address in ESX 3.5

This is very useful want.

Changing Service Console IP Address in ESX 3.5

In case you will need to change the physical network card association (change to the network card that used by Service Console), here's the command:

esxcfg-vswitch -U vmnic# vSwitch#
e.g. esxcfg-vswitch -U vmnic0 vSwitch0
--> Unlink the existing network card

esxcfg-vswitch -L vmnic# vSwitch#
e.g. esxcfg-vswitch -U vmnic1 vSwitch0
--> Link the correct network card

How you can confirm you link the correct network card to the Service Console?

-> Until you can browse to http://esxhostname (subsitute esxhostname with your ESX host name)

Actually this is not that difficult, but remember you will require console access to the server. Be sure to put the machine in Maintenance Mode then Disconnect it from Virtual Center. Then connect to the console of the ESX host;

  1. First we need to remove the old IP, the easiest way is to delete the vswif interface
    • esxcfg-vswif -d vswif0
      • replace vswif0 with the interface you’d like to remove
  2. Then we need to create a new vswif interface with our new IP address
    • esxcfg-vswif -a vswif0 -p Service\ Console -i 10.1.1.1 -n 255.255.255.0 -b 10.1.1.255
      • replace vswif0 with the interface you’d like to use
      • replace Service\ Console with the name of your Service Console portgroup (this is the default)
      • -i reflects your new IP
      • -n reflects your subnet
      • -b reflects your broadcast
  3. Now we need to update our default gateway
    • This is a simple change to the /etc/sysconfig/network file
  4. One last thing you’ll want to do after changing your gateway is reset the vswif interface, this will ensure it is connected as well as generate the new default gateway.
    • esxcfg-vswif -s vswif0 (this will disable the vswif0 interface)
    • esxcfg-vswif -e vswif0 (this will enable the vswif0 interface)

That’s it…. Now do NOT forget to update DNS and your HOSTS files, then I would suggest doing a ipconfig /flushdns on your VirtualCenter server before you attempt to re-connect the Host in VirtualCenter.

http://vmwaretips.com/wp/2008/09/12/changing-service-console-ip-address-in-esx-35/

HA Agent on ESX-HOST in cluster CLUSTER-NAME has an error

If you came across this error message when configuring HA:
"HA Agent on ESX-HOST in cluster CLUSTER-NAME has an error"

First thing you will need to check is your name resolution, which is your DNS.

Try to PING each other from the ESX. If you able to do so, the next thing you probably need to check is the /etc/hosts and /etc/resolv.conf files

Especially when you have change the service console ip, the ip in /etc/hosts file most probably still point to the old ip, also the host name is case sensitive.


VMWare - HA

HA prerequisites:

  • All hosts in an HA cluster must have access to the same shared storage locations used byall virtual machines on the cluster. This includes any fibre channel, iSCSI, and NFS datastores used by virtual machines.
  • All hosts in an HA cluster should have an identical virtual networking configuration. If
    a new switch is added to one host, the same new switch should be added to all hosts in
    the cluster.
  • All hosts in an HA cluster must resolve the other hosts using DNS names.

VMWare - Edit .vmx file

You can edit your .vmx file if your .vmdk folder path changed. Here where your .vmx file on ESX.


VMWare VMotion

Each of the ESX Server hosts that are involved in VMotion must meet the following
requirements:

  • Shared VMFS storage for the virtual machines files
  • A gigabit network card with a VMkernel port defined and enabled for VMotion on each host

HP c7000 Blade System

Our company just bought a HP c7000 Blade System recently, no doubts I have fun configuring it this few weeks.


Front view 1

Front view 2

Rear view 1

Rear view 2

Rear view 3

Switches

ESX CLI:

  • esxcfg-vswitch -a vSwitch1 -> This create a new vSwitch1
  • esxcfg-vswitch -L vmnic1 vSwitch1 -> This will link my second physical network interface (vmnic1) to vSwitch1
  • esxfg-vswitch -U vmnic1 vSwitch1 -> This will unlink NIC to vSwitch
  • esxcfg-vswitch -A "Service Console" vSwitch0 -> This will create a new port group named Service Console.
  • esxfg-vswitch -A "VMtion" vSwitch1 -> This will create a new port group named VMotion and associate it to vSwicth1.
  • esxcfg-vswif -a vswif0 -p "Service Console" -a 192.168.1.2 -n 255.255.255.0 -b 192.168.1.255 -> This will create new L3 interface which is linked to SC port group with an static IP. ESX server will generate new L2 mac address and assign this to the vswif2 interface.
  • esxcfg-vmknic -a -i 10.10.0.5 -n 255.255.255.0 VMotion -> This will assign an IP and subnet mask to the VMotion port group.
Below is the steps to
-- Create a new vSwitch named vSwitch1
-- Associate a physical NIC, in this case vmnic1 to the vSwitch1
-- Create a new Port Group under vSwitch1
-- Create a new NIC under vSwitch1 and assign it an IP and subnet



Changing the DNS server settings
To change the DNS server settings, update the nameserver IPs and search domain the /etc/resolv.conf file.

VMWare - Resize VMFS block size

You are experiencing these issues:

Creating a virtual disk larger than a certain size fails with these errors:
  • In the ESX host command line:

    Failed to create virtual disk: There is not enough space on the file system for the selected operation.
  • In the Virtual Infrastructure (VI) Client for ESX 3.0 with VirtualCenter 2.0:
  • In the VI Client for ESX 3.5 with Virtual Center 2.5 and in vSphere 4.0 with vCenter:

VMFS Size Limitations

There is no way to change the block size of a VMFS datastore once it is created. The data store must be reformatted with the required block size.
Block Size
Largest virtual disk on VMFS-2
Largest virtual disk on VMFS-3
1MB
456GB
256GB
2MB
912GB
512GB
4MB
1.78TB
1TB
8MB
3.56TB
2TB
16MB
7.18TB
Invalid block size
32MB
14.25TB
Invalid block size
64MB
28.50TB
Invalid block size
With a block size of 1MB, every file that is created uses at least 1MB of space on the storage, regardless of its actual size. With an 8MB block size, a 1KB file still occupies 8MB of space. The unused space in that block is wasted. The larger block size is only required when a file is so large that it requires an extended addressing space. Being aware of the intended use helps with your planning and efficient use of space on the data store.
To create a resized datastore:

Note: All data on a VMFS volume is lost when the data store is recreated. Backup all data before proceeding.
  • In the VI Client / vSphere connected to VirtualCenter / vCenter:

    1. Remove the datastore from one of the ESX hosts.
    2. Rescan for VMFS volumes from the other hosts that can see the datastore.
    3. Create the new datastore on one of the hosts.
    4. Rescan for VMFS volumes from all other hosts that can see the datastore.

  • From the ESX console:

    1. Use vmkfstools to create a new volume over the existing one.
    2. Rescan from all other ESX hosts with the command vmkfstools -V . For syntax on creating the VMFS volume, please consult the appropriate document listed below.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003565