SCAC – System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure

Ich habe mal wieder eine kleine Anforderung. Und zwar benötig ich mal eben in Windows Azure eine Windows 7 Client Maschine. Das Problem ist nur, dass man in Windows Azure keine Windows Clients mit den zur Verfügung gestellten Templates erzeugen kann. Ich bin also gezwungen meine eigenes Windows 7 Client VHD nach Windows Azure hochzuladen.
Es gibt mehrere Wege wie man dieses Ziel erreichen kann. Ich habe aus unterschiedlichen Gründen heraus dafür entschieden, den Weg über den System Center App Controller zu gehen.
Zu diesem Zweck ein 3-Teiliger Blog-Artikel.

  1. Grundinstallation System Center App Controller 2012 R2
  2. Grundkonfiguration des System Center App Controller 2012 R2
  3. Upload der VHD nach Windows Azure mit dem System Center App Controller 2012 R2

Beginnen wir mit Teil 1: Grundinstallation System Center App Controller 2012 R2

Die Installation läuft recht entspannt. Ich in meinem Szenario einen komplett frischen Windows Server 2012 R2 als Basis genommen und keine weiteren Rollen installiert.
Bevor man die System Center App Controller 2012 R2 Installation anschmeißt, sollten 2 Dinge vorbereitet werden.
Es wird lokal eine installierte SCVMM 2012 R2 Konsole benötigt und es muss, lokal oder remote, ein verwendbarer SQL Server vorhanden sein. In meinem Fall verwende ich einen lokal installierten SQL Server 2012.

Im Folgenden mehr oder weniger unkommentiert die Screenshot Schlacht.
Wie in letzter Zeit immer häufiger, mache ich zu eigenen Dokumentationszwecken von jedem Installationsfenster einen Screenshot, so kann man auch später nochmal auf sämtliche möglichen Einstellen schauen auch wenn ich mich bei der Erstinstallation an viele Vorgabewerte gehalten habe.

Das App Controller-Setup: Vielmehr als auf Installieren klicken kann man da nicht.SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC1 - 1

Die Aufforderung zur Eingabe des Produkt Schlüssels:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC2 - 2

Die obligatorischen Lizenzbedingungen. Einmal lesen, eine Nacht drüber schlafen, und am nächsten Tag mal gucken ob man das wirklich machen will.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC3 - 3

Es erfolgt eine Hardware und Software Prüfung:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC4 - 4

Im ersten Durchlauf hatte ich die SCVMM 2012 R2 Konsole vergessen. Die Fehlermeldung sieht dann so aus. Also besser schon im Vorfeld daran denken.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC5 - 5

Der benötigte IIS und WCF Data Services 5.0 werden automatisch von der Setuproutine konfiguriert.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC6 - 6

Der Standard Installationspfad:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC7 - 7

Hier in meiner Testumgebung möchte ich schnell zum Ziel kommen, verwende also das Netzwerkdienstkonto. In einer Produktiv Umgebung empfiehlt es sich, ein Domänendienstkonto zu verwenden:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC8 - 8

Auch hier zum schnellen Vorankommen, ein selbstsigniertes Zertifikat.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC9 - 9

Die SQL Server-Datenbank Konfiguration. Hier ein vorinstallierter lokaler SQL Server mit Standardinstanz:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC10 - 10

Die obligatorische Frage:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC11 - 11

Die Zusammenfassung und Bestätigung zum Beginn der eigentlichen Installation:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC12 - 12

Die eigentliche Arbeit und der Fortschrittsbalken:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC13 - 13

Die Meldung über das erfolgreich abgeschlossene Setup:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC14 - 14

Teil 2: Grundkonfiguration des System Center App Controller 2012 R2
Die URL des SCAC muss ggf. der Zone lokales Intranet hinzugefügt werden, damit man an die Seite auch heran kommt.
Auch die Konsole des SCAC 2012 R2 liegt als Silverlight Konsole vor:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC15 - 15

Nachdem Silverlight installiert ist, kann die Anmeldung erfolgen:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC16 - 16

Die leere System Center App Controller 2012 R2 Konsole:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC17 - 17

Die Verbindung zu einem SCVMM 2012 R2 geht denkbar einfach von statten. Servername, Fertig!
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC18 - 18

Allerdings sieht man im SCAC 2012 R2 erst dann VMs aus dem SCVMM 2012 R2, wenn man im SCVMM eine rudimentäre Private Cloud angelegt hat und die VMs im SCVMM dieser Private Cloud zugeordnet hat.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC19 - 19

Verbindung mit Windows Azure
Die geschützte Verbindung zwischen dem System Center App Controller SCAP und einem Windows Azure Abonnement wird mit einem Management Zertifikat erstellt. Für dessen Existenz muss man selber sorgen. Das Zertifikat muss erstellt und zwei Mal exportiert werden.
Einmal inkl. privaten Schlüssel (Passwort geschützt) als .pfx Datei und einmal nur mit öffentlichem Schlüssel als .cer Datei.
Das Zertifikat wird mit dem Kommandozeilenwerkzeug makecert.exe erzeugt. Dieses ist beispielsweise Teil des Windows 8.1 SDK. Hier zu finden: http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx
Zunächst muss also dafür gesorgt werden, dass „makecert“ zur Verfügung steht. Also wird das Windows Kit Windows 8.1 SDK mit den minimal notwendigen Funktionen installiert.
Das ist in diesem Fall das Windows App Certification Kit.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC20 - 20

Bei Verwendung der Standard-Installations-Parameter, ist das Tool Makecert anschließend in folgendem Pfad zu finden: Program Files (x86)\Windows Kits\8.1\bin\x64 

Das Zertifikat wird mit folgendem Befehl in einer cmd mit erhöhten Rechten erstellt:
makecert -sky exchange -r -n „CN=<CertificateName>“ -pe -a sha1 -len 2048 -ss My „<CertificateName>.cer“
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC21 - 21

Das Zertifikat wird im persönlichen Zertifikatspeicher des Benutzerkontos gespeichert:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC22 - 22

Das Zertifikat kann nun 2 Mal exportiert werden. einmal als .cer und einmal als .pfx Datei inkl. privatem Schlüssel:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC23 - 23

Der Export erfolgt über die Schaltfläche „In Datei kopieren…“ in der Zertifikatansicht in der Zertifikatkonsole.
Die .pfx Datei kann nun verwendet und damit eine Verbindung zu einem Azure Abonnement aus dem System Center App Controller heraus hergestellt werden.SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC24 - 24

Es dauert dann eine Weile und es tut etwas. Es ist noch wichtig, dass das .cer Zertifikat mit dem öffentlichen Schlüssel zu Windows Azure hochgeladen wird. Ansonsten gibt es eine ärgerliche Fehlermeldung: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC25 - 25

Und genau diese Verbindung wird in dem Windows Azure Portal unter Einstellungen | Verwaltungszertifikate erzeugt, indem das öffentliche Zertifikat hochgeladen wird.
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC26 - 26

Das Ergebnis:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC27 - 27

Von nun an kann ich meine Windows Azure Elemente die VM relevant sind in den System Center App Controller sehen:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC28 - 28

Teil 3: Upload einer VHD nach Windows Azure mit dem System Center App Controller 2012 R2

Jetzt möchte ich noch eine vorbereitete VHD nach Windows Azure hoch laden.
Das tue ich in meinem Fall aus einer Dateifreigabe aus dem LAN heraus. Diese kann in den SCAC 2012 R2 eingebunden werden.
Voraussetzungen: Zum aktuellen Zeitpunkt werden in Windows Azure ausschließlich VHD mit fester Größe unterstützt. Sowohl vhdx generell als auch vhd mit dynamischer Größe sind unsupported.
Ich möchte eine 40GB große Windows 7 VHD von einer lokalen Dateifreigabe in den Azure BLOB Speicher hochladen. Dazu verwende ich in der System Center App Controller Web Konsole eine Copy/Paste Funktion:

Copy:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC29 - 29

Paste:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC30 - 30

Anschließend beginnt der Prozess des Uploads der VHD nach Windows Azure:
SCAC - System Center App Controller 2012 R2 Installation, Grundkonfiguration, Upload einer VHD nach Windows Azure - 050214 2200 SCACSystemC31 - 31