1. Installation
1.1. Server
-
Open Server Manager.
-
Select Add roles and features.
-
Click Next.
-
Choose Role-based or feature-based installation.
-
Click Next.
-
Choose Select a server from the server pool.
-
Click Next.
-
Check Hyper-V.
-
Check Include management tools (if applicable).
Remote Server Administration Tools Role Administration Tools Hyper-V Management Tools [Tools] Hyper-V Module for Windows PowerShell [Tools] Hyper-V GUI Management Tools ■ Include management tools (if applicable) -
Click Add Features.
-
Click Next.
-
Click Next.
-
Click Next.
-
Click Next.
-
Click Next.
-
Click Next.
-
Click Install.
-
Click Close.
-
Close Server Manager.
-
Restart the server.
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -match "hyper" } | Sort-Object -property FeatureName | Select-Object -Property FeatureName, RestartNeeded, State # Check Hyper-V Virtual Machine Management service is running. Get-Service | Where-Object { $_.Name -eq "vmms" } # Allow Hyper-V Manager to connect. Get-NetFirewallRule | Where-Object { $_.DisplayName -eq "Windows Remote Management (HTTP-In)" } | Enable-NetFirewallRuleFeatureName RestartNeeded State ----------- ------------- ----- HypervisorPlatform False Disabled Microsoft-Hyper-V False Enabled Microsoft-Hyper-V-Management-Clients False Enabled Microsoft-Hyper-V-Management-PowerShell False Enabled Microsoft-Hyper-V-Offline False Enabled Microsoft-Hyper-V-Online False Enabled RSAT-Hyper-V-Tools-Feature False Enabled
-
Start Local Users and Groups Manager (lusrmgr.msc).
-
Select Groups.
-
Double-click Administrators.
-
Click Add.
-
Type
ADadminand click Check Names. -
Enter your domain user credentials.
-
Select ADadmin.
-
Click OK.
-
Click OK.
-
Click Apply.
-
Click OK.
-
Close Local Users and Groups Manager.
1.2. Workstation
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -match "hyper" } | Sort-Object -property FeatureName | Select-Object -Property FeatureName, RestartNeeded, State # Note: Enabling Microsoft-Hyper-V -All turns the host computer into a virtiual machine. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart # Prevent the host computer turning into a virtual machine. Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor -NoRestartWindows 10FeatureName RestartNeeded State ----------- ------------- ----- HypervisorPlatform False Disabled Microsoft-Hyper-V False Disabled Microsoft-Hyper-V-All False Disabled Microsoft-Hyper-V-Hypervisor False Disabled Microsoft-Hyper-V-Management-Clients False Disabled Microsoft-Hyper-V-Management-PowerShell False Disabled Microsoft-Hyper-V-Services False Disabled Microsoft-Hyper-V-Tools-All False Disabled
Windows 11FeatureName RestartNeeded State ----------- ------------- ----- HyperV-Guest-KernelInt False Disabled HypervisorPlatform False Disabled HyperV-KernelInt-VirtualDevice False Disabled Microsoft-Hyper-V False Disabled Microsoft-Hyper-V-All False Disabled Microsoft-Hyper-V-Hypervisor False Disabled Microsoft-Hyper-V-Management-Clients False Disabled Microsoft-Hyper-V-Management-PowerShell False Disabled Microsoft-Hyper-V-Services False Disabled Microsoft-Hyper-V-Tools-All False Disabled
-
Restart the computer.
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -match "hyper" } | Sort-Object -property FeatureName | Select-Object -Property FeatureName, RestartNeeded, StateWindows 10FeatureName RestartNeeded State ----------- ------------- ----- HypervisorPlatform False Disabled Microsoft-Hyper-V False Enabled Microsoft-Hyper-V-All False Enabled Microsoft-Hyper-V-Hypervisor False Disabled Microsoft-Hyper-V-Management-Clients False Enabled Microsoft-Hyper-V-Management-PowerShell False Enabled Microsoft-Hyper-V-Services False Enabled Microsoft-Hyper-V-Tools-All False Enabled
Windows 11FeatureName RestartNeeded State ----------- ------------- ----- HyperV-Guest-KernelInt False Disabled HypervisorPlatform False Disabled HyperV-KernelInt-VirtualDevice False Disabled Microsoft-Hyper-V False Enabled Microsoft-Hyper-V-All False Enabled Microsoft-Hyper-V-Hypervisor False Disabled Microsoft-Hyper-V-Management-Clients False Enabled Microsoft-Hyper-V-Management-PowerShell False Enabled Microsoft-Hyper-V-Services False Enabled Microsoft-Hyper-V-Tools-All False Enabled
2. SMRU-HyperV01
2.1. Connect to Server.
-
Note: At the moment the SMRU\ADadmin account has no access to SMRU-HyperV01.
3. TBHF-HyperV01
3.1. Connect to Server.
-
Start Hyper-V Manager with SMRU\ADadmin privileges.
-
Windows 10: Right-click Start | Programs | Windows Administrative Tools | Hyper-V Manager
while holding down the Shift key and select Run as different user. -
Windows 11: Right-click Start | Programs | Windows Tools | Hyper-V Manager
while holding down the Shift key and select Run as different user.
-
-
Select Action > Connect to Server.
-
Choose Another computer.
-
Type
TBHF-HyperV01and click OK. -
Close Hyper-V Manager.
3.2. Virtual Switch Manager
-
Start Hyper-V Manager with SMRU\ADadmin privileges.
-
Connect to the TBHF-HyperV01 server.
-
Select Virtual Switch Manager.
-
???
-
Close Hyper-V Manager.
4. Migrate VirtualBox to Hyper-V
-
Start VirtualBox.
-
Uninstall Oracle VirtualBox Guest Additions from the virtual machine.
-
Shut down the virtual machine.
-
Select the Media page.
-
Select the Hard disks tab.
-
Right-click the virtual machine’s hard disk (.vdi) file and select Copy.
-
Select VHD (Virtual Hard Disk) for the Hard Disk File Type and Format.
-
Click Finish.
-
Close VirtualBox.
-
Start Start Hyper-V Manager (virtmgmt.msc) with administrative privileges.
-
Optional: Select Action > Connect to Server.
-
Optional: Choose Local computer.
-
Optional: Click OK.
-
Select Action > Edit Disk.
-
Click Next.
-
Click Browse.
-
Select the virtual machine’s hard disk (.vhd) file.
-
Click Open.
-
Click Next.
-
Choose Convert.
-
Click Next.
-
Windows XP: Choose VHD.
-
Windows 10: Choose VHDX.
-
Click Next.
-
Choose Dynamically expanding.
-
Click Next.
-
Click Browse.
-
Select the D:\Hyper-V\Virtual Hard Disks folder.
-
Type the virtual machine’s file name in the File name field.
-
Click Save.
-
Click Next.
-
Click Finish.
-
Close Close Hyper-V Manager.
-
Start Start Hyper-V Manager (virtmgmt.msc) with administrative privileges.
-
Select Actions > New > Virtual Machine.
-
Click Next.
-
Type the virtual machine’s name in the Name field.
-
Check Store the virtual machine in a different location.
-
Click Browse.
-
Select the D:\Hyper-V folder.
-
Click Select Folder.
-
Click Next.
-
BIOS: Choose Generation 1.
-
UEFI: Choose Generation 2.
-
Click Next.
-
Click Next.
-
Select Default Switch for the Connection.
-
Click Next.
-
Choose Use an existing virtual hard disk.
-
Click Browse.
-
Select the virtual machine’s hard disk (.vhd or .vhdx) file.
-
Click Open.
-
Click Next.
-
Click Finish.
-
Select the virtual machine in the Virtual Machines panel and select Settings.
-
BIOS: Select BIOS.
-
BIOS: Select IDE.
-
BIOS: Click Move Up.
-
BIOS: Click Apply.
-
Click OK.
-
Close Close Hyper-V Manager.
4.1. Windows XP only
-
Fortunately, there is a direct download link mirror to the Hyper-V Integration Services 6.3.9300.16384 ISO, which came from Windows 8.1 / Windows Server 2012 R2.
-
Download vmguest.iso from https://www.deltik.net/news/view/45/download-hyper-v-integration-services-for-legacy-operating-systems.
-
Install Hyper-V Integration Services inside the virtual machine.
-
Start Computer Managemment (compmgmt.msc) in the virtaul machine.
-
Select Device Manager.
-
Right-click Network adapters > Microsoft Hyper-V Network Adapter and selet Properties.
-
Select the Advanced tab.
-
Select TCP Checksum Offload (IPv4) and set its value to Disabled.
-
Select TCP Checksum Offload (IPv6) and set its value to Disabled.
-
Select UDP Checksum Offload (IPv4) and set its value to Disabled.
-
Select UDP Checksum Offload (IPv6) and set its value to Disabled.
-
Click OK.
-
Close Computer Managemment.
5. Usage
Copy-VMFile -Name "Windows XP Fundamentals 32-bit" -SourcePath "C:\Tmp\Software\Delta-Windows-Tools-4.5.7Beta-x86.exe" -DestinationPath "C:\Tmp" -FileSource Host -Force powershell.exe "Copy-VMFile -Name \"Windows XP Fundamentals 32-bit\" -SourcePath \"C:\Tmp\Software\Delta-Windows-Tools-4.5.7Beta-x86.exe\" -DestinationPath \"C:\Tmp\" -FileSource Host" -Force