Hyper-V Rolle installieren
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
Get-WindowsFeature -Name Hyper-V
Virtuelle Switches erstellen
Get-NetAdapter | Select Name,Status,MacAddress
# Externen Switch
New-VMSwitch -Name "Extern-Switch" -NetAdapterName "Ethernet0" -AllowManagementOS $true
# Internen Switch
New-VMSwitch -Name "Intern-Switch" -SwitchType Internal
Get-VMSwitch | Select Name,SwitchType
VM erstellen (Generation 2)
New-VM -Name "Ubuntu-Server" `
-Generation 2 `
-MemoryStartupBytes 4GB `
-SwitchName "Extern-Switch" `
-Path "D:VMs"
Set-VMMemory -VMName "Ubuntu-Server" `
-DynamicMemoryEnabled $true `
-MinimumBytes 1GB `
-MaximumBytes 8GB
Set-VMProcessor -VMName "Ubuntu-Server" `
-Count 4 `
-ExposeVirtualizationExtensions $true
New-VHD -Path "D:VMsUbuntu-ServerSystem.vhdx" -SizeBytes 80GB -Dynamic
Add-VMHardDiskDrive -VMName "Ubuntu-Server" -Path "D:VMsUbuntu-ServerSystem.vhdx"
Set-VMFirmware -VMName "Ubuntu-Server" -SecureBootTemplate "MicrosoftUEFICertificateAuthority"
Start-VM -Name "Ubuntu-Server"
VM-Verwaltung und Snapshots
Get-VM | Select Name,State,CPUUsage,MemoryAssigned,Uptime
Checkpoint-VM -Name "Ubuntu-Server" -SnapshotName "Vor-Update-2025-06"
Get-VMSnapshot -VMName "Ubuntu-Server"
Restore-VMSnapshot -Name "Vor-Update-2025-06" -VMName "Ubuntu-Server" -Confirm:$false
Live-Migration
Enable-VMMigration
Set-VMHost -VirtualMachineMigrationAuthenticationType Kerberos
Add-VMMigrationNetwork -Subnet "192.168.100.0/24" -Priority 1
Move-VM -Name "Ubuntu-Server" `
-DestinationHost "hyper-v-host2.firma.local" `
-DestinationStoragePath "\hyper-v-host2VMs"
Hyper-V Replica
Set-VMReplicationServer -ReplicationEnabled $true -AllowedAuthenticationType Kerberos
Enable-VMReplication -VMName "Ubuntu-Server" `
-ReplicaServerName "dr-host.firma.local" `
-ReplicaServerPort 80 `
-AuthenticationType Kerberos `
-CompressionEnabled $true `
-RecoveryHistory 5
Start-VMInitialReplication -VMName "Ubuntu-Server"
FAQ
Wie viele VMs kann Hyper-V auf Windows Server 2025 hosten?
Limitiert durch Hardware. Faustregel: 1 vCPU je 2 physische Cores, 4–8 GB RAM pro VM.
Fazit
Hyper-V 2025 ist für Microsoft-Umgebungen die natürliche Wahl: kein Lizenz-Aufpreis und vollständige PowerShell-Verwaltung.
Hyper-V für KMU in Heidelberg, Mannheim und der Rhein-Neckar-Region. Beratung anfragen.