Wednesday 10 June 2015

get-startvmpolicy causes a 'systemDefault' was not found error

I was recently trying to set start orders for Trend Deep Security AV appliances on my hosts as I found some were not configured correctly.  Upon running the get-startvmpolicy command across the VM's to check their status, on some of them I received the following error:

Get-VMStartPolicy : 4/06/2015 9:53:22 a.m.    Get-VMStartPolicy        Requested value 'systemDefault' was not found.At line:1 char:40+ foreach ($vm in $vms){get-vmstartpolicy <<<<  -vm VM}    + CategoryInfo          : NotSpecified: (:) [Get-VMStartPolicy], VimException    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMStartPolicy

So it turns out after logging this with VMware that it is a known bug and has the Bug ID 1336800.  This is set to be fixed in the next release of PowerCLI

Saturday 24 January 2015

vSphere Replication Port Requirements

If you have tried to figure out what the port requirements are for just vSphere Replication then you have most likely seen VMware's knowledge base article KB1009562.  I found it a little bit confusing to follow specifically since I was only using vSphere Replication to replicate VM's between separate environments, separated by firewalls for every component.  One thing to note is that the vSphere Appliance versions should match at each site to get the best results as a 5.8 version cannot talk to a 5.5 version.  The following is a table of the required ports and in which direction.  *sorry about no visio, that may come*.  Note that VRS stands for Virtual Replication Server.


Source Destination Ports TCP
Site A vCenter Site A VRS 5480 / 8043
Site A VRS Site A vCenter 80 / 443
Site A vCenter Site B vCenter 80 / 10443
Site B vCenter Site A vCenter 80 / 10443
Site A VRS Site B vCenter 80
Site B VRS Site A vCenter 80
Site B VRS Site B vCenter 80 / 443
Site B vCenter Site B VRS 5480 / 8043
ESXi Hosts Site A / Site B Site A / Site B VRS 31031 / 44046

It also pays to note that the environment I was working had no DNS resolution between either sites.  The solutions are in each environment create a DNS Zone with all the relevant records in each site OR you can edit the relevant host files on all the components (which takes a while).  With the above setup you should then be able to replicate a VM from one site to another.