Horizon 7 vRealize Operations Manager VM Creation

I prefer to do as much as I can with powershell, so that it is repeatable no matter where I happen to be installing things. Since I have to create a new VRops for Horizon installation at work, I decided to take this oppurtunity to create documentation about it.

Powershell setup

I would assume that if you are reading this you already have powershell setup with the VMware Powercli module. If that’s the case, jump down to the OVA setup section. If you need a quick refresher on getting that installed, here are the steps:

  1. Install-Module -Name VMware.PowerCLI
  2. Set-ExecutionPolicy RemoteSigned
  3. Install-Module -Name VMWare.Automation.Core

Changing the SHA type of the OVA file

The first thing we have to do with the vRealize ova is convert it from SHA256 to SHA1.

  1. Download the OVF Tool from here: Always pick the current version on the VMware site
  2. Install the OVF Tool
  1. Open a command prompt and change into the directory where the OVF Tool is installed cd "\Program Files\VMware\VMware OVF Tool"
  2. Run the ovftool against the OVA saving it as a SHA1 file. ovftool.exe --shaAlgorithm=SHA1 c:\temp\vRealize-Operations-Manager-Appliance-8.0.0.14857692_OVF10.ova c:\temp\vRealize-Operations-Manager-Appliance-8.0.0.14857692_OVF10-sha1.ova

OVA Configuration options

Now that we have an ova file that will work with powershell, it’s time to connect to our vcenter, and get the configuration options we need to provide.

  1. Connect to your vcenter connect-viserver 192.168.1.15
  2. Build the options object $ovaoptions = Get-OvfConfiguration -ovf C:\temp\vRealize-Operations-Manager-Appliance-8.0.0.14857692_OVF10-sha1.ova
  3. Output the object $ovaoptions.ToHashTable() | ft -AutoSize
  1. Now we prepare the script to build the OVA. Update lines 4, 6, 11-33, 36, and 38 to match your environment.
  2. Run the script as many times as needed, in my case I will run it 4 times to create a Continously Available environment. More details on that configuration will be in the next post.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
connect-viserver "vcsa.ad.rlgeex.me"

$ovfPath = "c:\temp\vRealize-Operations-Manager-Appliance-8.0.0.14857692_OVF10-sha1.ova"
$password = "RandomPassword"
$vmhost = Get-VMHost | where {$_.ConnectionState -ne "Maintenance" } | Sort MemoryUsageGB | Select -First 1
$ds = Get-Datastore -name "nfs-vmfs"
$ovfconfig = get-OvfConfiguration $ovfPath
$ovfconfig.ToHashtable()

$ovfconfig = @{
#DNS Search Domain
"vami.searchpath.vRealize_Operations_Manager_Appliance" = "ad.rlgeex.me,rlgeex.me"
#FQDN
"vami.domain.vRealize_Operations_Manager_Appliance" = "vdiops00.ad.rlgeex.me"
# IP Address
"vami.ip0.vRealize_Operations_Manager_Appliance" = "172.16.17.99";
# Netmask
"vami.netmask0.vRealize_Operations_Manager_Appliance" = "255.255.255.0";
# Gateway
"vami.gateway.vRealize_Operations_Manager_Appliance" = "172.16.17.1";
# DNS Servers
"vami.DNS.vRealize_Operations_Manager_Appliance" = "172.16.16.11,172.16.16.12,172.16.16.13";
#Force Enable IPv6
"forceIpv6" = $false;
#Time Zone
"vamitimezone" = "Etc/UTC";
# Size of Deployment xsmall,small,medium,large,smallrc,largerc
"DeploymentOption" = "xsmall";
# vSphere Portgroup Network Mapping
"NetworkMapping.Network 1" = "17_Management";
# IP Protocol
"IpAssignment.IpProtocol" = "IPv4";
}

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

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

You can find a copy of this script, with prompts at my github along with any other script I mention here.