Showing posts with label Hyper-V. Show all posts
How to configure Nested Virtualization on Hyper-V 2016
Overview
Microsoft has released nested virtualization on Hyper-V 2016. Seems like it's making more sense as many Azure workloads might require this feature and also it facilitates Labs and any other testing without the need of having an actual physical host deployed. Windows Containers it's also another emerging feature as it allows you to virtualize within the virtualized roles.Applications
- Development, Testing, and Labs.
- Hyper-V Features required for VEEAM Proxy Servers.
- Never use for as a production solution, please refer to MS best practices.
- Others…
Requirements
- Hyper-V Role Installed on your Windows Server 2016 or Windows 10.
- A VM that will act as a VM/Virtualization Host running 2016.
How to enable?
Step by step
Go to the Hyper-V host and run the following command to verify if the Expose Virtualization Extensions are enabled by running the following PS command.Get-VMProcessor -VMName TESTHVHOST01| FL *
If not enabled then Power Off the VM and run the following command to enable Nested virtualization.
Set-VMProcessor -VMName TESTHVHOST01 -ExposeVirtualizationExtensions $true
Run the Get-VMProcessor -VMName TESTHVHOST01| FL * command and the value should have updated to True.
Installing the Hyper-V Role on Nested Windows Server 2016 VM
Follow below steps and then Install to get the services configured on your nested virtual host.
After installing the role and restarting the server, proceed to open the Hyper-V Manager.
Create a New nested Virtual Machine and specify its configurations then Finish.
After creating the VM you should be able to connect from your Hyper-V Virtual Host.
That's it, you have now deployed your first nested virtualization host.
How to deploy a Hyper-V 2016 Cluster with two virtualization hosts step by step Windows Server 2016
Here's a step by step on how to deploy a Hyper-V Cluster on Windows Server 2016.
Before you start make sure you have already installed all the required features/roles and configurations on the Hyper-V nodes.
Failover Clustering Prerequisites
- Two Virtualization Hosts same CPU and RAM is recommended and Windows Server 2016 Installed.
- Hyper-V Role including Failover Cluster and MPIO ( iSCSI if necessary)
- At minimum 2 NICs per host (One for CSV/Heartbeat and Management/Guest VM's, make sure servers can communicate to each other).
- Storage attached to both servers, in my case I will have 2 Fiber ports per server A/B with MPIO enabled so the server only sees one connection,
Networking
Cluster Name:HVCLUSTER2016
IP: 10.0.0.10
HOST01
10.0.0.11 Management/Guest VMs
10.0.1.11 Cluster Shared Volume/Heartbeat
HOST02
10.0.0.12 Management/Guest VMs
10.0.1.12 Cluster Shared Volume/Heartbeat
Hardware specs
Deploying the Cluster
On the BYB page, Next.On the Select Servers page, enter servers you will like to add to your cluster and then Next.
On the Validation Warning page, Yes to run configuration validation tests then continue on the validation wizard.
On the Testing Options page, Run All tests (recommended) and then review the results. If you have any warning or critical issues please make sure you correct them before you proceed with the cluster creation.
On the Validation Summary page, view report if necessary and then Finish.
On the Access Point for Administering the Cluster page, enter Cluster name and IP then Next.
On the Confirmation page, review then Next.
On the Summary page, review cluster creation results then close and Open the Failover Cluster Management Console.
Configure Storage/Cluster Shared Volumes
Tasks before adding the disks:Make sure the disks are online and initialized.
Configure Cluster Quorum/Witness Disk
On the Failover Cluster Console, right click on the Cluster name, More Actions then Configure Cluster QuorumOn the Quorum Configuration Select the quorum witness then Next.
On the Select Quorum Witness Select Disk Witness then Next. (If you would like to select a different one you are always more than welcome)
Select the volume you want to assign as the witness, Confirm then Next to complete the Quorum configuration.
Confirm the cluster Quorum disk it's available.
Post-configuration tasks:
- Add or create a VM/Role.
- Perform a Live Migration to test HA.
- Add more storage volumes if necessary.
- Remove and Add VM's to the cluster to test functionality.
That's it you have now created a Hyper-V 2016 Cluster.
Nano Server - How to Deploy a Nano Server 2016 with the New Nano Image Builder on Hyper-V 2016 Step by Step
How to Deploy a Nano Server 2016 with the Nano Image Builder on Hyper-V Step by Step
Prerequisites:
- Hyper-V Services installed and ready to deploy VM's
- Windows Server 2016 ISO mounted as a CD so the Nano Image Builder gets its source files to create the Nano image (WIM or VHD).
- Nano Server Image Builder (Download from here)
- Windows Assessment and Deployment Kit (ADK) v10 (Download from here)
- Deployment Tools
- Windows PE
- Optional - Configuration Designer
Installing Windows Assessment and Deployment Kit ADK 10 1607 or latest.
Installing the Nano Image Builder Step by Step
After installation is done, open the Nano Server Image Builder App to start creating your first Nano Image.
On the Created a new image or bootable USB page, select the image type in my case Nano Server Image from scratch click Next and Next to the following page.
On the Create new image page, mount your 2016 Server ISO to your Windows Server 2016 or Windows 10 device then Next and Next to the Deployment Type page.
On the Deployment type page, select the machine type, browse and assign the output file, size and logs then Next and next to the packages page. (In this guide I will be deploying a Virtual Machine)
On the Packaged page, select the Edition, Roles and Services you would like to install on your Nano instance then Next.
On the Drivers Page, add any required and then Next.
On the Destination machine page, specify the computer name, Administrator password and Time zone then Next.
On the Join Domain page, check and specify domain name then Next. I will perform this step later via PowerShell.
On the Network page, set WinRM and remote PowerShell if required and IP then Next. In my case I will perform this later within the Nano Server administration.
On the Configuration page, review and then Create.
After the creation process is completed you will be able to browse for the VHD and attach to a VM.
Creating a Generation 2 VM for Nano Server on Hyper-V 2016 step by step.
On the VM Creation page, set the VM Name and VM location then Next.On the Generation page, select Generation 2 then Next.
On the Assign Memory page, set the needed RAM and then Next.
On the Network Page, select your Virtual Switch and then Next.
On the Connect VHD page, select the Nano Server VHD you have created with the Nano Image builder and then Finish to complete the creation of the VM.
After completing the VM creation Open the Nano Server VM and Power On.
That's it, you have now created your first Nano Server Image, follow for more posts related to Nano Server.
How to install Windows Server 2016 VM on a Hyper-V Windows 10 Device GUI and PowerShell
How to Create/Install Windows Server 2016 VM on your Hyper-V Windows 10 Device (Surface Pro 4)
As you might know Hyper-V role/feature is included on Windows 7,8, 8.1 and 10. This allows you to create your own test environments and also you pre-production development systems. So you can test new features and so on.
How to install the role on my Windows 10 ?
To install the role/feature is pretty straight forward just make sure you perform the following tasks;1. Go to your BIOS and make sure the Hypervisor /Virtualization Technology is enabled.
2. After enabling your Hypervisor, search on Turn Windows Features on or off and enable all the Hyper-V features.
3. After enabling the role, restart your computer and open the Hyper-V manager Console.
4. That's it, now you have Hyper-V Role installed on your Windows 10 Device.
Creating and Installing the 2016 VM Step by Step
1. Open the Hyper-V Manager, click New then create a new Virtual machine.2. On the Virtual Machine Wizard specify he following: Name, Path, Generation, RAM, Network, VHD and the ISO to install the OS in my case Windows Server 2016.
3. Once the VM is created then start the VM and press any key to install the OS from the attached ISO then follow all the OS installation wizard.
4. Now you have your new VM installed on your Windows 10 device.
You can also create the VM utilizing PowerShell
1. Go to your PowerShell ISE as Admin then run the following pscript.
# Make sure you change the VM Name, Switch Name, and Installation Media Path.
$VMName = 'Server2016'
$Switch = 'Private NIC Teaming Switch'
$InstallMedia = 'C:\Temp\Server2016.iso'
# Create New Virtual Machine
New-VM -Name $VMName -MemoryStartupBytes 2147483648 -Generation 2 -NewVHDPath "C:\Virtual Machines\$VMName\$VMName.vhdx" -NewVHDSizeBytes 53687091200 -Path "C:\Virtual Machines\$VMName" -SwitchName $Switch
# Add DVD Drive to Virtual Machine
Add-VMScsiController -VMName $VMName
Add-VMDvdDrive -VMName $VMName -ControllerNumber 1 -ControllerLocation 0 -Path $InstallMedia
# Mount Installation Media
$DVDDrive = Get-VMDvdDrive -VMName $VMName
# Configure Virtual Machine to Boot from DVD
Set-VMFirmware -VMName $VMName -FirstBootDevice $DVDDrive
Thanks for watching! :)
Subscribe to:
Posts
(
Atom
)