Archive

Archive for the ‘Hyper-V’ Category

Hyper-V: Extra Rechte auf Hyper-V für Nicht-Adminuser einrichten

January 22nd, 2012 No comments

user-adminGrundsätzlich darf auf einen Hyper-V Server nur ein Administrator zugreifen (Mitglied der lokalen Administratorengruppe). Setzt man den System Center Virtual Machine Manager (SCVMM) ein, so ermöglicht dieser einem u.a. ein rollenbasiertes Management. Dabei erfindet er das Rad nicht neu, sondern setzt ein Feature des Hyper-Vs ein, dass in meinen Augen zwar gut dokumentiert aber relativ unbekannt ist.

Dazu verwendet Hyper-V das rollenbasierte Accessmanagement (RBAC) und die dafür verfügbare GUI AzMan. Die Konfigurationsinformationen werden in einer XML Datei unter ProgramData\Microsoft\Windows\Hyper-V\InitialStorage.xml abgelegt. Achtung: Verwendet man den VMM Agent, so wird der Ort der XML Datei auf ProgramData\microsoft\Virtual Machine Manager\HyperVAuthStore.xml geändert!

Ich beschreibe hier die Vorgehensweise, wie man einer zusätzlichen benutzergruppe das Recht einräumen kann auf die Konsole der Virtuellen Maschinen zugreifen zu können:

Zuerst startet man die AzMan Konsole:

image

Read more…

SCVMM: mit Powershell Teil 1

December 4th, 2011 No comments

Ich habe gerade das Glück etwas mehr mit Powershell und System Center Virtual Machine Manager 2012 (SCVMM, RC) zu arbeiten. Daher werde ich hier wieder ein paar Codesnippsel posten, um bestimmte Funktionen zu automatisieren:

die erste Funktion soll eine neue Cloud für Hyper-V erzeugen . Zusätzlich wird ein neue Rolle für diese Cloud angelegt, die nur VMs verwalten darf.

#creates a new cloud and a corresponding usergroup
function createCloud([string]$name,[string]$hostgroupname)
{
   #retrieving first GUID for creating the new cloud
     $job= ([System.Guid]::NewGuid().toString())
   #define Cloud limitations (here: no limit)
     Set-SCCloudCapacity -JobGroup $job -UseCustomQuotaCountMaximum $true -UseMemoryMBMaximum $true -UseCPUCountMaximum $true -UseStorageGBMaximum $true -UseVMCountMaximum $true
   #setting the used network (here: the network has the same name as the cloud)
     $resources = @()
     $resources += Get-SCLogicalNetwork -Name $Name
   #defining that the cloud can be used on hyper-v server
     $addCapabilityProfiles = @()
     $addCapabilityProfiles += Get-SCCapabilityProfile -Name "Hyper-V"
   #adding the settings to the cloud with the defined GUID
     Set-SCCloud -JobGroup $job -RunAsynchronously -AddCloudResource $resources -AddCapabilityProfile $addCapabilityProfiles
   #adding the cloud to the hostgroup
     $hostGroups = @()
     $hostGroups += Get-SCVMHostGroup -Name $hostgroupname
   #creating the cloud and the rest from the first job :-)
     New-SCCloud -JobGroup $Job -VMHostGroup $hostGroups -Name $Name -RunAsynchronously

#creating the usergroup
   #GUID for the second job
     $job= ([System.Guid]::NewGuid().toString())
   #the roleis for the newly created cloud
     $scopeToAdd = @()
     $scopeToAdd += Get-SCCloud -name $name
   #the user of this role can start, stop and shutdown virtual machines in the cloud and start a remote control
     Set-SCUserRole -JobGroup $job -AddScope $scopeToAdd -Permission @("RemoteConnect", "Shutdown", "Start", "Stop") -ShowPROTips $false
     $cloud = Get-SCCloud -Name $name
   #add all settings to the role
     Set-SCUserRoleQuota -Cloud $cloud -JobGroup $job -QuotaPerUser -UseCPUCountMaximum -UseMemoryMBMaximum -UseStorageGBMaximum -UseCustomQuotaCountMaximum -UseVMCountMaximum
   #create the role with the job guid
     New-SCUserRole -Name $name -UserRoleProfile "SelfServiceUser" -Description "" -JobGroup $job
}

Die Funktion kann einfach per


createCloud "MeineCloud" "Alle Hosts"

aufgerufen werden.

EventID 21502 im Hyper-V Cluster

August 11th, 2011 No comments

Als Ergänzung vom Blog-Eintrag Re-Import von VMs folgt eine Lösung, wenn nach einem Re-Import die Maschine im Cluster nicht startbar ist. Die Detailansicht im Cluster-Manager sieht wie im nachfolgenden Bild aus:

image001-hv

Die Konfiguration sollte eigentlich immer Online sein. Sie steht für die Registrierung der Virtuellen Maschine auf dem jeweiligen Hyper-V Knoten.
Read more…

Categories: Deutsch, Hyper-V Tags: , ,

SCVMM/Hyper-V: Löschen von VMs

May 19th, 2011 No comments

timerKann mir einer das mal erklären? Löscht man in Hyper-V eine VM, die Snapshots hat, dann werden erst alle Snapshots gelöscht, also in das Hauptfile zurückgeschrieben und dann die entsprechende Disk. Was für einen Sinn macht das?

Besonders extrem wird es, wenn man ein Storage Migration mit SCVMM (System Center Virtual Machine Manager 2012) macht. Dabei wird eine neue VM angelegt, die Disks kopiert und dann die alte VM mit den Disks gelöscht. Was dann bei einer VM mit Snapshots passiert kann man sich denken:

Ansicht des Jobs im SCVMM 2012:

scvmm

Wie man sieht wurden die Disks innerhalb 3 Minuten kopiert und jetzt (ca. 14:05) hängt er immer noch beim Entfernen der VM.

In der Hyper-V Konsole sieht es zu dem Zeitpunkt so aus:

hyper-v

Destroying ist bei 25% Smiley

Ich kann mir den Sinn davon nicht erklären. Vielleicht irgendein anderer hier??

Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment

May 15th, 2011 No comments

checkmarkIf you want to know if it is supported to run the SQL Server in a virtualized environment than this is the right article for you:

http://support.microsoft.com/kb/956893/en-us

Summaries:

  1. SQL 2005 or higher is supported on Hyper-V or a hypervisor validated in the SVVP program
  2. Snapshots of the VM are NOT supported.
  3. Hyper-V Dynamic Memory is supported but only useful with SQL Server version Enterprise and Datacenter

Categories: English, Hyper-V Tags: , ,

Re-Import VMs into Hyper-V

May 3rd, 2011 2 comments

toolsNormaly you can only import a Virtual Machine (VM) into Hyper-V if you have exported it. If you lose your Hyper-V settings or have to import it into a new Hyper-V Server in case of a desaster recovery than you can use the steps descripted in this (and other) blog post: http://blogs.msdn.com/b/robertvi/archive/2008/12/19/howto-manually-add-a-vm-configuration-to-hyper-v.aspx

The problem is that you have to handle many long pathes and cryptical GUIDs. I had to do that for a bunch of different VMs and being chronical lacy I created three batch files for it:

  1. importVM.cmd “GUID” “Path to Virtual Machine” creates the link and corrects the permissions on the link and the vm folder
  2. importSnapshot.cmd “SnapshotGuid” “VMGuid” “Path to Snapshot” creates the snapshot link and the right permission.

Not very impressiv? Well, the third batch files combines this two scripts:

  1. addMachine.cmd: Takes the basis path (the path where the sub-folder Virtual Machine, Snapshots exists) and extracts the VM-GUID, all Snapshots-GUIDs and the other pathes to automaticly create the links and permissions.

So with one simple command (addMachine.cmd C:\ClusterStorage\Volume4\VM1) you can import the complete VM.

— addMachine.cmd ——

Read more…

Definieren des zu verwendenden Netzwerkes für LiveMigration

March 15th, 2011 No comments

icon-17In einigen Fällen möchte man definieren, welche Netzwerkkarte(n) ein Hyper-V Cluster für die Übertragung der RAM Inhalte bei einer Live Migration verwenden soll.

Diese Option ist in der Cluster Konsole relativ versteckt und kann pro Virtueller Maschine definieren. Damit ich sie beim nächsten Mal wiederfinde dokumentiere ich sie mal hier:

Zuerst schaut man sich in der Clusterkonsole die Details einer Virtuellen Maschine an:

LiveMigrationNetzwerk1

Danach öffnet man die Eigenschaften der Clusterressource (im Bild blau markiert).

In diesem Dialog kann man auf der Registerkarte die zu verwendenden Netzwerke und auch deren Priorität auswählen.

LiveMigrationNetzwerk2

Categories: Deutsch, Hyper-V Tags: , ,

Windows 2008 R2 SP1 Beta – Dynamic Memory

July 22nd, 2010 No comments

gkrellm2 Einige der wenigen Neuerungen im Service Pack 1 für Windows 2008 R2 ist Dynamic Memory für die Hyper-V Rolle. Eine gute Erklärung findet man unter http://blogs.technet.com/b/virtualization/archive/2010/07/12/dynamic-memory-coming-to-hyper-v-part-6.aspx.

Zum Testen habe ich einen der Hyper-V Server Knoten im Cluster mit der Betaversion ausgestattet. Wie im Artikel oben beschrieben wird das Verändern des genutzten Speichers durch die Gast-OS durchgeführt. Dazu scheint Microsoft ein neues Device in den VMBus einzuhängen.

Da es ein neues Feature ist, findet die VM mit Windows 2008 Server SP2 noch keinen Treiber dafür. Ich werde daher weiterprobieren :-)

vmBUS

Categories: Deutsch, Hyper-V Tags: , , ,

Kostenloses eBook über Microsoft Virtualisierung

February 28th, 2010 No comments

icon-10

 

Microsoft Press hat sein kostenloses eBook über Server und Desktop Virtualisierung auf Windows 2008 R2 aktualisiert. Es enthält u.a. Themen bezüglich

  1. Servervirtualisierung
    • Hyper-V
    • Neuigkeiten mit Hyper-V in R2
  2. Local Desktop Virtualisierung
    • Windows XP Mode
    • App-V
    • Med-V
    • Windows Virtual PC
  3. Remote Desktop Virtualisierung
    • Remote Desktop Service
    • App-V for RDS
    • VDI
  4. Virtualization Management
  5. Cloud Computing

Ich habe mir mal das VDI Kapitel genau durchgelesen, um zu schauen, ob ich noch relevante Punkte für meinen VDI Vortrag nächste Woche finde. Es ist als Einstieg in die Materie gut geschrieben und hat darüber hinaus viele Links und einige interessante weiterführende Informationen.

    Herunterzuladen ist das Buch als PDF oder XPS unter:

http://blogs.msdn.com/microsoft_press/archive/2010/02/16/free-ebook-understanding-microsoft-virtualization-r2-solutions.aspx

Categories: Deutsch, Hyper-V, Windows Tags: ,