vCD : Permissions to view and execute vRO workflows in vCloud Director

Its important to add necessary privileges to the roles after vRealize Orchestrator 7.5 is registered in vCloud Director 9.5. Otherwise you will not be able to see the Option to ‘Execute’ the vRO workflows. As shown in the following screeenshot the option ‘Execute’ will be hidden in Tenant Portal. 

Hamburger Menu > Libraries > Service Library > Workflow

Please find the steps to provide adequate permissions to execute the vRO workflows from vCloud Director 9.5. Continue reading

vCD : Change SSH Session Idle timeout of vCloud Director Appliance.

Its bit annoying that the SSH connection to vCloud DIrector Appliance get cut off for just idling for a short time. So we may want to tweak the ssh configuration of vCD appliance to keep the connection alive for longer period.
The following two properties of SSHD define how long the SSH session should stay though there is no input received from the client.

ClientAliveCountMax
ClientAliveInterval


Please click here fore more details.

ClientAliveCountMax
Sets the number of client alive messages which may be sent without sshd(8) receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, sshd will disconnect the client, terminating the session. It is important to note that the use of client alive messages is very different from TCPKeepAlive. The client alive messages are sent through the encrypted channel and therefore will not be spoofable. The TCP keepalive option enabled by TCPKeepAlive is spoofable. The client alive mechanism is valuable when the client or server depend on knowing when a connection has become inactive.
The default value is
3.

If ClientAliveInterval is set to 15, and ClientAliveCountMax is left at the default, unresponsive SSH clients will be disconnected after approximately 45 seconds.

ClientAliveInterval
Sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client.

Continue reading

Change Hostname of vCloud Director Appliance

Hey All, hope you all doing well.

At the moment when you deploy VCD appliance we dont have the option to provide the hostname for the vCloud Director Cell . When you login to the console or ssh to the appliance, it just shows the default ‘photon-machine’ as the hostname. Its difficult to identify the VCD Cells if you have multiple cells in the environment.

Changing Hostname of the appliance is easy. Here is your warning.  I would not recommend using this workaround in your production environment without being directed to make this change by VMware support or officially documented by VMware.

Please find the steps below.  Continue reading

VMware vCloud : This VM has a compliance failure against its Storage Policy.

vCloud PowerCLI

 

 

 

Issue :

VMs in vCloud Director displays the message : “System alert – This VM has a compliance failure against its Storage Policy.”

Symptoms :

After changing the storage profile of the VM you may observe the following error in ‘Status‘.

“System alerts – This VM has a compliance failure against its Storage Policy.”

Virtual Machine <VMName>(UUID) is NOT_COMPLIANT against Storage Policy <SP Name> as of 6/18/16 11:04 AM
Failures are:
The disk [0:0] of VM <VMName>(UUID) is on a datastore that does not support the capabilities of the disk StorageProfile <SP Name>

Resolution :

To reset the alarm in the vCloud Director.

Option 1:

  1. Click the System Alert and select ClearAll.

vcd-1

 

 

 

 

vcd-2

 

 

 

 

 

 

Option 2:

If many VMs have the same alerts then its difficult to clear one by one. In that case we can use SQL statement to clear all alerts.

  1. Log in to the database with Admin credentials using Microsoft SQL Management Studio.
  2. Run this SQL statement to display all virtual machines with the system alert:

    vcd-3
  3. Run this update statement to clear the alert in the vCD UI:

 

PowerCLI script to Set Perennial reservation on RDM LUNs in a Cluster

Please find the Powercli script for configuring Perennial reservation on all RDM luns in a ESXi Cluster. Please change the value for following variables before you execute the script.

$vcenter = “vCenter.vmtest.com”
$dCenter = “123456”
$cluster = “Production Hypervisor”

This is the flow of script execution.

1. Get the list of RDM LUNs from the cluster.
2. Check the current perennial reservation status of the RDM. If it’s TRUE, no changes will be applied.
3. If the status is FALSE, the perennial reservation will be set on the LUN.
4. Script will query the latest status and the status will be displayed.

The result, after executing the script, looks something like this.

perinnial reservation

 

 

-SD

Powercli to create report with VM Tag, Category, Tools version and VM HW Version

Recently one of the community members had a requirement to generate report with the following details in .csv format.

– VM Name
– VMware Tools Version
– VM Hardware Version
– Category Names as columns and Tag names as values.

The following PowerCLI script will help to achieve this.

CSV Output:

 
 
 
 
 
 
 

-SD

Powershell oneliner to find the VMware softwares installed, version and installDate.

#vmwTip 1 : Powershell oneliner to find the VMware softwares installed, version and installDate.

oneliner

PowerCLI to find vCPU to pCPU ratio and vRAM to pRAM ratio

vsphere-PowerCLI
 
 
I was in search for a script to generate report on vCPU to pCPU ratio and vRAM to pRAM at cluster level in a vCenter. Found couple of interesting community threads which address part of the requirements. Thought to consolidate (or extract:) ) the code and created the following. The report will be generated as CSV file.

Output in table format :

DatacenterClusterNamevCPU-pCPUCoreRatiovRAM-pRAMRatioNumVMHostsNumPCPUSocketsNumPCPUCoresNumvCPUPhysicalMem(GB)VirtualMem(GB)
1234512345-HypClus11.85:10.28:1364889768214
678910678910-HypClus20.60:10.21:152016096640132
1234512345-HypClus22.08:10.91:12212256458

Ref : https://communities.vmware.com/thread/456555?start=0&tstart=0