Building an advanced lab using VMware vRealize Automation – Part 5: Authentication services

20150630 - vRAIn part 4 of this series we configured two ESXi hosts to host our lab.  In this part we will setup a Windows Server 2012 R2 Core virtual machine and configure it as a domain controller in a separate root domain.  We will then configure a forest trust to our production domain so that our users can authenticate. Continue reading

Wednesday Tidbit: List VMs and their VMware Tools versions

20150713 - PowerCLII recently upgraded a customer’s vCenter to 5.5 along with the ESXi hosts from 5.0 to 5.5.  After the work was complete, I needed to work out which virtual machines needed their VMware Tools upgrading, as while they were all out of date… some were more out of date than others.

With eighty VMs in the cluster, manual checking was out of the question.  Again PowerCLI came to the rescue.

Connect to the vCenter:

$vc = "yourvcenter.company.local"
$credential = Get-Credential
Connect-VIServer -Server $vc -Credential $credential

Use the following code to list the VMs and the tools version number:

Get-VM | where {$_.powerstate -ne "PoweredOff" } | where {$_.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} | % { get-view $_.id } | select Name, @{ Name="ToolsVersion"; Expression={$_.config.tools.toolsVersion}}, @{ Name="ToolStatus"; Expression={$_.Guest.ToolsVersionStatus}}

guestToolsIsUnmanaged means tools are either not installed or are “3rd-party/Independant”

Finally, disconnect from the vCenter:

Disconnect-VIServer $vc -confirm:$false

Building an advanced lab using VMware vRealize Automation – Part 4: Physical infrastructure – compute

20150630 - vRAIn part 3 of this series on building a lab using VMware vRealize Automation we configured the physical networking to support our lab.  In this part we install and configure VMware vSphere 5.5 on our servers.

Before we can install vSphere, we have to analyse our requirements and source hardware to satisfy them.  Obviously we would like hardware that comes with as much compute, storage and network capacity as possible, but budgetary constraints must be taken into consideration. Continue reading

Building OpenSSL on NetBSD using pkgsrc

20150711 - NetBSD logoOn 9 July 2015 the OpenSSL Project patched a number of their releases, namely 1.0.1 and 1.0.2.  Here in the datacenter I run 1.0.2a, so it was time to build a new version to bring us up to 1.0.2d.

Compiling any new package for NetBSD is far from trivial and due to the lack of a configured cross-compiler for my architecture (mipsel) means it takes a quite a while.  Therefore there was no time to lose. Continue reading

Wednesday Tidbit: Shutdown your lab with one click

20150713 - PowerCLIRecently I’ve found myself having to shutdown my home lab quite often as the weather has been better than expected and the temperature has risen dramatically.  Great for sitting in beer gardens, not so good for the lab.

To speed up the process of shutting down all my VMs (currently 68 of them) I decided to knock up a very simple PowerCLI script:

# Variables

$esxi = "esxi.mdb-lab.com"
$credential = Get-Credential

Connect-VIServer $esxi -Credential $credential

Get-VM | where {$_.Powerstate -eq "PoweredOn"} | Shutdown-VMGuest -Confirm:$false

Start-Sleep -s 600

Stop-VMHost -Confirm:$false -Force:$true

Disconnect-VIserver $esxi -Confirm:$false

Definitely not rocket science, but the greatest scripts don’t always have to be complicated.

There are a lot of other devices (storage and networking equipment) that also have to be scripted to shutdown, but this is a start.

Building an advanced lab using VMware vRealize Automation – Part 3: Physical infrastructure – networking

20150630 - vRAIn part 2 we outlined our storage resources for the project.  We built a Windows 2012 R2 Server which provided iSCSI and NFS services to the environment.

In this part we configure the networking infrastructure that has been provided for the lab, and prepare it for the introduction of our VMware ESXi hosts.  Continue reading

Building an advanced lab using VMware vRealize Automation – Part 2: Physical infrastructure – storage

20150630 - vRAIn part 1 I outlined the aims of the project, which is to build an advanced lab using VMware vRealize Automation.  In this article, we will configure the storage that will house our provisioned virtual machines.

The first constraint that has been identified is cost, which effectively rules out fibre channel storage of any kind.  However, with the right hardware, we can utilise other technologies such as iSCSI and still provision high-performance storage: Continue reading

Wednesday Tidbit: Create custom ESXi ISO with ESX-tools-for-ESXi

20150713 - PowerCLIMy test cluster in the lab recently needed to be rebuilt.  As this cluster is nested and I wanted the latest version of ESXi to be deployed, I thought it would be good to use Image Builder to combine the two.

After downloading the VMware Tools for Nexted ESXi tools fling, I followed Andreas Peetz’ article on how to use them to build an offline bundle.

Once done, I used the following PowerCLI script with Image Builder to create my new ISO complete with VMware Tools for Nested ESXi:

# Add VMware depot
Add-EsxSoftwareDepot C:\Depot\ESXi550-201505002.zip

# Clone the ESXi 5.5 GA profile into a custom profile
$CloneProfile = Get-EsxImageProfile ESXi-5.5.0-20150504001-standard
$MyProfile = New-EsxImageProfile -CloneProfile $CloneProfile -Vendor $CloneProfile.Vendor -Name (($CloneProfile.Name) + "-virtualhobbit") -Description $CloneProfile.Description

# Add the Nested ESXi VMTools Offline bundle
Add-EsxSoftwareDepot C:\Depot\esx-tools-for-esxi-9.7.1-0.0.00000-offline_bundle.zip

# Add the esx-tools-for-esxi package to the custom profile
Add-EsxSoftwarePackage -SoftwarePackage esx-tools-for-esxi -ImageProfile $MyProfile

# Disable signature check
$DeployNoSignatureCheck=$true

# Export the custom profile into an ISO file
Export-EsxImageProfile -ImageProfile $MyProfile -ExportToISO -NoSignatureCheck -FilePath C:\Depot\ESXi550-201505002-virtualhobbit.iso

I also chose to export the image profile to a .zip file, so I could use it to remediate an existing cluster using VUM.

Export-EsxImageProfile -ImageProfile $MyProfile -ExportToBundle -NoSignatureCheck -FilePath C:\Depot\ESXi550-201505002-virtualhobbit.zip

Building an advanced lab using VMware vRealize Automation – Part 1: Intro

20150630 - vRAA few months back my boss came to me and asked if I could build a test lab for the company.  Being a managed services company with a number of technical staff, it was important to give them a training ground where skills can be learned but mistakes also made without consequence.

We have a lot of kit we currently use for testing changes on prior to putting them live, but not a segregated area dedicated for this purpose. Continue reading