Configure backup & restore vCenter 6.7

This is a very useful feature when its working with changes.This is the easiest way to restore our vCenter.

As a destination backup media we need to have http,https,ftp or ftps server. Since I had windows server. Just I add web roles with ffp feature sfrom server manager.

Once I completed that process. I have to do the following configuration on windows server.

Open Internet information service manager

clip_image001 Continue reading “Configure backup & restore vCenter 6.7”

ESXI- how to use shell.log

Shell.log is the one of the log file which helps us to resolve problems and in some scenarios it will help us to do the audit process.

Example 1

  1. With the below example we can see that per-worker-01a vm is runnin on esx-01a.

clip_image001

In few hours later we can notified that vm has powered off. We could nt find any logs in vCenter or in the os level.

What we can do is we can check the shell.log file. If someone has powered off the vm using command line on the ESXi , we can find the details.

clip_image002

In the above shell.log file we can see that someone has tried to power off this vm.

Continue reading “ESXI- how to use shell.log”

How to use for loop to identify vmdk locked files

some times we are facing that vmdk locked scenario which we need to identify the locked file using vmkfstools.  But when we having multiple vmdk files, we need to run this command several times. To overcome this issue I have tried to use for loop in esxi shell. This may be help others when they having same problem.

for files in *.vmdk

>do

>vmkfstools -D ${files}

>done

clip_image001

Powershell script to get datastore names with mapped esx hosts & naa ids

Add-PSSnapin VMware.VimAutomation.Core

Connect-VIServer myvcenter1.test.local

$result=@()

$dstores=Get-Datastore

foreach ($dstore in $dstores)

{

$dstorename=$dstore.name

Write-Host $dstorename

$naadetails=($dstore).ExtensionData.Info.Vmfs.extent

$naa=($naadetails).diskname

$esx=get-datastore $dstore.name|get-vmhost

$esxformat=(@($esx) -join ‘,’)

$naaformat=(@($naa) -join ‘,’)

$properties=@{

name=$dstorename

esxname=$esxformat

naaid=$naaformat

}

$result=New-Object psobject -Property $properties

$result|select name,esxname,naaid|export-csv C:\Users\darshana\Desktop\ds.csv -Append -NoTypeInformation

}