Change NTP settings of vRealize Network Insight

What's new with vRealize Network Insight 5.1 & vRealize Network ...

 

 

 

 

 

 

 

Please find the steps for changing the NTP configuration of vRealize Network Insight appliance.

  1. SSH to the appliance as support user.
  2. Switch to consoleuser

3. Check the current NTP setting.

4. Change the NTP servers

5. Verify the NTP sync.

 

 

Change NTP settings of vCloud Director Appliance

What's New in vCloud Director 9.5 – Tom Fojta's Blog

Please find the steps for modifying NTP settings of vCloud Director Appliance.

Change NTP Servers

  1. SSH to vCloud Director appliance as root.
  2. Configure the NTP source for the virtual appliance.
    1. Open the /etc/systemd/timesyncd.conf file to edit, such as vi.
    2. Remove the comment for the NTP configuration, add the NTP settings, and save the changes. Please note that you’ve to leave a space between NTP server FQDNs.  NTP=<FQDN of NTP Server1> <FQDN of NTP Server>

For example, 

Verify the status

  1. Enable the systemd-timesyncd service and verify the status.
    1. Run the timedatectl set-ntp true command to enable the network time synchronization.
    2. Run the systemctl restart systemd-timesyncd to enable the NTP synchronization
    3. Run the timedatectl status and systemctl status systemd-timesyncd.service to verify the status of the service.

Change Time Zone

After you deploy successfully the vCloud Director appliance, you can change the system time zone of the appliance. All vCloud Director appliance instances in the server group must use the same settings.

Please find the steps to change the timezone of vCD appliances here.

Change DNS settings of vRealize Operations Manager Virtual Appliance 8.x

VMware vRealize Operations Archives | Steven Bright

Please find the steps to change the DNS server(s) of the vRealize Operations Manager Virtual Appliance. For each node that you want to change, perform these steps:


1. SSH to the vRealize Operations Manager Appliance as root.
2. Verify the current DNS configuration by running the following command:

ovfenv --key vami.DNS.vRealize_Operations_Manager_Appliance

2. Change the DNS server or servers. To specify multiple DNS servers set DNS_server_IP as a comma-separated list with no spaces.

ovfenv --key vami.DNS.vRealize_Operations_Manager_Appliance --value DNS_server_IP

For Example

ovfenv --key vami.DNS.vRealize_Operations_Manager_Appliance --value 1.1.1.1,8.8.8.8

3. Reboot the virtual machine.

Change DNS settings of vRealize Log Insight Virtual Appliance 8.x

What's new in vRealize Log Insight 4.0: An in-depth review ...

Please find the steps to change the DNS server(s) of the vRealize Log Insight Virtual Appliance. For each node that you want to change, perform these steps:

1. SSH to the vRealize Log Insight Virtual Appliance as root.
2. Verify the current DNS configuration by running the following command:

ovfenv --key vami.DNS.VMware_vCenter_Log_Insight

2. Change the DNS server or servers. To specify multiple DNS servers set DNS_server_IP as a comma-separated list with no spaces.

ovfenv --key vami.DNS.VMware_vCenter_Log_Insight --value DNS_server_IP

For Example

ovfenv --key vami.DNS.VMware_vCenter_Log_Insight --value 1.1.1.1,8.8.8.8

3. Reboot the virtual machine.

Change DNS settings of vRealize Orchestrator Virtual Appliance

Please find the steps to change the DNS server(s) of the vRealize Orchestrator Virtual Appliance 7.6.0( It may work on 8.x, I haven’t got chance to test 8.x). For each node that you want to change, perform these steps:

1. SSH to the vRealize Orchestrator Appliance as root.
2. Verify the current DNS configuration by running the following command:

ovfenv --key vami.DNS.VMware_vRealize_Orchestrator_Appliance

2. Change the DNS server or servers. To specify multiple DNS servers set DNS_server_IP as a comma-separated list with no spaces.

ovfenv --key vami.DNS.VMware_vRealize_Orchestrator_Appliance --value DNS_server_IP

For Example

ovfenv --key vami.DNS.VMware_vRealize_Orchestrator_Appliance --value 1.1.1.1,8.8.8.8

3. Reboot the virtual machine.

Kubernetes in 5 mins

Kubernetes in 5 mins

In this lightboard talk, Steve Tegeler walks through Kubernetes fundamentals for beginners. And check Steve’s latest video: Mapping Kubernetes to your infrastructure https://www.youtube.com/watch?v=ex8jY7HNnUY&feature=youtu.be Kubernetes 101: https://www.vmware.com/topics/glossary/content/kubernetes VMware Tanzu – Enterprise Kubernetes Solutions: https://cloud.vmware.com/tanzu Kubernetes Academy: https://kubernetes.academy/ VMware Enterprise PKS: https://cloud.vmware.com/vmware-enterprise-pks VMware Essential PKS: https://cloud.vmware.com/vmware-essential-pks For more information, please visit the VMware’s Cloud-Native Apps website: https://www.vmware.com/solutions/cloud-native-apps.html


VMware Social Media Advocacy

What’s New With VMware Cloud on AWS – New…

What’s New With VMware Cloud on AWS – New Instance Type and More Capabilities for Automation and Ease of Operations

What’s New With VMware Cloud on AWS – New…

A new bare-metal instance type for VMware Cloud on AWS clusters is designed to optimize data-intensive … The post What’s New With VMware Cloud on AWS – New Instance Type and More Capabilities for Automation and Ease of Operations appeared first on VMware Cloud Community.


VMware Social Media Advocacy

How to create AWS Lambda function with PowerCLI to access VMConAWS?

 

AWS Lambda in a nutshell

Lambda is an AWS offering to build serverless applications. It helps you to run code without provisioning or managing servers. The Lambda functions can be invoked directly through API calls or in response to events. AWS will charge the customer only for the compute time consumed by Lambda function, so no need to pay for idle time. You can learn more about lambda here.

AWS Lambda, PowerShell and PowerCLI

The code you run on AWS Lambda is uploaded as a ‘Lambda Function’. AWS Lambda natively supports PowerShell as scripting language. It helps us to write Lambda functions in PowerShell which includes commands from PowerCLI modules.

Let us see the steps to create a PowerShell based Lambda Function to get the list of VMs from a VMware Cloud on AWS SDDC. As of now the AWS Code Editor doesn’t support writing or editing PowerShell based Lambda functions. The steps discuss how to create the Lambda functions offline and deploy them in AWS Lambda.

Step 1 : Install PowerShell Core.

The Lambda functions in PowerShell require PowerShell Core 6.0, Windows PowerShell isn’t supported. If you have PowerShell Core 6.0 or above already installed, skip to step 2. The environment variable $PSVersionTable will help you to find the PowerShell version and Edition.

I’ve used Powershell Core v6.2.1 which can be downloaded from PowerShell GitHub repo.

1.1 Goto https://github.com/PowerShell/PowerShell/releases/tag/v6.2.1 > Assets > and download the Package suitable for your OS, mine is Windows 10 and the bundle ‘PowerShell-6.2.1-win-x64.msi’ worked fine.

1.2 Once downloaded, double-click the installer and follow the prompts.

Step 2 : Install .NET Core 2.1 SDK.

Because PowerShell Core is built on top of .NET Core, the Lambda support for PowerShell uses the same .NET Core 2.1 runtime for both .NET Core and PowerShell Lambda functions. The .NET Core 2.1 SDK is used by the Lambda PowerShell publishing cmdlets to create the Lambda deployment package. The .NET Core 2.1 SDK is available at .NET downloads on the Microsoft website. Be sure to install the SDK and not the runtime installation.

Step 3 : Install Powershell module ‘AWSLambdaPSCore’

Open PowerShell Core and run the following command to install ‘AWSLambdaPSCore’ module.

The following are the commands available in module ‘AWSLambdaPSCore’

Step 4 : Install PowerCLI

If you already have PowerCLI modules installed in Powershell Core, skip this step.

Open PowerShell Core and run the following command

Step 5 : Create script from PowerShell Lambda Templates.

AWSLambdaPSCore module provides some Script Templates. Get-AWSPowerShellLambdaTemplate will list out the available templates.

We will use the template ‘Basic’ to create script ‘VMC-GetVM.ps1’ for getting the VM list from VMC SDDC.

Step 6 : Modify the script to get the VMs from vCenter located VMConAWS SDDC.

If you are new to Powershell Lambda its good to go through this article to understand Input Object, Returning Data, Additional Modules and Logging.

Open the script VMC-GetVM.ps1 in the editor, I use VSCode. Replace the content of the script with the following script.

Note: Please ensure the version of modules marked with #Requires statement are same as the version of modules loaded in Powershell Core. If it’s different, then update the script with version details of corresponding modules which are loaded. The following command will help to find the versions of required modules.

The values for the properties (venter, vCenterUser, etc) in the object $LamdaInput will be passed when we execute the function.

Save the script.

Step 7 : Reduce the size of package

In next step we will publish the Lambda Function. While publishing, a deployment package that contains our PowerShell script ‘VMC-GetVM.ps1’ and all modules declared with the #Requires statement will be created. But the deployment may fail since the package with listed PowerCLI modules will exceed Lambda’s hard limit on Package size, ie 69905067 bytes. In that situation the following error will be thrown.

To avoid that, as a workaround, we’ve to reduce the package size by cutting down the size of PowerCLI modules. When I checked ‘VMware.VimAutomation.Core’ is the largest module which is due to  Remote Console files included in the module.

Browse to the following path and move the folder ‘VMware Remote Console’ to Documents.

Step 8 : Create IAM role to access CloudWatch Log and to execute Lambda.

Login to AWS Console and navigated to IAM. Create new role ‘lambda_basic_excution’ with the policy ‘CloudWatchLogsFullAccess’.

Step 9 : Publish to Lambda

To publish our new PowerShell based Lambda function, let’s execute the following command from Powershell Core.

It will take a while to create the package and deploy to AWS Lambda.

Step 10 : Configure environment variable.

Once the function is deployed, login to AWS Console and navigate to Lambda. Select the newly created function ‘VMC-GetVM’

Set the environment variable HOME to /tmp.

Step 11 : Install AWSPowerShell module.

To execute the newly created function from PowerShell Core we need the module ‘AWSPowerShell’. Run the following command to install it.

Step 12 : Execute the function

From the editor (VSCode) create new file LambdaExecute.ps1 and copy the following code.

Once the execution completed you can see the list of VMs in CloudWatch Logs.

From AWS Console go to CloudWatch > Log Groups and select ‘ /aws/lambda/VMC-GetVM’ and click on latest log stream.

You can see the VMs list in the Message!

 

Uninstall VMware PowerCLI modules from Powershell Core

Recently I had to uninstall PowerCLI modules from Powershell Core. As we know installing PowerCLI on Powershell from Powershell Gallery is an easy one step task. The following command will help you to do that.

As of today (30-08-2019) the above command will install all following modules.

But when you try to uninstall the module ‘VMware.PowerCLI’ with following command, it will remove only VMware.PowerCLI, rest of the modules will be retained.

The following option is not useful since some modules are dependent on others.

The easiest way to remove all VMware modules is to remove them from module path. The following command will help you to find out the location of VMware modules. Once its identified just delete them from explorer. Powershell modules doesn’t make windows registry entries, so deleting them from the path is equivalent to a complete uninstall.

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