VCSA 6.5 Appliance backups with vRealize Orchestrator 7.4

With the release of vSphere 6.5 VMware has introduced a new method for creating a backup of the vCenter Appliance. This method is available from the vCenter Appliance web management interface on port 5480 (https://applianceaddress:5480).

vCenter Appliance backup

Unfortunately the user interface does not allow you to schedule the backup. And I don’t see administrators create daily manual backups of their vCenter appliances. So therefor I have spent some time to build a workflow for vRealize Orchestrator that allows you to schedule the backup of a vCenter appliance. The workflow uses the Rest API Plugin and the VMware vCenter Server Appliance Management API to create a backup for one or more vCenter 6.5 appliances (which could also be a Platform Services Controller).

Backup files are stored via FTP, which could also be FTPS, SCP, HTTP or HTTPS, as is documented in the API Documentation. I have tested the workflow with FTP and FTPS.

TipBefore using this workflow always first manually create a backup from the web interface on port 5480 on your appliance. By doing this you can verify the protocol being used and the correct settings for paths and credentials. When this is successful you can use those parameters as attributes in the workflow.

With this workflow (see image below) you can schedule the backup from vRealize Orchestrator.

vCenter Backup Schedule workflow vrealize orchestrator

The workflow is available as an individual download (here) or as a package (here) that you can import into your own vRealize Orchestrator environment. The main source code of the javascript component that requests the backup via the API is available at the end of this page. How to configure the environment to use the workflow is described in the rest of this article.

The workflow in its downloadable format uses FTP. See the javascript code below. When you want to use FTPS or another protocol modify that in the javascript code in the workflow. At this time I have not provided the protocol choice as an attribute. This is on my to do list;-)

warningThis workflow is provided as is and may be used by whomever wants to and may be modified to your needs. Also this workflow might not yet be optimal, if you have suggestions or want to contribute to the workflow that could benefit others then please contact me via email (rob at vmwarebits,com)

If you have never worked with vRealize Orchestrator the this article is be a good source to get you started: Create your first Orchestrator Workflow. If you do not have vRealize Orchestrator in your environment I suggest to download and deploy the appliance version (documentation).

After importing the workflow you must configure some of the attributes of the workflow. One of these attributes is a user that can be used to access the backup feature via the API. You could use the administrator@vsphere.local account but it’s better to create a specific user for this process, in my example I have created a local user named backup in the vsphere.local domain. You can do this under the Administration menu in the vSphere Web Client under the Single Sign-On option. This can only be configured if you are already logged in as an SSO administrative user such as administrator@vsphere.local.

vCenter create SSO user for backup

Next assign this user to the administrators group. This is also where you could configure a user from one of the configured identity sources such as active directory to run the backups with.

vCenter SSO user for backup

In vRealize Orchestrator the first step is to create one or more Rest Host objects. You can find this option under the library folder of the HTTP-REST plugin under the configuration folder: Add a REST host.

vCenter Orchestrator create rest host

For the authentication type select Basic. Next provide a name for the host and the URL where the REST API for the host can be accessed. In the javascript code for the backup I am using the HTTP REST host name as the FQDN to access the host. So make sure to make these two match. The URL should have the format as in the image below: https://yourhostaddress/rest. (Don’t forget the /rest part.)

vCenter Orchestrator create REST Host

In the next steps provide the credentials for the user that you can use for executing the backup jobs. For other steps accept the default values and make sure to accept the host’s SSL certificate when executing the workflow.

Next it’s time to configure the attributes for the vCenter Backup workflow. Some of the attributes are self explanatory and the description will further explain for which purpose they are used. One attribute might not be straight forward. This is the Array of Rest Hosts. It must contain at least one host object. Click the attribute and follow the steps in the image below to add the previously created Rest Hosts to the array.

vCenter Orchestrator define arrya of rest hosts

There is one more attribute I would like to explain about here: seat. It’s a boolean that allows you to configure whether or not to include the S.E.A.T. part in your backup. This is the part that contains all the data for Statistics, Events, Alarms and Tasks. ANd it is an optional component. It is also the part that will consume a possibly gigantic part of your storage, compared to the default and mandatory component (common) that will create a backup of the Inventory and Configuration. For a Platform Services Controller the workflow will always only perform a backup of this latter part because that type of appliance does not contain any SEAT-data.

 

Here is the javascript code for the actual backup process:

//set main variables for the script based on workflow attributes
//I have made the assumption that your rest host name is identical to the FQDN for the host
var appliance = restHosts[hostCounter].name;
System.log(„Starting backup process for host: „+appliance);

//create an authentication session for the rest host
var request = restHosts[hostCounter].createRequest(„POST“, „https://“ + appliance + „/rest/com/vmware/cis/session“, „“);
var response = request.executeWithCredentials(ssoUser, ssoPassword);
var sessionid = JSON.parse(response.contentAsString).value;

//System.log(„response code: “ + response.statusCode);
//System.log(„response body: “ + response.contentAsString);
System.log(„sessionid: “ + sessionid);

//get the possible backup parts: common (Inventory and Configuration) is always present
//and mandatory (vCenter and PSC) but SEAT (Stats, Events, Alarms, and Tasks) is only available for vCenter
partsRequest = restHosts[hostCounter].createRequest(„GET“, „https://“ + appliance + „/rest/appliance/recovery/backup/parts“, „“);
var partsResponse = partsRequest.executeWithCredentials(ssoUser, ssoPassword);

//System.log(„get parts list response code: “ + partsResponse.statusCode);
//System.log(„get parts list response body: “ + partsResponse.contentAsString);

//if the keyword seat is present in the parts list then it must be vCenter, not a PSC
//so if we do not find seat then we use a variable to later decide not to include the seat part
seatFound = partsResponse.contentAsString.indexOf(„seat“);
var psc = false;
if (seatFound < 1) {
//seat was not found in the response fro the server so it must be a psc
psc = true;
}
//System.log(„seat: “ + seat);
//System.log(seatFound);

//use the workflow attribute seat to decide whether or not to include the seat-part in the backup
//but only when it’s not a PSC
if ((seat === true) && (psc === false)) {
var taskjson =
{ „piece“:
{
„location_type“:“FTP“,
„comment“:“Automatic backup “ + backupDateTime ,
„location“:“ftp://“+ftpHost+“/appliancebackup/“+backupDateTime+“/“+appliance+“/“,
„location_user“:ftpUser,
„location_password“:ftpPassword,
„parts“:[„common“,“seat“] //backup both Inventory and Confgiuration and SEAT-part
}
}
}
else
{
var taskjson =
{ „piece“:
{
„location_type“:“FTP“,
„comment“:“Automatic backup “ + backupDateTime ,
„location“:“ftp://“+ftpHost+“/appliancebackup/“+backupDateTime+“/“+appliance+“/“,
„location_user“:ftpUser,
„location_password“:ftpPassword,
„parts“:[„common“] //only backup the mandatory common part with Inventory and Configuration
}
}
}

//create a backup job
request = restHosts[hostCounter].createRequest(„POST“, „https://“ + appliance + „/rest/appliance/recovery/backup/job“, JSON.stringify(taskjson));
request.setHeader(„Accept“, „application/json“);
request.setHeader(„Content-Type“, „application/json“);
var response = request.executeWithCredentials(ssoUser, ssoPassword);
var jobid = JSON.parse(response.contentAsString).value.id;
//System.log(„response code: “ + response.statusCode);
//System.log(„response body: “ + response.contentAsString);
System.log(„backup job id: “ + jobid);

var status = „INPROGRESS“;
while (status == „INPROGRESS“) {
System.sleep(10000);
request = restHosts[hostCounter].createRequest(„GET“, „https://“ + appliance + „/rest/appliance/recovery/backup/job/“ + jobid, „“);
request.setHeader(„Accept“, „application/json“);
response = request.executeWithCredentials(ssoUser, ssoPassword);
status = JSON.parse(response.contentAsString).value.state;
//System.log(„response code: “ + response.statusCode);
//System.log(„status: “ + status);
//System.log(„response body: “ + response.contentAsString);
}

System.log(„Completion status: “ + status);

source: http://www.vmwarebits.com/vcenterbackup

 

Upgrade vSphere 6.0 to vSphere 6.5

Migrating Windows vCenter Server 6.0 to vCenter Server Appliance 6.5

You can migrate a vCenter Server instance with Platform Services Controller (version 6.0) to a vCenter Server Appliance 6.5 instance with an embedded Platform Services Controller appliance. In this case the software migrates the vCenter Server instance and the Platform Services Controller instance at the same time.

vCenter Server 6.0 on Windows with embedded Platform Services Controller shown migrating to vCenter Server Appliance 6.5 with embedded Plaform Services Controller 6.5 on Photon

vCenter Data Migration and it’s preservation.
Optional you can also migrate Events, Tasks and Performance to the new vCenter Appliance

 

VMWare Migration Assistant, will help you to collect all informations and migrate your vCenter.
You can find it, on the installation CD, „/migration-assistant/VMWare-Migration-Assistant“
We need some informations:
Administrator Password
vCenter Server Service Account and Password

 

Migration Steps

  1. vCenter Server Appliance UI Installer
  2. FQDN for the Source Windows Server
  3. Validate and Accept
  4. Select Deployment size

You can find the „vCenter Server Appliance UI Installer“ on the installation CD, „/vcsa-ui-installer/win32/installer“

 

SOURCES AND INFORMATIONS:

Migrating vCenter Server for Windows to vCenter Server Appliance
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.upgrade.doc/GUID-9A117817-B78D-4BBE-A957-982C734F7C5F.html

Example Migration Paths from vCenter Server for Windows to vCenter Server Appliance 6.5
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.upgrade.doc/GUID-E9E07D1C-0A10-443E-86E5-F94EA252CC9D.html

vCenter Server 6.0 Embedded Migration to Appliance
https://featurewalkthrough.vmware.com/#!/vsphere-6-5/vcenter-server-6-0-embedded-migration-to-appliance

Windows 2012 R2: EventID 45056

Eventviewer shows a Warning, LSA (LsaSrv) „Logon Cache“

EventID45056

Issue:
Logon cache was disabled. Intermittent authentication failures may result during periods of network latency or interrupts. Please contact your system administrator.

Cause:
This error will occur if the policy „Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Interactive logon: Number of previous logons to cache (in case domain controller is not available)“ is set to ‚0‘ in either the Local Security policy or via Group Policy.
This indicates that the cached logons feature in Windows Server 2008 has been disabled, or the Windows Server 2008 number of cached logons (default of 25) was exceeded.

Solution:
To fix this do one of the following:

1. Enable the Windows Server 2008 cached logons.
2. Increase the Windows Server 2008 number of cached logons from the default of 25

Cached logon information is controlled by the following key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Winlogon\
ValueName: CachedLogonsCount

 

Huawei P8, Versteckte Funktion: Schrittzähler aktivieren

Versteckte Funktion: Schrittzähler aktivieren

Glücklicherweise ist diese Funktion noch im System integriert.
Sie ist nur versteckt.

Hier zeigen wir euch, wie ihr diese Funktion dennoch komfortabel
nutzen könnt:

4.1 Aus dem Play Store die kostenlose App „QuickShortcutMaker
installieren und öffnen.
Mit diesem genialen Tool lassen sich Verknüpfungen auf den
Startbildschirm legen.
4.2 Nun unter „Aktivitäten“, nach unten scrollen und „Einstellungen“ auswählen.
4.3 Nun nach unten scrollen bis fast am Ende alle „System-Einstellungen“ (drehrad Symbol), die Einstellung „CalculatorSettingsActivity“ auswählen.

Uploaded with Directupload Image Sharer

4.4 Nun kann man der Verknüpfung (Shortcut) einen eigenen Namen
vergeben.
Hierfür auf den von QuickShortcutMaker vorgeschlagenen Namen
„Einstellungen“ klicken, einen beliebigen Namen eingeben und mit Klick auf „Erstellen“ bestätigen.

 

So sieht der Schrittzähler dann aus!

Uploaded with Directupload Image Sharer

Quelle: Huawei P8 — Schrittzähler aktivieren

 

Huawei P8, Versteckte Funktion: Datenverbrauchs-Begrenzung aktivieren

Versteckte Funktion: Datenverbrauchs-Begrenzung aktivieren

Viele von Euch haben eine Datenbegrenzung bei Mobilen Daten, bei der die Geschwindigkeit gedrosselt wird oder teilweise sogar zu höheren Kosten führen kann.
Hierfür hat Huawei eine Funktion in den Einstellungen integriert.
Beim P8 ist diese aus unbekannten Gründen nicht vorhanden.
Glücklicherwiese ist diese Funktion noch im System integriert.
Sie ist nur versteckt.

Hier zeigen wir euch, wie ihr diese Funktion dennoch komfortabel
nutzen könnt:

4.1 Aus dem Play Store die kostenlose App „QuickShortcutMaker
installieren und öffnen.
Mit diesem genialen Tool lassen sich Verknüpfungen auf den
Startbildschirm legen.
4.2 Nun im Suchfeld „Datenverbrauch“ eingeben und bestätigen

4.3 Es sollte ein Treffer angezeigt werden. Diesen bitte mit einem Klick darauf wählen

4.4 Nun kann man der Verknüpfung (Shortcut) einen eigenen Namen
vergeben.
Hierfür auf den von QuickShortcutMaker vorgeschlagenen Namen
„Einstellungen“ klicken, einen beliebigen Namen eingeben und mit Klick auf „OK“ bestätigen.

4.5 Abschließend die Verknüpfung mit Klick auf „Erstellen“ unten rechts bestätigen.

4.6 Nun sollte im Startbildschirm auf der Seite ganz links eine neue
Verknüpfung aufgetaucht sein, die den eingetragenen Namen aufweist.

4.7 Mit einem Klick auf diese Verknüpfung öffnet sich die neue Funktion
Hier könnt ihr die Begrenzung („Limit“) aktivieren und durch Schieben des Zeigers das gewünschte Limit einstellen.

Quelle: Huawei-Info – Tipps & Tricks für das Huawei P8