Troubleshooting the vSphere Initial Setup vRO Workflow in vRA 7

Part of the wizard to setup vRA 7 includes a step towards the end to create a vRO workflow that will create initial content within a vRA Tenant. To run the workflow, login to the default vRA tenant as the configurationadmin account created as part of the initial setup:

InitialConfig01

There are various inputs required depending on such things as if you wish to use the default Tenant or create an additional one:

InitialConfig02

What to do though if the workflow fails for some reason? Particularly if you are using the vRO server which is included as part of the vRA appliance, where do you go to look at what went wrong?

You can firstly look at the request in vRA:

InitialConfig03

 

InitialConfig04

If you are using the built-in vRO rather than an external one, you may not know the details to get into it. To access the vRO server that ships as part of the vRA appliance, point your vRO client at the vRA appliance and note a couple of things:

  • The Host name requires port 443 specified
  • The default User name is [email protected]

InitialConfig05

Note: If you don’t have the version 7 client installed, you can run it from the vRA appliance webpage https://vraappliance.fqdn:

InitialConfig06

Once in the vRO client, navigate to Library / vRealize Automation / InitContent / vSphere Initial Setup and you can examine further what went wrong:

InitialConfig07

 

vRA “Internal error: Error allocating network on machine. Attempted to divide by zero”

vRA 6.2.2: while attempting to deploy a VM from blueprint we received the following error:

Internal error: Error allocating network on machine. Attempted to divide by zero

Pretty helpful error message as usual for this version of the product ūüėČ

The Network Profile and Path appeared to be set correctly when requesting the VM. We eventually tracked it down to the Network Profile IP Range having run out of unallocated IPs. The solution of course is to free up some IPs. Head to the Network Profile, IP Ranges to  check out which ones might be suitable to free up:

NetworkProfile01

Once you have removed a VM the IP will go into the Destroyed state for a while (I believe it is 30 mins, couldn’t find a document to confirm)

NetworkProfile02

To speed things up you can hit the Reclaim button:

NetworkProfile03

and the IP should got to the Unallocated state:

NetworkProfile04

Fire up the provision VM task again and things should be better now.

Create Blueprints in vRA 7 via REST and via vRO

A significant pain point on a recent project of mine was automating the creation of blueprints in vRA 6.2 with vRO. There was very little information around on how this could be achieved and even with the method that we eventually came up with still required some manual effort and was not always the most reliable.

Enter vRA 7 and some hope that things may have gotten better.

First of all I looked through the vRA 7 Programming Guide and found some examples on exporting content from vRA 7. I’d heard in some of the conversations around the release of version 7 that blueprints would be able to be manipulated in YAML files, so the first thing to do was to create a blueprint through the new Design interface and then get it exported out into a YAML file.

Create a Blueprint through the Design Interface

Here’s my Centos-Small blueprint created through the Blueprint Designer. A simple vCenter template clone connected to a single network and basic resource values (make sure to publish the blueprint):

CreateBlueprint02

Get an Authentication Token for vRA REST Queries

Using the Postman REST client, I first of all need to get an authentication token. I have previously detailed how to do this from vRO, however from Postman I need to set the following:

URL: https://vraapliance.fqdn/identity/api/tokens

Type: POST

Headers: Accept: application/json and Content-Type: application/json

Body:


{
"username":"[email protected]",
"password":"P@ssw0rd1",
"tenant":"Tenant01"
}

CreateBlueprint03

 

CreateBlueprint04

Sending that request should give me a response with a token to use which is valid for up to 8 hours; it will look something like this:


{
"expires": "2016-01-19T18:37:42.000Z",
"id": "MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=",
"tenant": "Tenant01"
}

 

CreateBlueprint05

Get a List of Blueprints

Now we can use that token to get a list of available blueprints that token has permission to view:

URL: https://vraapliance.fqdn/content-management-service/api/contents

Type: GET

Headers: Accept: application/json and Authorization: Bearer MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=

CreateBlueprint06

 

This will give us a JSON response, including some details of our Centos-Small Blueprint:


{
"links": [],
"content": [
{
"@type": "Content",
"id": "78f27bc8-dd51-4c10-97cf-fb5770f0836b",
"contentId": "cfa3b28a-6a59-4a85-8355-ff70c6fd3332",
"name": "IaaS VC VirtualMachine",
"description": null,
"contentTypeId": "xaas-resource-mapping",
"mimeType": null,
"tenantId": "_internal",
"subtenantId": null,
"dependencies": [],
"createdDate": "2016-01-05T11:05:21.673Z",
"lastUpdated": "2016-01-05T11:05:21.673Z",
"version": 0
},
{
"@type": "Content",
"id": "3ac8d4ed-1bc0-45d7-a54a-edb44a2fdeae",
"contentId": "9fd01109-c9ab-4ce7-9b9d-4d1c06bccdb9",
"name": "IaaS vCD VM",
"description": null,
"contentTypeId": "xaas-resource-mapping",
"mimeType": null,
"tenantId": "_internal",
"subtenantId": null,
"dependencies": [],
"createdDate": "2016-01-05T11:05:21.868Z",
"lastUpdated": "2016-01-05T11:05:21.868Z",
"version": 0
},
{
"@type": "Content",
"id": "2359c8c9-1ec1-4162-a9e0-aa2c5121815d",
"contentId": "CentosSmall-12345",
"name": "Centos - Small",
"description": "Centos - Small",
"contentTypeId": "composite-blueprint",
"mimeType": null,
"tenantId": "Tenant01",
"subtenantId": null,
"dependencies": [],
"createdDate": "2016-01-19T10:56:14.398Z",
"lastUpdated": "2016-01-19T10:56:14.398Z",
"version": 0
}
],
"metadata": {
"size": 20,
"totalElements": 3,
"totalPages": 1,
"number": 1,
"offset": 0
}
}

Create a Content Package Containing our Blueprint

Now we need to create a Content Package containing our Blueprint, so that it can be exported. We will only add a single item, but multiple items can be added to the Package. The id of the Blueprint retrieved above needs to be used in the JSON body as ‘contents’ .

URL: https://vraapliance.fqdn/content-management-service/api/packages

Type: POST

Headers: Accept: application/json, Content-Type: application/json and Authorization: Bearer MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=

Body:


{
"name":"Test package",
"description":"Test package for export",
"contents":[ "2359c8c9-1ec1-4162-a9e0-aa2c5121815d" ]
}

CreateBlueprint07

 

CreateBlueprint08

All being well, we should receive a 201 Created response:

CreateBlueprint09

 

Listing Existing Content Packages

We can see what Content Packages are available with:

URL: https://vraapliance.fqdn/content-management-service/api/packages

Type: GET

Headers: Accept: application/json and Authorization: Bearer MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=

CreateBlueprint10

 

which should give us a response like the following, including our newly created ‘Test package’:


{
"links": [],
"content": [
{
"@type": "Package",
"id": "736562b2-c991-449a-999d-6d25f2ff05c5",
"name": "demo package",
"description": "this is the description",
"tenantId": "Tenant01",
"subtenantId": null,
"contents": [
"7e9bf69c-a4ec-44dd-98f5-6408f074a1db"
],
"createdDate": "2016-01-14T15:28:26.323Z",
"lastUpdated": "2016-01-14T15:28:26.323Z",
"version": 0
},
{
"@type": "Package",
"id": "339aeb0d-a15a-4ee1-84b7-87389d05c428",
"name": "demo package 2",
"description": "demo package 2",
"tenantId": "Tenant01",
"subtenantId": null,
"contents": [
"241fe601-5f15-4749-a6cb-f0bfdb9c97b9",
"7e9bf69c-a4ec-44dd-98f5-6408f074a1db"
],
"createdDate": "2016-01-14T17:05:47.458Z",
"lastUpdated": "2016-01-14T17:05:47.458Z",
"version": 0
},
{
"@type": "Package",
"id": "04fb81ce-9da1-46f6-b98f-fd48e8ce0e2c",
"name": "Test package",
"description": "Test package for export",
"tenantId": "Tenant01",
"subtenantId": null,
"contents": [
"2359c8c9-1ec1-4162-a9e0-aa2c5121815d"
],
"createdDate": "2016-01-19T11:28:30.507Z",
"lastUpdated": "2016-01-19T11:28:30.507Z",
"version": 0
}
],
"metadata": {
"size": 20,
"totalElements": 3,
"totalPages": 1,
"number": 1,
"offset": 0
}
}

CreateBlueprint11

 

Export the Content Package to a Zip File

Now we want to export the Content Package to a zip file so that we can have a look at the YAML file that details the blueprint:

URL: https://vraapliance.fqdn/content-management-service/api/packages/packageid

Type: GET

Headers: Accept: application/zip and Authorization: Bearer MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=

CreateBlueprint12

This time in Postman click on Send and download

CreateBlueprint13

This will prompt us where to save the package and what to call it; make sure you create a zip file…

CreateBlueprint14

Have a look inside the zip file and you will see the following structure; a metadata.yaml file and a composite-blueprint folder containing individual yaml files for each blueprint that was part of the package:

CreateBlueprint15

CreateBlueprint16

The contents of each YAML file are listed here for reference:

metadata.yaml


name: "Test package"
productVersion: "7.0.0-SNAPSHOT"
data:
- locator: "composite-blueprint/CentosSmall-12345.yaml"
name: "Centos - Small"
description: "Centos - Small"
exportTime: "2016-01-19T11:46:13.614Z"

CentosSmall-12345.yaml


id: CentosSmall-12345
name: Centos - Small
description: Centos Small - 1 vCPU - 1GB RAM
status: PUBLISHED
components:
Tenant01:
type: Infrastructure.Network.Network.Existing
data:
name:
fixed: Tenant01
network_profile:
fixed: Tenant01
vSphere_Machine_1:
type: Infrastructure.CatalogItem.Machine.Virtual.vSphere
data:
_cluster:
fixed: 1
min: 1
action:
fixed: FullClone
allow_storage_policies:
fixed: false
blueprint_type:
fixed: '1'
cpu:
fixed: 1
min: 1
disks:
- capacity: 16
id: 1452533069864
initial_location: ''
is_clone: true
label: Hard disk 1
storage_reservation_policy: ''
userCreated: false
volumeId: 0
display_location:
fixed: false
machine_prefix:
fixed:
id: Tenant01
max_network_adapters: {}
max_volumes: {}
memory:
default: 1024
max: 1024
min: 1024
nics:
- address: ''
assignment_type: Static
id: 0
load_balancing: ''
network: ${_resource~Tenant01}
network_profile: Tenant01
provisioning_workflow:
fixed:
id: CloneWorkflow
label: CloneWorkflow
security_groups: []
security_tags: []
source_machine:
fixed:
id: 51784cf9-fc3a-4939-abf7-2e2965523036
label: template-centos06b
source_machine_name:
fixed: template-centos06b
storage:
default: 16
max: 40
min: 16
layout:
Tenant01: 0,0
vSphere_Machine_1: 1,0

 

Create Blueprints from Postman

We can now manipulate the YAML files to create Blueprints back in vRA. Say for instance we want to add Centos-Medium and Centos-Large Blueprints. All we need to do is create additional YAML files for those two templates, update the metadata.yaml file and send back to vRA.

So the composite-blueprint folder now looks like this:

CreateBlueprint17

And the metadata.yaml file has been updated to contain the new files:


name: "Test package"
productVersion: "7.0.0-SNAPSHOT"
data:
- locator: "composite-blueprint/CentosSmall-12345.yaml"
name: "Centos - Small"
description: "Centos - Small"
- locator: "composite-blueprint/CentosMedium-12345.yaml"
name: "Centos - Medium"
description: "Centos - Medium"
- locator: "composite-blueprint/CentosLarge-12345.yaml"
name: "Centos -Large"
description: "Centos - Large"
exportTime: "2016-01-19T11:46:13.614Z"

We then create a new zip file with the updated content:

CreateBlueprint18

To create the Blueprints in vRA we send the following REST request via Postman:

URL: https://vraapliance.fqdn/content-management-service/api/packages

Type: POST

Headers: Accept: application/zip,  and Authorization: Bearer MTQ1MzE5OTg2MjYzMTo3MThjNGFiNDVmMjE4MjZiMzgxNjp0ZW5hbnQ6VGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE0NTMyMjg2NjIwMDA6ZmJmZjU2ZmNjOTFkMDE3ODhkNjJmMzM3ZGMwMzM3NjRhMjQxNjJlMjhjMGU3YjU0YzNlZjUwYTlkYWFjNDAxYTBkODVlYzVkYWQ1YzY4ZDc0MTQ3NjBlM2Q3MDk1OGU5OTg1NjNiMTI4OWQwMGMzMzExMDAxNmEyOGY0M2MxYTk=

Body: set to form data and select the TestPackageUpdated.zip file

CreateBlueprint19

CreateBlueprint20

We should receive a 200 OK response with details of Blueprints created:


{
"operationType": "IMPORT",
"operationStatus": "WARNING",
"operationResults": [
{
"contentId": "CentosMedium-12345",
"contentName": "Centos - Medium",
"contentTypeId": "composite-blueprint",
"operationStatus": "SUCCESS",
"messages": null,
"operationErrors": null
},
{
"contentId": "CentosLarge-12345",
"contentName": "Centos -Large",
"contentTypeId": "composite-blueprint",
"operationStatus": "SUCCESS",
"messages": null,
"operationErrors": null
},
{
"contentId": "CentosSmall-12345",
"contentName": "Centos - Small",
"contentTypeId": "composite-blueprint",
"operationStatus": "WARNING",
"messages": [
"Found matching content, import will overwrite this content."
],
"operationErrors": null
}
]
}

CreateBlueprint21

Now login to vRA and you will see the three Blueprints:

CreateBlueprint22

and if we look at the details of the medium template it is showing additional vCPU and RAM resource that were specified in the YAML file:

CreateBlueprint23

Obviously, there are many other changes that could be made within the YAML file to make different templates.

Create Blueprints from vRO

While researching this topic I initially looked at a similar approach to the above with Postman when moving on to do the same for vRO. However, looking at the updated vRA 7 plugin for vRO showed a folder of workflows for working with Composite Blueprints:

CreateBlueprint24

Rather than try and re-invent the wheel I decided to see what these could do, specifically the Import a composite blueprint workflow. It has inputs of a vCACCAFE:VCACHost and a MimeAttachement, so is pretty straightforward to use:

CreateBlueprint25

Thinking slightly further ahead, rather than just run this single workflow, I would more likely use this as part of a vRA Tenant Creation workflow and would store multiple YAML files within Resource Elements and possibly update them on the fly before using them to create Blueprints. For this example though I have stored one for CentosXLarge in a Resource Element to illustrate the possibility. This is exactly the same type of YAML file for a Blueprint used in the above example with Postman, just has different values for id, name, vCPU and memory to make it XLarge:

CreateBlueprint26

So we then make a top-level workflow with two elements; a scriptable task to retrieve the YAML file from a resource element and the built-in Import a composite blueprint workflow:

CreateBlueprint27The scriptable task has an input of a Resource Element and outputs a MimeAttachment (in a more realistic example we would take and input of maybe a folder of Resource Elements and output an array of MimeAttachments). Then a simple one-liner to convert between the two object types:


var yamlMimeAttachment = yamlResourceElement.getContentAsMimeAttachment()

CreateBlueprint28

CreateBlueprint29

CreateBlueprint30

Now we can pass this MimeAttachement into the Import a composite blueprint workflow and set the vCACHost to be the host for the required vRA Tenant. From this workflow it will output the BlueprintId:

CreateBlueprint31

CreateBlueprint32

So we are ready to run the top level workflow. Specify a vCACHost and a YAML file in a ResourceElement and run the workflow:

CreateBlueprint33

Hopefully a successful run:

CreateBlueprint34

and here’s the Centos – XLarge Blueprint:

CreateBlueprint35

CreateBlueprint36

 

 

Issues with Chromecast v1 connecting to Virgin Media Super Hub 2ac

Recently got an upgrade of the Virgin Media Super Hub to the 2ac version. While making sure everything still connected OK, I was unable to connect a Chromecast v1 to the wireless access point.Chromecast

Compared to the previous Virgin Media router I had, this one has separate configuration areas for 2.4GHz and 5GHz wireless. A bit of messing around with trying to connect the Chromecast to either 2.4GHz and 5GHz wireless appeared fruitless until I dropped down the Wireless Mode setting from the default of up to 144Mbps to up to 54Mbps.

SuperHub01

Thinking back on it, I’m pretty sure that it was what the previous Virgin Media router was set to. Hence the reason I hadn’t seen the issue when first configuring the Chromecast a while back. Hopefully this blog post will remind me what I need to do next time I get an upgrade.

PowerCLI Book 2nd Edition is Now Available!

…..well in Kindle format anyway :-) The paperback version will be available on 11th January in the US and 12th January in the UK¬†and according to the publisher, apparently in book shops from the 19th January. Seriously, if you actually see one in a book shop then please send me a photo, since I’ve not seen that happen outside of a VMworld.

 

9781118925119.pdf

With my fellow authors, Luc Dekens, Glenn Sizemore, Brian Graf, Andrew Sullivan and Matt Boren, we spent the best part of 2015 putting this book together. The 1st edition was written in 2010 and published in 2011; since then the VMware virtualisation landscape has changed significantly from pretty much VMware vSphere infrastructure and P2V projects and maybe some desktop work with VMware View to a wide variety of Management, Desktop, Application, Infrastructure and Cloud products.

Given this expansion of products and the fact the we all buy tech books ourselves and want value for money from them, we didn’t want to just ship an updated version to cover what was in the 1st Edition and make sure it worked with the latest versions of vSphere, PowerCLI and PowerShell. So as well as updating every chapter to make sure it worked with vSphere 6, PowerCLI 6 and PowerShell 4, and adding or replacing content and code to make sure it was still relevant (for instance the Distributed Switch is now covered out of the box, previously we contributed our own functions), we had the foolish excellent idea to add a number of additional chapters covering things such as:

  • vCloud Director
  • vCloud Air
  • vRealize Orchestrator
  • Site Recovery Manager
  • PowerActions
  • and an introduction to DevOps topics

Additionally the original Storage and Network chapter was split into two and content on new technologies VSAN and NSX added appropriately. To be honest each of VSAN and NSX could probably have their own chapters…maybe next time ūüėČ

This took the page count to 984, around almost 200 pages more than the 1st¬†edition, which is almost the size on its own of some tech books. Unfortunately, this partly led to the book taking longer than it should have to complete and there were still areas that we would have liked to include, but had to make some tough decisions not to or it would never have seen the light of day. As a wise man often says….

JeffreySnover2

While there is some introductory content in some of the chapters, this is not a book that typically runs you through how to use each of the PowerCLI cmdlets in their relevant areas, rather this is a book that goes beyond what ships out of the box and into areas where you will need to do some of the hard work yourself.  We had some negative feedback that the 1st edition was not better in introductory areas and may well do so again this time; there are other great PowerCLI books out there now which will do a better job for beginners. So imagine the front cover has Deepdive stamped across it and that will give you a better feel for what to expect.

Personally I feel I made a way better contribution to this book than the previous one for various reasons:

  • I was involved from the beginning, rather than parachuting in halfway through to try and get the book out of the door.
  • Consequently I was able to think about and plan for the content of the chapters I was responsible for, rather than just trying to make the deadline for each chapter.
  • Being used to the publisher’s Word template and what was required in them. There are so many rules about fonts, spacing and expectations around how the chapter needs to be laid out, that you seem to be just expected to know and first time round¬†caused a lot of pain and time wasted.
  • A supportive employer, Xtravirt, who were interested in what I was doing, rather than one who previously was not.
  • A big thank you to our Technical Editor, Matt Boren, who left no stone unturned in making sure my code was not only accurate, but also some outstanding suggestions to help me improve. Some of which I have taken forward for everything PowerShell based that I write now. In fact he liked the experience so much, he even got roped into contributing some of the book content himself.
  • I actually had a reasonable idea about the technologies involved……;-)

 

Last time round I guessed how much time I spent on my contribution. Being curious, I decided to track it this time.¬†It’s also something I get asked about now and again by people considering writing a tech book, so now I can refer them to some data ūüėČ

Originally I was going to track the data by week, but since it went on so long it ended up being by month. I’m not sure if writing a book with code samples requires more or less effort than a tech book without them. On the one hand you almost have to produce double the content; explanatory written text and create code to make stuff happen. On the other hand at least the code uses up some pages when printed in the book :-)

BookHours

In total I spent 330.5 hours (that extra 0.5 was crucial) of my own time on the effort for this book between Jan and Nov 2015, and remember there were 5 other authors. So if you are thinking about getting involved in a project like this then consider carefully whether you are able to commit to the level of time you may have to give up for it. I’m not sure how representative this is for authors of other tech books, but I never talked to one who didn’t say something like “you have no idea how much effort it takes”. Similar to last time, I pretty much worked on it most evenings Mon – Thu and stayed away from it over the weekend so that it did not impact my family life too much. (Although my children are now 5 years older and consequently don’t go to bed so early – which meant starting later and finishing too late regularly) It did mean I didn’t see my friends much¬†during weekday evenings, which is when I tend to catch up with them, for about 6 months, but something has to give. I think my blog and podcast content suffered a fair bit too.

You’ll see that most of the original effort was in the early months either producing content for new chapters, or updating content for existing ones. I was actually originally expecting to be pretty much done by April, but for various reasons I took on a bit more than originally planned and April – June was spent producing more content and some early feedback reviews. August – November was pretty much taken up with reviews.

Reviews are something which I think vary from publisher to publisher, but for Wiley it pretty much follows this:

 

Author Review

If you can recognise your original text after it has been through all that process, then well done :-)

So at least three responses required per chapter, multiply that by the number of chapters you commit to and then try finding time to write new chapters and respond to reviews both on similar deadlines. Pro tip: get your new content out of the way early on so you can do the reviews in peace – ¬†see Jan / Feb in the chart ūüėČ

With all that effort though, it is a personally (not financially) rewarding experience. I think both times I’ve said “Never again!” too many times, but I suspect it may happen one day. I’m confident that if it’s something you are interested in and you buy a copy that you will find it useful. I genuinely would happily buy a copy with my own money for the content I have seen the other guys produce for it.

Final comment: Writing in a foreign language also brings some difficulties. Having your own English ‘corrected’ to the US version requires a fair amount of patience. Not necessarily spelling differences, but phrases that are commonly understood this side of the Atlantic, but not the other. I’ll just leave this here……

Update 03/02/2016: Due to some issues mentioned in the comments around downloading the sample files, I have attached (most of) them here:

 

VMware vRealize Orchestrator Cookbook: Review

I’ve been looking for a decent learning resource for vRO since I started working with it and finally got some time to get through the¬†VMware vRealize Orchestrator Cookbook by Daniel Langenhan. I spent most of my early days with vRO just trying to figure out how to do things and why some things worked in a particular way – and mostly haranguing Michael Poore¬†for some answers :-)

Cookbook

This book covers getting everything setup and various decisions to be made about the design of the infrastructure pieces needed; Windows vs Appliance, which database, clustering etc. Then moves onto workflow development and working with the various plugins. Full table of contents is below:

1: INSTALLING AND CONFIGURING ORCHESTRATOR
2: OPTIMIZING ORCHESTRATOR CONFIGURATION
3: VISUAL PROGRAMMING
4: WORKING WITH PLUGINS
5: BASIC ORCHESTRATOR OPERATIONS
6: ADVANCED OPERATIONS
7: WORKING WITH VMWARE INFRASTRUCTURE

 

The vRO client is not the easiest to get screenshots for since there are often multiple pieces to the puzzle to illustrate a single point. This book however deals with it excellently; an example is below.

CookBook02

I also chuckled when I read various similar comments to the below throughout the book, i.e. when you start to get into some of the more advanced topics for vRO there is not a lot of information out there on how to do it.

“The VMware documentation about policies is really nonexistent…”

“The event variable is almost not documented and any information is hard to find….”

Summary:

I wish this book had been out a couple of years ago when I first needed it since it would have been invaluable to get up-to-speed with the product. However, even with a fair amount of experience with vRO I still found it an excellent read. It plugged many gaps in my knowledge and gave a lot of interesting background to things I (thought) I had already figured out. There are loads of examples that I’m sure I’ll be referring back to regularly.

Note: I bought a copy of this myself, so no promotional views here :-)

Version Control and Comments in vRealize Orchestrator Workflows

When editing a¬†vRealize Orchestrator workflow there’s a default option in the client which prompts you to increase the version of the workflow when you select Save and Close.

VersionHistory01

While this is intended to be a good idea, since it at least makes people think about version control in their workflows and consequently they are then able to take advantage of some of vRO’s versioning features, it contains a fundamental flaw and makes me cringe when I see someone use it…

Monkey

…..and then I remember I used to do the same when I first started with vRO because I didn’t know any better.

If you only use this method to increase your version of the workflow, when you go to look at the version history, you will see something like this:

VersionHistory02

i.e. increased versions, but since there are no comments, then you have no idea what changed between them without comparing two different versions.

A better approach to this when editing the workflow is before saving changes to navigate to the General tab, click on the version number you wish to increment and add a comment.

VersionHistory03

Now save changes and look at the version history – you will see the comment is listed.

VersionHistory04

 

PowerShell Quick Tip: Testing JSON Syntax

I’ve been working a lot with JSON files recently and quite regularly I need to update their content for testing of code changes. While editing the files I want to make sure I don’t introduce an error by making a syntax error in the JSON file. I’ve been using a quick way in PowerShell to test the JSON is clean and if not, to point me at the line in the file where there is a problem.

Take the following example JSON:


{"people": [
{
"name": "John Smith",
"city": "London",
"country": "United Kingdom",
"age": 27
},
{
"name": "George Burns",
"city": "New York",
"country": "USA",
"age": 32
}
] }

I can check this in PowerShell by creating a Here-String of the JSON, then using the ConvertFrom-JSON cmdlet.


$text = @"
{"people": [
{
"name": "John Smith",
"city": "London",
"country": "United Kingdom",
"age": 27
},
{
"name": "George Burns",
"city": "New York",
"country": "USA",
"age": 32
}
] }
"@

$json = $text | ConvertFrom-Json

If there are no issues then I get no errors back and additionally can examine the $json variable to check the contents:


$json.people

JSON01

However, if there is a syntax error in the JSON text then I will get something like this:

JSON02

This line:

ConvertFrom-Json : Invalid object passed in, ‘:’ or ‘}’ expected. (88): {“people”: [

gives us a number, 88, of the character in the string where there is a problem. To head straight to the problem area use:


$text.substring(88)

This will show us text after the error:

JSON03

and if we look at the text I gave I missed out a ” at the end of “city”: “London,¬†


{"people": [
{
"name": "John Smith",
"city": "London,
"country": "United Kingdom",
"age": 27
},
{
"name": "George Burns",
"city": "New York",
"country": "USA",
"age": 32
}
] }

 

Unable to Create vRA Business Groups with the Same Name in Different Tenants with vRO

vRA Build 6.2.2-2754020

vRO 6.0.1

Via the vRA GUI I can create Business Groups with the same names in different Tenants as follows:

Tenant1: BusGroup1, BusGroup2, BusGroup3

Tenant2: BusGroup1, BusGroup2, BusGroup3

However, creating the Business Groups with the same names in different Tenants via the vRO plugin, specifically the workflow Library / vCloud Automation Center / Administration / Business Groups / Create a Business Group, fails in the second tenant with the below error:

[42106] The specified condition was not met for ‘Name’. (Dynamic Script Module name : createBusinessGroup#12)

If I change the naming convention to be different per tenant then I have no issue. I thought it might be a restriction in the product, but as mentioned I was able to create them with the original same names via the GUI.

Anyone else experience the same thing? If you do, leave a comment here or on this communities post.

sad

 

Update 06/10/2015:

A VMware employee confirms this problem to be a known issue.