Freitag, 8. Oktober 2010

Hyper-V Server mit Windows 7 RC Client


Dieser Post wird sicher länger….
  • Los gehts mit der Hardware: Ein Server mit 4 GB RAM und einen Quad-Core XEON (E5310) Prozessor. Im BIOS die “Virtualisation Technology” Option aktivieren.
  • Von der Microsoft Website den kostenfreien Hyper-V Server 2008 R2 herunterladen und auf DVD brennen und installieren.
  • Erste Falle: Für die erste Anmeldung nach der Installation als Benutzername “Administrator” und kein Kennwort eingeben. Im nächsten Bildschirm wird man dann aufgefordert ein Kennwort für den Administrator-Account zu vergeben.
  • Es wird ein leerer Desktop mit einem schwarzen Fenster (normale “Eingabeaufforderung”) und einem blauen Fenster (verfügbare Hyper-V Server Befehle) angezeigt. In dem blauen Fenster Arbeitsgruppen-Name (ich habe den Server nicht in die Domain gehängt) und Computername anpassen sowie Remotedesktop aktivieren.
  • Am Client erst mal Windows 7 RC (32 Bit) herunterladen. Da ich hier an einem Mac sitze, habe ich mit Parallels eine neue virtuelle Maschine direkt aus der heruntergeladenen ISO-Datei installiert. “Parallels Tools” installiert und Windows Update laufen gelassen.
  • Um der Userproblematik aus dem Weg zu gehen habe ich Server und Client in die gleiche Arbeitsgruppe gehängt und melde mich jeweils mit dem Benutzer “Administrator” (dieser Benutzer ist unter Windows 7 standardmäßig deaktiviert) und dem gleichen Kennwort lokal an.
  • Über die “Remotedesktopverbindung” kann man jetzt auf den Hyper-V Server zugreifen. Natürlich bekommt man auch auf diesem Weg nur die beiden oben erwähnten schwarzen und blauen Fenster zu sehen.
  • Um den Hyper-V Server administratieren zu können, müssen als Erstes die “Remote Server Administration Tools (RSAT) for Windows 7 RC” installiert werden. Das Problem hier war es, den Download zu finden. Alle im Netz gefundenen Links zeigen auf den Download für die Beta-Version von Windows 7, und den gibt es nicht mehr. Aber ich habe ihn gefunden! Wenn der Installer gelaufen ist, kann man über “Systemsteuerung – Programme – Windows Features aktivieren” und dann “Remoteserver-Verwaltungstools – Rollenverwaltungstools” die “Hyper-V Tools” hinzufügen.
  • Jetzt fehlen noch einige Berechtigungseinstellungen, die von John Howard (Microsoft) ausführlich in seinem Blog beschrieben werden. Um dieses ziemlich komplexe Thema zu vereinfachen, hat er ein Script(Version 0.7) geschrieben, das auf dem Server (z.B. per USB-Stick) und auf dem Client ausgeführt werden kann. Mit “cscript HVRemote.wsf /show” kann man sich jeweils die aktuelle Konfiguration anzeigen lassen. Dabei werden am Ende auf gleich Hinweise auf Konfigurationsprobleme angezeigt. Bei mir mussten am Server keine, am Client hingegen gleich zwei Änderungen vorgenommen werden: “cscript HVRemote.wsf /mmc:enable” und “cscript HVRemote.wsf /anondcom:grant”. Danach den Client neu starten.
  • Jetzt kann über das Startmenü der “Hyper-V Manager” gestartet werden. Darin dann mit “Verbindung mit einem Server herstellen…” eben dies tun, wobei auch hier wieder eine böse Falle lauert: Der Zugriff über die IP-Adresse klappt nicht, es muß hier der Servername verwendet werden!
  • Dann zuerst über “Manager für virtuelle Netzwerke…” ein neues virtuelles Netzwerk definieren und mit diesem dann über “Neu – Virtueller Computer…” einen neuen virtuellen Computer erstellen.
  • Windows Server 2008 Standard x64 lies sich so problemlos installieren, aber die virtuelle Netzwerkkarte wurde nicht erkannt. Es wurden diverse Geräte mit Ausrufezeichen im Gerätemanager angezeigt. Dieses Problem lässt sich durch Ausführen des Befehls “Installationsdatenträger für Integrationsdienste einlegen” im Menü “Aktion” des Hyper-V-Managers beheben. Der Installer läuft durch, die virtuelle Machine startet neu und schon gibt es keine unbekannte bzw. problematische Hardware mehr!
  • Zurück zum Hyper-V-Server. Wie administriert man so einen Core Server? Eigentlich ganz einfach, indem man an einem anderen PC  in der Computerverwaltung (rechte Maustaste auf Arbeitsplatz – Verwalten) über den Befehl “Verbindung mit anderem Computer herstellen …” (im Menü “Aktion”) den Hyper-V-Server lädt. Nur klappt das erst mal nicht, weil die Firewall am Hyper-V-Server diesen Zugriff nicht zulässt.
  • Daniel Petri hat auf seiner sehr guten Website beschrieben, wie man am Hyper-V-Server über die Command Line die entsprechende Firewall-Regelgruppe aktiviert. Nur heißt die Gruppe auf einem deutschen Server anders und auf der Website werden im Text geschweifte Anführungszeichen verwendet, die beim simplen Kopieren zu Fehlermeldungen führen! Hier der korrekte Befehl:
    Netsh advfirewall firewall set rule group=”Remoteverwaltung” new enable=yes
    Auf seiner Website beschreibt Petri auch, wie man nach Eingabe von
    netsh advfirewall set currentprofile settings remotemanagement enable
    die Firewall auf dem Hyper-V-Server von Remote administriert, aber diese Option habe ich aus Sicherheitsgründen wieder deaktiviert.
  • Damit kann man in der Computerverwaltung auf fast alle Funktionen des Hyper-V-Servers zugreifen. Was so noch nicht funktioniert ist der Gerätemanager. Dazu muss auf dem Hyper-V-Server eine lokale Policy (Computerkonfiguration – Administrative Vorlagen – System – Geräteinstallation – Allow remote access to the Plug and Play interface) gesetzt werden, was von einem Remotesystem aus mit MMC Snap In “Gruppenrichtlinienobjekt-Editor” einfach möglich ist.


Disabling the firewall in Windows Server 2008 Core Edition


For Windows Server 2008’s Core Edition, the default firewall configuration is one of the things most administrators want to turn off after installation. You can complete this task with one line of code, which you’ll want to add to your script arsenal.
—————————————————————————————————————
The use cases for Windows Server 2008 Core Edition include additional security for certain installation sites and networks, and certain products (e.g., the free Hyper-V role) are only available on core editions. In Windows Server 2008 systems, including the core installations, the Windows Firewall is enabled by default. For many administrators, the first step of a new Windows installation is to disable the Windows Firewall. You can do this with the following Netsh command:
[netsh advfirewall set allprofiles state off]
Now the Windows Firewall is disabled for all network profiles. You can tweak the parameters to within what is run from Netsh. To determine what commands are available for Netsh, simply go into Netsh and enter a question mark (?) in one of the interactive contexts. Figure A shows the advfirewall context.
Figure A
Figure A
Visit TechNet for more information about Netsh in the advfirewall context.


Remote Management with Server Manager



Applies To: Windows Server 2008 R2
In Windows Server® 2008 R2, you can use Server Manager to perform some management tasks on remote computers. To manage a computer remotely by using Server Manager, you connect Server Manager to a remote computer in the same manner you would connect Microsoft Management consoles (MMCs) for other technologies.

Supported remote management scenarios

The following remote management scenarios are supported from Server Manager in Windows Server 2008 R2.
  • Server to server   Server Manager on a full installation of Windows Server 2008 R2 can be used to manage roles and features that are installed on another server that is running Windows Server 2008 R2.
  • Server to Server Core   Server Manager on a full installation of Windows Server 2008 R2 can be used to manage roles and features that are installed on a Server Core installation of Windows Server 2008 R2.
  • Client to server   Server Manager is installed as part of Remote Server Administration Tools on a computer that is running Windows® 7. This can be used to manage roles and features on a computer that is running either the full or Server Core installations of Windows Server 2008 R2.



If you are managing a remote computer from a computer that is running Windows 7, start the Windows Remote Management (WinRM) service to allow for the addition of trusted hosts. Open a Command Prompt session with elevated user rights by clicking Start, clicking All Programs, clicking Accessories, right-clicking Command Prompt, and then clicking Run as administrator. Type the following, and then press Enternet start winrm
For remote connections in a Workgroup to Workgroup/Domain scenario, the remote computer must be added to the trusted hosts list on the source computer. To do this, run the following command on the source computer in a Command Prompt window that is opened with elevated user rights.
winrm set winrm/config/client @{TrustedHosts="RemoteComputerName"}
For remote connections in a Workgroup to Workgroup/Domain scenario, if a user is not logged on by using the source computer’s built-in administrator account, the following WinRM registry key must be configured to allow remote access from the source computer. This change is required because of a User Account Control (UAC) limitation on non-administrator accounts that are members of the Administrators group. To change this registry key, run the following command on the source computer at a command prompt that is opened with elevated user rights.
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
By default, WinRM allows for a maximum of five connections to a remote computer to be active per user. To increase the limit, run the following command on the source computer, in which X represents the number of connections that you want to allow, at a command prompt that is opened with elevated user rights.
winrm s winrm/config/winrs @{MaxShellsPerUser="X"}



To configure Server Manager remote management by using Windows PowerShell
  1. On the computer that you want to manage remotely, open a Windows PowerShell session with elevated user rights. To do this, click Start, click All Programs, click Accessories, click Windows PowerShell, right-click the Windows PowerShellshortcut, and then click Run as administrator.
  2. In the Windows PowerShell session, type the following, and then press Enter.
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  3. Type the following, and then press Enter to enable all required firewall rule exceptions.
    Configure-SMRemoting.ps1 -force -enable
To configure remote management on the Server Core installation option of Windows Server 2008 R2
  1. On the computer that you want to manage remotely, at the command prompt that opens by default when a member of the Administrators group logs on to the computer that is running the Server Core installation option of Windows Server 2008 R2, type the following, and then press Enter.
    Dism.exe /Online /Enable-Feature /FeatureName:NetFx2-ServerCore /FeatureName:MicrosoftWindowsPowerShell /FeatureName:ServerManager-PSH-Cmdlets /FeatureName:BestPractices-PSH-Cmdlets
  2. After the installation has completed, close all applications, and then restart the computer.
    To verify that Windows PowerShell and cmdlets for Server Manager and Best Practices Analyzer are installed, try entering the oclist command, which returns a list of all Windows features that are installed on the computer.
  3. After the operating system has finished loading, log on to the computer as, at minimum, a member of the local Administrators group.
  4. In the Command Prompt window that opens after you have logged on to the computer, type the following to open a Windows PowerShell session, and then press Enter.
    powershell
  5. In the Windows PowerShell session, type the following, and then press Enter.
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  6. Type the following, and then press Enter to enable all required firewall rule exceptions.
    Configure-SMRemoting.ps1 -force -enable

Keine Kommentare:

Kommentar veröffentlichen

Rename Onedrive Business root folder

Rename Onedrive Business root folder Here is what I remember: In the Office 365 web admin pages, change the organization name to a shorte...