Previously, on Scriven

  • |

    Micro-segmentation for Dummies (VMware Special Edition)

    I was a bit late to the party with this Micro-segmentation for Dummies guide, but it couldn’t of come to me at a better time. So I thought it worth sharing for any of you that are embarking on a network virtualisation path and need to better understand and/or educate other colleagues with one of the key features/selling points of this game changing technology.

    Having read about half way through this I’d say VMware and Dummies guide have done a great job getting across a basic understanding of the subject. It’s the sort of guide that can come in real useful when needing to engage
    with other less technical colleagues.

  • |

    vRealize Orchestrator 6.0 executing a workflow that takes a composite type array parameter via the REST API from Powershell using json

    Based off this article I show how to pass a composite type array via json to a vRO workflow.


    In a previous article I demonstrated how to execute a workflow using a json payload from Powershell. If you are not sure how this is done, please refer to it before reading below.

    A recent Puppet based vRO workflow I have been working on takes an optional composite type array to be POSTed. This is a slightly more complex looking piece of json and it took me sometime, and lost hair, to get it working.

    To give some background, the workflow used in this example is the Puppet plugin workflow “Classify Node with Manifest” that has an optional type called “Array/CompositeType(name:string,value:string):PuppetClassParameters”.
    This can be used to pass in parameters to a Puppet class on the node from the vRO workflow.

    The Puppet plugin offers many workflows, including remdiation, but here we are only discussing the “Classify Node with Manifest” workflow.

    Below I will show you the json and then how I managed to work out what the workflow was expecting to receive.

  • |

    vRealize Orchestrator 6.0 and executing a workflow with parameters via the REST API from Powershell using Invoke-RestMethod and a json payload

    Some Powershell functions that can be used to invoke a REST API call, with a json payload, against a vRO workflow with parameters.


    As part of a fairly complex piece of server automation work being completed, there was a requirement to be able to call a workflow that I’d created within the vRO. The particular workflow in question was one that used the vRO Puppet plugin to classify a Linux based node, CentOS in this example, and remediate.

    This workflow is to be called after the VM has been built to spec and has been registered within DNS. (Further article to follow on how I register DNS records via Powershell)

    The majority of the server automation is driven from a Powershell module that gets called via the vRA (vRealize Automation Center) from an Advanced Services blueprint.

    The article, How to use PowerShell to start an Orchestrator Workflow gave me the majority of what I needed to get started, but I wanted to use the Powershell ‘Invoke-RestMethod’ to do the grunt work instead of Invoke-WebRequest as it seemed more elegant.

  • |

    Accessing the vRealize Orchestrator 6.0 home/configuration pages with Chrome 45+


    Chrome recently updated to version 45 and now disallows connections to https sites with DH (Diffie-Hellman) keys less than 1024 bits.

    This caused me an issue when attempting to connect to a local test vRA instance to in turn access the vRO console. Fortunately, there is a way round it.

  • |

    vRealize Orchestrator 6.0 and adding a Windows 2012 R2 Powershell host


    I’m doing a lot of Orchestrator type work at the moment and recently found a need to add a Powershell host to my itinerary of plugins that are available for use in Orchestrator. This allows you to run Powershell scripts from a dedicated server that are initiated by Orchestrator workflows.

    A quick read through of the docs make the task appear straight forward, yet it is fraught with some issues and took a lot longer than expected to complete.

    Below is what ended up working for me in my environment.

  • |

    Google Deep Dream Robin

    I recently stumbled across this Deep Dream generator site and decided to give it a stab with one of my photos.
    It uses Google’s Deep Dream code that can be found on Github.

    It’s a really easy process to ‘deepdreamify’ an image, but be warned that it takes hours! Also, there is no notification (at present) to tell you when it has been cooked. The site basically gives you a URL to check back on for the result.

    Here is the result of a Robin being ‘deep dreamed’.

    Deep Dream Robin

    Processing this took 9 hours or so and it’s red breasting horrific and I’m not sure what that Seal is looking at..

  • |

    Implementing a simple search function with image into your Jekyll blog

    I’ve implemented a number of things into this blog to make it more interesting and useful for visitors. One of said things is the search, and whilst it was incredibly easy to setup I had one issue along the way to getting it working. In this post I will demonstrate how it was implemented and the wall I ran into.

    ##The what and how

    A simple search on Google returned Christian Fei’s fine work on a Jekyll based search facility. After following Christian’s README.MD I soon got the basics in place.

  • |

    Fitbit Charge HR and the 50% exclamation firmware update fail

    UPDATE (2015-07-01)

    Today, Fitbit rolled out a new update to the Android application.

    Fitbit firmware update

    NOTE: Not had a chance to try this as my Fibit doesn’t need updating now, but I’ll give it a go at the next available update.

    TLDR; Tried to update Fitbit Charge HR firmware via the last Android App and it toasted the Fitbit. My advice is to do firmware updates using a PC or Mac.

    ##Happy birthday to me

    I just celebrated a birthday over the weekend and was stoked to receive a Fitbit Charge HR. After a quick wrestle with the what seems to be superglued box I cracked the watch onto my wrist. First thing you need to do once the device pairs with your phone, PC or Mac is to update its firmware. This is typical of anything you buy these days, its a no skip, must do scenario as far as the device is concerned.

    ##Ah well I thought, this should be painless

  • |

    NSX - Recovering from failed host preparation uninstall

    We recently ran into an issue within our NSX lab whereby we were tearing down the environment to reinstall it. The area that gave us some grief was with the host preparation uninstall.

    It appeared to be uninstalling, but when refreshing the Web client the uninstalls failed across all three of our hosts.

    Host preparation errors within Web client

    In this situation you can attempt to uninstall the NSX vibs manually on each host.

  • |

    Adding an image to a Jekyll post frontmatter that displays in the RSS feed

    At lot of feeds I read tend to include image headers alongside the post. Sort of like a headline image for the post or article.

    Feed image example

    To do this in Jekyll is pretty straight forward, once you know how!

    Generating an RSS feed in Jekyll is a pretty trivial affair. In a nutshell you create a feed.xml file at the root of your site and put the following code into it.

  • |

    Displaying Jekyll variables in a markdown formatted post

    Just a quick post to note how to include Jekyll liquid tags in a code segment block that is formatted in markdown. Bookend the markdown code block with

    { % raw % } 
    .. <code block> .. 
    { % endraw % }. 

    For example;

  • |

    PowerCLI - Getting distributed port groups from an ESXi host

    A small segment of PowerCLI that helps you to retrieve distributed virtual portgroups from an ESXi hostname.

    get-vmhost -Name <hostname> | Get-VirtualPortGroup | sort Name | Select Name, @{N="VLANId";E={$_.Extensiondata.Config.DefaultPortCOnfig.Vlan.VlanId}}

    Note: You’ll need to be authenticated to a given vCenter prior to running this command.

  • |

    Running 'jekyll serve --detach' in the background without console output

    In order for Jekyll to serve up the pages you create you need to run its server component. The usual way to do this is by running the following at the command line;

    jekyll serve

    In Jekyll 2.5.x this will run the web server and a watcher by default. The watcher checks for changes that are being made on the fly and continues to serve.

    The above command is run on the presumption that your source, destination and ports settings exist in the _config.yml file at the root of your site

    This process will not run in the background. Not ideal if you either want to log off the terminal or edit the blog at the terminal with vi or nano or whatever.

  • |

    PowerCLI - Getting and setting round-robin pathing policies

    The following functions can be used to retrieve (Get-RoundRobin) whether particular LUN IDs are using a Round Robin pathing policy. You can then set (Set-RoundRobin) a round robin pathing policy on the LUN IDs if your storage processor supports it.

    Round Robin Pathing Policies from the VMware site

    Round Robin (RR): Uses an automatic path selection rotating through all available paths, enabling the distribution of load across the configured paths. For Active/Passive storage arrays, only the paths to the active controller will be used in the Round Robin policy. For Active/Active storage arrays, all paths will be used in the Round Robin policy.

    To run the scripts you will need your Vendor LUN ID or Device Display Name.
    A LUN ID looks a bit like this:


  • |

    PowerCLI - Creating local users and groups on ESXi 5.5

    The following function creates a user and role that allows the power up of VMs on a host. I use this account when vCenter is out of action and I need to run other functions to locate user VMs and power them up on particular hosts.

    This function requires that you have the root password to the ESXi host.

    	Function Write-LocalHostUser() {
    	$creds=Get-Credential -Credential "root"
    	$hostname=$hostname + "<FQDN>"
    	Connect-VIServer -Server $hostname -Protocol https -Credential $creds
    	New-VMHostAccount -Id "<username>" -Password "<password>" -Description "Account to be used to power up VMs in the event there is no vCenter."
    	New-VIRole -Name "VM Power On Only" -Privilege “Power On”
    	Set-VIRole -Role "VM Power On Only" -AddPrivilege "Assign network"
    	New-VIPermission -Entity $hostname -Principal "powerup" -Role “VM Power On Only” -Propagate:$true