how to use telnet command in vCenter appliance putty session
Telnet is the command which we can easily use to check the service status of the remote system.
Ex if we can telnet to vCenter server from our desktop using port 443, we can say that web services of the vCenter is up
But when we use vCenter shell or ESXi shell, we cannot use telnet command.
As an alternative option, we can use curl command. Please refer the below screen capture
curl -v telent://vcsa-01a:443
Change the VM snapshot location
Sometimes we may need to take snapshot of the vm but we don’t have enough space in our datastore.In that case we can change the snapshot directory by editing vmx file.
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
- With the below example we can see that per-worker-01a vm is runnin on esx-01a.
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.
In the above shell.log file we can see that someone has tried to power off this vm.
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
vRops-how to reclaim resources
Powrcli script to get VM name and Guest os name
Powrcli script to get VM name and Guest os name
connect-viserver vcsa-01a.corp.local
$allvm=get-vm
foreach ($vm in $allvm)
{
get-vm $vm|select name,@{name=”Guest os name”‘;e={$vm.exntensionData.Guest.HostName}}
}
vSphere 6.7 Quick boot
vSphere 6.7 quick boot is new feature which is integrated with update manager. When we performing patching activities with earlier versions of vSphere most of the time we need to reboot the ESX hosts. This is very painful because normayy it will take more than 5 minutes to reboot hardware server. Also sometimes we may need to login using ILO\BMC\IDRAC and check the boot status.
With the version 6.7 we can configure quick boot of ESX hosts.This feature will allow us to reboot only the hypervisor without rebooting ESX’s hardware.
Requirements of this feature-
This feature will not work with all the hardware servers.we can follow below link to get the compatible hardware models.
How to check the compatibility of your server-
We can run
/usr/lib/vmware/loadesx/bin/loadESXCheckCompat.py
And check the compatibility of our server with quick boot.
How to configure this feature
1.login to your vCenter web client
Go to the update manager
Select Manage
Select Settings
Click on Edit
Enable quick boot
Now we are going to remediate one of my esx host.
From the target host we can see qucik boot is enable on this
I used VMware hol HOL-1904-01-SDC-HOL to test this feature
Reference links
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
}
How to renew SSL certificate on Horizon view connection server
Issue certificate from Active Directory Certificate Template
(open mmc and add certificate template)
Create a duplicate template of web server Continue reading “How to renew SSL certificate on Horizon view connection server”