How configure crontab in ESXi to schedule a job every 5 min

How configure crontab in ESXi to schedule a job every 5 min

For scheduling a command or script every 5 min in ESXi we need to edit following file

/var/spool/cron/crontabs/root

vi /var/spool/cron/crontabs/root

#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5  *    *   *   *   /sbin/hostd-probe ++group=host/vim/vmvisor/hostd-probe
00   1    *   *   *   localcli storage core device purge
*/2 * * * * /usr/lib/vmware/vsan/bin/vsanObserver.sh

Read more

VMware ESXi Datastores refresh issue incorrect free space

VMware ESXi Datastores refresh issue incorrect free space

We do manual datastore scan or HBA  scan to show the correct free space .

We can change the refresh interval manually to edit config.xml file in esxi host.

To change the refresh interval, edit the configuration file and change the refreshInterval value to the desired interval.

To change the refreshInterval value:

  1. Using a text editor, open the /etc/vmware/hostd/config.xml file on the host.
  2. Locate the <datastore> element. This element in the default file is similar to:<datastore>
    <!-- default datastore inventory-->
    <!-- <inventory>/etc/vmware/hostd/datastores.xml</inventory> -->
    <!-- default datastore refresh interval in minutes -->
    <!-- use 0 to disable the auto refresh -->
    <!-- <refreshInterval>0</refreshInterval> -->
    <!-- default datastore list refetch interval, after getting a VMFS event, in seconds-->
    <!-- <refetchVMFSDatastoreListInterval>30</refetchVMFSDatastoreListInterval> -->
    </datastore>
  3. Remove the comment indicators and replace the 0 (zero) in the <refreshInterval> element with the desired number of minutes. For example, to set the refresh interval to one hour, change this line:<!-- <refreshInterval>0</refreshInterval> -->

    to:

    <refreshInterval>60</refreshInterval>

  4. Save and close the file.
  5. Restart the hostd service for the changes to take effect.
  6. /etc/init.d/hostd restart

Read more

How to change VCenter Server 5.5 Appliance IP address CLI

How to change VCenter Server 5.5 Appliance IP address CLI

  • Open a console session of the VCSA 
  • Login as: root
  • Default password is: vmware

Execute the following command 

/opt/vmware/share/vami/vami_config_net

Now you will get the option to change the network setting.

vcenter

Now you can access your server with url  https://server_ip_address:5480

Read more

How to get ESXi HBA information PowerCLI

How to get ESXi HBA information PowerCLI

If you want to gather information about you VMware ESXi Storage Connection information about HBA.

Below are the script which I tested and its works for me Its generate Cluster Name , ESXi Host name ,HBA card No, WWPN.

hbainfo

 

 

 

Below are the script. copy in notepad and save as hbainfo.ps1

Read more

How to get list of Virtual Machines with RDM PowerCLI

How to get list of Virtual Machines with RDM PowerCLI

Today we had a requirement to know all virtual machines with RDM LUN mapped .So we can plan the carefully move that machine to another ESXi hots .I found a PowerCLI script that gave me good information about Virtual machines mapped with RDM LUNs. Source link

I got the below result .It show all VM and there connected RDM with LUN ID and HDD Details.

LUNID

 

 

Read more

How to add driver in VMware ESX ISO

How to add driver in VMware ESX ISO .

While installing or upgrading VMware Vsphere servers some time we have to add the drivers in the ISO .which is not available in the  ISO .

In example I have to add Nexus 1000v VEM module in the ESXi 5.5 update 3 ISO . Which required to upgrade my ESXi 5.0 and support current running my Nexus 1000v VSM.

1- we have to get VMware Vsphere 5.5 update 3 bundle as ZIP from VMware website .

download link

 

 

 

 

2-  Now create a folder and copy in it . in My Example I am copying in C:\Patch

Read more

VMware vSphere Update Manager logs

VMware vSphere Update Manager logs

Login to vCenter server

Click Start > All Programs > VMware > Generate Update Manager log bundle.

A command prompt appears, displaying the progress of logs being collected.  When the process is complete, the command prompt closes and you see a log bundle on the desktop of the server. The log file for VMware vCenter Update Manager shows as vum-support-xxxxx.zip , where xxxxx represents the user who ran the report, as well as the date and time the report was run.

Read more

EMC networker nsrvadp_save: Unable to find the VM with VM name

EMC networker nsrvadp_save: Unable to find the VM with VM name

Application information attribute VADP_VM_NAME for client “<xyz>” is set to “<xyz.gkhan.in>”.
Trying to connect to the VM using VM name ‘< xyz.gkhan.in >’.
80398:nsrvadp_save: Unable to find the VM with VM name: < xyz.gkhan.in>.
Temporary directory ‘c:\mnt\<xyz>’ for VADP deleted.

To Solve this issue you have to:

Read more