How to increase disk space of vCenter appliance

vCenter appliance is a vm and most of the time we are running it on the same ESXi cluster.

In some cases we may need to increase the disk capacity of some partition(most of the time its log file path).If our vCenter is running out of disk space, vCenter related services may not tart as expected. To resolve this issue we need to increase the free space capacity of the vCenter appliance.

How to do this

Continue reading “How to increase disk space of vCenter appliance”

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.

clip_image001

As an alternative option, we can use curl command. Please refer the below screen capture

clip_image002

 

curl -v telent://vcsa-01a:443

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.

Dell severs

HP Servers

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.

clip_image001

How to configure this feature

1.login to your vCenter web client

Go to the update manager

Select Manage

Select Settings

Click on Edit

clip_image002

Enable quick boot

clip_image003

Now we are going to remediate one of my esx host.

From the target host we can see qucik boot is enable on this

clip_image004

clip_image005

I used VMware hol HOL-1904-01-SDC-HOL to test this feature

Reference links

https://kb.vmware.com/s/article/52477

Reclaim disk space on VMware thin disk

    In a vSphere based virtualization environment we can mainly use two disk types(Thick & Thin).I hope you all know the difference between these two.

    To optimize our shared/Direct attached storage we can use thin disk. But the problem is even we delete the data from os level . It will not reclaim automatically from the storage.

    To overcome this issue we have two options.

    1. Use third party tool(if it’s a Windows we can use sdelete) to zero-out the disk blocks and using vmkfstools we can shrink the disk
    2. Storage vMotion the virtual machine or VMDK to a datastore formatted with a different block size

    In this article we are going to showcase how to use sdelete & vmkfstools to this operation

    1.This vm we have two thin disks. We will use second disk for the our test case. Capacity of the disk is 3GB

    clip_image001

    1. From the datastore we can see 80.47 GB free space

Continue reading “Reclaim disk space on VMware thin disk”

How to use hash table with Powercli

Hash table is a data structure where we can store our data.Comparing to the data arrays in powercli/powershell , the main difference is with hash table we can easily handle multiple type of data such as Integer,String,etc..

Some times we need to generate reports using some of the PowerShell commands(export-csv,out-file,add-content).With below example my requirement is to generate vm report which include VMname,Datastore name,Network port group and vmawre tools status.But to gather all the information we have to use multiple get commands and then its difficult to consolidate this data.Hash table was helped me on this.I can gather values from multiple commands and assign to hash table.I have highlghted hash table related commands in my script.

import-module vmware.vimautomation.ha

connect-viserver vcsa.corp.local
$vms=get-vm

$result=@()

foreach ($vm in $vms)

    {
     $vmname=$vm.name
     $dstore=get-vm $vm.name|get-datastore
     $nicport=(get-vm $vm.name).extensiondata.network.value
     $vmtools=(get-vm $vm.name).extensiondata.guest.toolsstatus
     $properties=@{
     name=$vmname
     datastore=$dstore
     network-$nicport
     vmwaretools=$vmtools

     }

$result+=new-object psobject -property $properties
$result|select name,datastore,network,vmwaretools|export-csv d:\mycsv.csv -append -notypeinformation