[CmdletBinding()]param( [IPAddress]$vm_ipaddr, # DHCP address assigned after first boot [String]$Hostname, # Target FQDN after static IP is set [Object]$NewPassword, # New Administrator password ([String] or [SecureString]) [IPAddress]$IPv4Address, # Static management IP [String]$IPv4SubnetMask, # Subnet mask (dotted-decimal) [IPAddress]$IPv4Gateway, # Default gateway [Array]$IPv4DnsServers, # One or more DNS server IPs [String]$DnsDomainName, # DNS domain (e.g. corp.local) [Array]$IPv4NtpServers, # NTP server IPs (optional) [IPAddress]$IPv6Address, # Static IPv6 address (optional) [Int]$IPv6CidrMask # IPv6 CIDR prefix length (optional))
The ComposerApplianceConfig_Sample.ps1 also catches HPEOneView.Appliance.AuthSessionException for cases where the default password was already changed in a previous run.
4
Configure static networking
Set-OVApplianceNetworkConfig configures the hostname, static IP, subnet, gateway, DNS, and optionally IPv6. After this call the appliance restarts its network stack, so the script reconnects using the new hostname.
The script generates a CSR, submits it to an internal Windows CA using certreq.exe, and installs the signed certificate. Adapt the $CA and $template variables for your PKI.
$template = "WebServer" # Windows certificate template name$CA = "MyCA.domain.local\domain-MyCA-CA" # CA config string$csrdir = "C:\Certs\Requests" # Local path for CSR and cert files$CSR = @{ Country = "US" State = "California" City = "Palo Alto" Organization = "Hewlett-Packard" CommonName = $Hostname AlternativeName = "$Hostname,hpov,$IPv4Address"}$request = New-OVApplianceCsr @CSR -ApplianceConnection $ApplianceConnectionSet-Content -path (Join-Path $csrdir $csrFileName) -value $request.base64Data -Force# Submit to Windows CA$parameters = "-config {0} -submit -attrib CertificateTemplate:{1} {2}\{3}.csr {2}\{3}.cer {2}\{3}.p7b" ` -f $CA, $template, $csrdir, $baseName$req = [System.Diagnostics.Process]::Start("certreq", $parameters)$req.WaitForExit()# Install the signed certificate$Task = gc $csrdir\$cerFileName | Install-OVApplianceCertificate -ApplianceConnection $ApplianceConnection | Wait-OVTaskComplete
Certificate management applies only to ApplianceConfig_Sample.ps1. The Composer sample omits this section because Synergy Composer certificate workflows differ.
7
Configure LDAP / Active Directory authentication
Both scripts configure an Active Directory LDAP directory and map four AD groups to OneView roles.
After core appliance setup, the scripts continue with resource provisioning. See the Networking and Storage sample pages for detailed explanations of those sections.The ApplianceConfig_Sample.ps1 concludes by adding an enclosure:
Run the script in a single elevated PowerShell session. The $ApplianceConnection object is reused throughout, so do not close the session between steps.