Deploy vRealize using the PowerCli

The following was carried out on Windows 10 from PowerShell 5 against vCenter 6.5

To deploy vRealize from either PowerShell or the PowerCli, the following needs to be carried out.

Prerequisites

Firstly, the vRealize ova needs to be converted to SHA1 before it can be deployed. To do this you will need the OVA Tool which can be downloaded and installed from here.

If you are using PowerShell like I did, rather than the PowerCli, you will need to install the PowerCli module. To do this just run the following command from within PowerShell while running as administrator:

Install-Module -Name VMware.PowerCLI

Once that is installed, you need to set the execution policy to allow remote signed. If you have not already done so, this can be done with the following command:

Set-ExecutionPolicy RemoteSigned

You can then import the VMWare.Automation.Core module:

Install-Module -Name VMWare.Automation.Core

Changing the SHA type

You will need to change the SHA type from SHA256 to SHA1 or you will get the following error:

PowerCLI doesn't support SHA256 hash codes in OVF manifest. Use Force parameter to ignore hash validation on the imported 
files.

To change the SHA type, you need to use the OVA Tool that you have downloaded and execute the following command:

"C:\Program Files\VMware\VMware OVF Tool\ovftool.exe" --shaAlgorithm=SHA1 D:\Software\VMWare\vRealize-Operations-Manager-Appliance-6.4.0.4635874_OVF10.ova D:\Software\VMWare\vRealize-Operations-Manager-Appliance-6.4.0.4635874_OVF10-sha1.ova

Determining the OVA parameters

Once this has been completed, you are ready to proceed with the installation of the  ova file. The first step is determining what parameters it will require. You will need to connect to your vCenter server and query the downloaded file by running the following commands:

Connect-VIServer 192.168.0.10

$ovaconfig = Get-OvfConfiguration -ovf D:\Software\VMWare\vRealize-Operations-Manager-Appliance-6.4.0.4635874_OVF10-sha1.ova
$ovaconfig.ToHashTable()|ft -AutoSize

This will result in the following list of parameters:

vRealize OVA Parameters

Now that we know the parameters we can prepare the command for powershell to deploy the OVA which is below:

connect-viserver "dartagnan.home.lab"

$ovfPath = "D:\Software\VMWare\vRealize-Operations-Manager-Appliance-6.4.0.4635874_OVF10-sha1.ova"
$password = "VRPassword"
$vmhost = "athos.home.lab"
$ds =  "vsanDataStore"
$ovfconfig = get-OvfConfiguration $ovfPath
$ovfconfig.ToHashtable()

$ovfconfig = @{
"vami.ip0.vRealize_Operations_Manager_Appliance" = "192.168.0.29";
"vami.netmask0.vRealize_Operations_Manager_Appliance" = "255.255.255.0";
"vami.gateway.vRealize_Operations_Manager_Appliance" = "192.168.0.1";
"vami.DNS.vRealize_Operations_Manager_Appliance" = "192.168.0.20, 8.8.8.8";
"forceIpv6" = $false;
"vamitimezone" = "Etc/UTC";
#"DeploymentOption" = ;
"NetworkMapping.Network 1" = "Management";
"IpAssignment.IpProtocol" = "IPv4";
}

Import-VApp -Source $ovfPath -Datastore $ds -DiskStorageFormat Thin -Name "vRealize" -OvfConfiguration $ovfconfig -VMHost $vmhost

Set-VM -MemoryGB 6 -VM "vRealize" -Confirm:$false

get-vm -name "vRealize" | Start-VM

As you can see in the second last line above, I have changed the memory size from 16gb to 6gb as I am building this in my own lab in which memory is a premium. This should be left at 16gb for production installs but set it to a value that works for you for non-production installs.

This should result in the following output:

vRA deployment output

At this point we just need for the VM to power up and we can then log onto the console.

vRA Console

Finalising the setup

Now we can access the URL for vRealize Operations Manager and finalise the setup.

vRA Getting Started.png

There are 3 options at this point. As this is a standalone installation of vRealize Operations Manager, we can opt for the Express Installation. The New Installation option is necessary for clustered installations of vRealize Operations Manager.

vRA Getting Started 2

Once you choose Express Installation, it will launch the wizard. Just clock next on the first screen.

vRA Getting Started 3

On the next screen, enter the admin password for vRealize Operations Manager. Click next and then finish. It will take a few minutes to finalise its setup.

vRA Login

Once it concludes you can log in and accept the EULA and enter your license key.

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s