Skip to content
vWorld
Menu
  • Main Page
  • About
  • Study Guide
    • VCAP-CMA Deploy 2018
Menu

Private HoL for vSphere using vRealize Automation v.1.0

Posted on May 24, 2019May 24, 2019 by admin

VMware Hands on Lab are impressive but what if we wanna create our own with different configuration ?

One day in my head born this idea. Create own HoL using vRealize Automation. As I had some idea how this should be looks like because I’ve create taska for students so I’ve start preparing Blueprint

Configuration

1 x Windows Jump Host
1 x Share with NFS share and two iSCSI target
1 x Clear VM for installation of ESXi
1 x VM with installed ESXi
1 x vCenter

Jump Host.

For Jump host I’m using blueprint standard clone option Windows Template with customization

Share

NSF Share in same way like Jump but on CentOS withou customization

ESXi

In deployment process of ESXi I’m using same method like for Jump and NFS but one VM is empty without OS configured, only Hardware and on second one has installed ESXi

vCenter

This was the hardest because I observed some “bug/issue/feature” when importing from OVA in vRealize my vCenter require 4TB of datastore so not possible to achieve in LAB. I’ve decide to make some workaround because I wanna have this VM also in blueprint with specific name and IP address.

Deployment

When each element was configured in blueprint the time has come for Customization.

All elements in blueprint has three custom properties

Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Requested Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.MachineProvisioned
node_name

vCenter has additional one

VMware.VirtualCenter.OperatingSystem

and for all we have event subscription

ChN is configured in this way

while configuration

Change name procedure you can find here on my previous post and as documentation from vRO in attachments.

Change VM Name before deploy

The ESXi configuration workflow look like this

the last element is most important for us because there is a changing Network configuration

var host = vmName.sdkConnection;
var guestOperationsManager = host.guestOperationsManager;
var guestAuth = new VcNamePasswordAuthentication();
guestAuth.username = "";
guestAuth.password = "";

var guestProgramSpec = new VcGuestProgramSpec();
guestProgramSpec.programPath = "/bin/esxcli";
guestProgramSpec.arguments = "network ip interface ipv4 set -i vmk0 -I "+IPAddress+" -N 255.255.255.0 -t static";
var processManager = guestOperationsManager.processManager;
result = processManager.startProgramInGuest(vmName , guestAuth , guestProgramSpec);
var guestProgramSpec = new VcGuestProgramSpec();
guestProgramSpec.programPath = "/bin/esxcfg-route";
guestProgramSpec.arguments = "192.168.100.1";
var processManager = guestOperationsManager.processManager;
result = processManager.startProgramInGuest(vmName , guestAuth , guestProgramSpec);

On the Share we also run some scripts

which you can see in Atachment

For vCenter as I told you need workaround the I’ve create this kind of workflow.

  1. I’m building clear VM from vRA
  2. Collect Payload – IP and Hostname
  3. Decom this VM
  4. Run External PS script to deploy vCenter from OVA

The external scrip which I’m using is from William Lam blog for deployment

The final element in this whole fun part is collect all VM name which you can do based on my previous article

Multi-Machine Blueprint – Collect VM from deploy

TO-DO List

  1. Send email confirmation for user with IP and Hostname of newly created HOL
  2. Register vCenter Machine in vRA for decom purpose or create Decom workflow
  3. Simplyfy scripts

Attachment to make this post clear

Change NameDownload
ESXi-ConfigurationDownload
external scriptDownload
Share-ConfigurationDownload
vCenter MachineDownload
ContendID-PayloadDownload
Rest-ContentDownload
MultiMachineDataDownload
Token-for-MMDownload

Share with:


Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Comprehensive Guide to the deploy.sh Script in VMware Aria Automation
  • Using Checkboxes as Buttons in Aria Automation: A Workaround for Concatenating Dropdown Values
  • Automating Disk Partitioning and Formatting Using Cloud-Init: A Deep Dive
  • Simplifying Kubernetes Management: Installing Tanzu Mission Control on Tanzu Kubernetes Grid Multicloud
  • vRealize Automation Standard Deployment Flow – Deep Dive

Archives

Follow Me!

Follow Me on TwitterFollow Me on LinkedIn

GIT

  • GITHub – vWorld GITHub – vWorld 0
© 2025 vWorld | Powered by Superbs Personal Blog theme