Tech Center

This page is a home for my technology related posts.

Disclaimer!

The views, information or opinions expressed on this site are my own and do not represent my current/future employer or customer.

The author of the information takes no responsibility of any damages that may occur using the information.

You are free to share or redistribute the information as you seem fit.

Forcefully replacing the VCSA 5.x certificates (Self Signed)

Prepare environment:
  • Download OpenSSL from here
  • Run Prepare environment batch (PrepEnv.bat) as administrator.
PrepEnv.bat mkdir c:\OpenSSL mkdir c:\Certs mkdir c:\Certs\vCenter mkdir c:\Certs\InventoryService echo [ req ] >>c:\Certs\openssl_generic.cfg echo default_md = sha512 >>c:\Certs\openssl_generic.cfg echo default_bits = 2048 >>c:\Certs\openssl_generic.cfg echo default_keyfile = rui.key >>c:\Certs\openssl_generic.cfg echo distinguished_name = req_distinguished_name >>c:\Certs\openssl_generic.cfg echo encrypt_key = no >>c:\Certs\openssl_generic.cfg echo prompt = no >>c:\Certs\openssl_generic.cfg echo string_mask = nombstr >>c:\Certs\openssl_generic.cfg echo req_extensions = v3_req >>c:\Certs\openssl_generic.cfg echo input_password =testpassword >>c:\Certs\openssl_generic.cfg echo output_password = testpassword >>c:\Certs\openssl_generic.cfg echo [ v3_req ] >>c:\Certs\openssl_generic.cfg echo basicConstraints = CA:false >>c:\Certs\openssl_generic.cfg echo keyUsage = digitalSignature, keyEncipherment, dataEncipherment >>c:\Certs\openssl_generic.cfg echo extendedKeyUsage = serverAuth, clientAuth >>c:\Certs\openssl_generic.cfg echo commonName = vcva55.vmware.com >>c:\Certs\openssl_generic.cfg
  • Runt the OpenSSL installer
  • Install the application in C:\OpenSSL
  • Open openssl_generic.cfg present in c:\Certs\ and modify it for your environment. A sample configuration file appears similar to:
req ] default_md = sha512 default_bits = 2048 default_keyfile = rui.key distinguished_name = req_distinguished_name encrypt_key = no prompt = no string_mask ...
/ / Certificates, The Tech Center

Isolating Stale VMDKs

Step 1: Generate a list of vmdk associated with the VMs In this step, we will generate a list of VMDKs associated with all the VMs registered on a vCenter server. Save the following code as a PowerShell script Script 1: $VmInfo = ForEach ($Datacenter in (Get-Datacenter | Sort-Object -Property Name)) { ForEach ($Cluster in ($Datacenter | Get-Cluster | Sort-Object -Property Name)) { ForEach ($VM in ($Cluster | Get-VM | Sort-Object -Property Name)) { ForEach ($HardDisk in ($VM | Get-HardDisk | Sort-Object -Property Name)) { "" | Select-Object -Property @{N="VM";E={$VM.Name}}, @{N="Datacenter";E={$Datacenter.name}}, @{N="Cluster";E={$Cluster.Name}}, @{N="Hard Disk";E={$HardDisk.Name}}, @{N="Datastore";E={$HardDisk.FileName.Split("]")[0].TrimStart("[")}}, @{N="VMConfigFile";E={$VM.ExtensionData.Config.Files.VmPathName}}, @{N="VMDKpath";E={$HardDisk.FileName}} } } } } $VmInfo | Export-Csv -NoTypeInformation -UseCulture -Path "VmInfo.csv" Connect to the vCenter server using following command Connect-VIServer -Server <vCenter server FQDN> -User <vCenter server admin user> -Password <Password for the user> Execute the script 1 The execution of the above script will generate VmInfo.csv at the path of execution. Step ...
/ / PowerCLI, The Tech Center, vmdks

Isolation of Intermittent network issue – Part I

Introduction: One of the most challenging issues to remediate in a Virtual infrastructure is Intermittent network outage for Virtual machines. The challenges are two prong in the nature
  1. Network administrators do not want to touch a production network unless they have a concrete evidence of a failure on the network side.
  2. By default, VMware logging does not have an ability to detect failures other than link state on the Edge Switch.
Since, VMware logging is not very help full unless it is a link state failure on the Edge Switch. One would need to conduct a few test to isolate the break point. Symptoms:
  • Intermittent network outage for the Virtual machines
  • vMotion of a VM causes a network outage
  • Intermittent network outage for a VM which gets resolved by the vMotion of a VM to another host.
  • Intermittent network outage for a VM which gets resolved when VM's networking configuration is modified using ...
/ / Network

Some useful SRM advance settings

Most of us who work with SRM will know that a success of an SRM (Vmware Site recovery manager) workflows is highly dependent on time a storage array takes to process SRA commands. While working with customers I have noticed that following advance settings are very handy in tuning the SRM timeout for letting it wait longer. Storage Settings: storage.commandTimeout: The default value of this parameter is 300 seconds. This setting determines how long SRM waits for a command that was issued by the SRA to complete. It is sometimes necessary for SRM to wait a little longer for an SRA command to complete. Working with SRM in last few years I have noticed in most cases 900/1200 works the best. Procedure to change storage settings 
  1. Click Sites in the Site Recovery Manager interface
  2. right-click the site on which to change settings
  3. Select Advanced Settings.
  4. Click storage.
  5. Modify the ...
/ / SRM

How to map vmdk files to Disk Number or the device name inside the guest OS.

Step1: Find out the PCI slot ID of the SCSI controller on the VM and make a note of them. You will need them in Step2
PCI slot ID of the SCSI controller on the VM can be obtained by running a simple command on the vmx for the VM cat /vmfs/volumes/<data store name>/vmname/vmname.vmx | grep scsi | grep pci The above command will generate an output similar to. scsi0.pciSlotNumber = “160” scsi1.pciSlotNumber = “192” Step2: Find disk information within the guest OS. The steps to obtain this information depends upon the guest OS in use. Linux: On a Linux machine run following command for the device you want to map. udevadm info --query=all -n /dev/<device name> | grep DEVPATH Let’s say we want to map /dev/sda the final command would be look like udevadm info --query=all -n /dev/ sda | grep DEVPATH The above command will generate an output similar ...
/ / The Tech Center, vmdks