To set up Azure Hyper-V for cloud-based computing, you'll need to create a virtual network. This can be done by navigating to the Azure portal and clicking on "Virtual networks" under the "Networking" section.
Azure Hyper-V is a type of virtualization technology that allows you to run multiple virtual machines on a single physical host. This is done by creating a virtual switch to connect the virtual machines to the physical network.
The first step in setting up Azure Hyper-V is to create a new virtual network. This can be done by clicking on the "Create a resource" button and selecting "Virtual network" from the dropdown menu.
You can then choose the virtual network address space and subnet mask for your virtual network. For example, you can choose the address space 10.0.0.0/16 and the subnet mask 255.255.255.0.
You might like: Azure Subnetting
Azure Hyper-V Configuration
To deploy Hyper-V on Azure, you'll need to choose a VM size that supports Hyper-threading and can run nested virtualization. You can view the supported virtual machine types on the Azure supported VM Types link.
Make sure to select a VM size that meets these requirements to ensure a smooth Hyper-V deployment on Azure.
Supported virtual machine types can be found on the Azure supported VM Types link, so be sure to check that out.
You might like: Openshift Vm
Architectural Components
When setting up Azure Hyper-V configuration, it's essential to understand the architectural components involved.
Azure requires an Azure subscription, Azure storage account, and Azure network to store replicated data from on-premises virtual machine workloads.
To replicate data, you'll need to gather Hyper-V hosts and clusters into Hyper-V sites, and install the Azure Site Recovery Provider and Recovery Services agent on each standalone Hyper-V host or cluster node.
Hyper-V hosts and clusters must be managed by either VMM or not, depending on your setup.
If Hyper-V hosts aren't managed by VMM, the Azure Site Recovery Provider orchestrates replication with Site Recovery over the internet, while the Recovery Services agent handles data replication.
If Hyper-V hosts are managed by VMM, you'll need to install the Site Recovery Provider on the VMM server to orchestrate replication with Site Recovery, and register the server in the Recovery Services vault.
You'll also need to install the Recovery Services agent on each Hyper-V host or cluster node.
On a similar theme: Azure Stack Hci vs Hyper-v
For both scenarios, nothing needs to be explicitly installed on virtual machines.
Here's a summary of the architectural components involved:
Supported Scenarios
When configuring Azure Hyper-V, there are specific scenarios that are supported. You can perform disaster recovery to Azure for VMs running on Hyper-V hosts that are managed in the System Center Virtual Machine Manager fabric.
You can deploy this scenario in the Azure portal or by using PowerShell. In fact, this is one of the most popular ways to set up disaster recovery for Hyper-V VMs.
Hyper-V hosts that aren't managed by Virtual Machine Manager are also supported. You can perform disaster recovery to Azure for VMs running on these hosts.
You can deploy this scenario in the Azure portal or by using PowerShell. Just keep in mind that configuring both Azure Backup and Azure Site Recovery on the same Hyper-V host can cause issues with replication and is not supported.
Here are the supported scenarios summarized in a table:
Provider
The Azure Hyper-V provider is a crucial component of your deployment, and it's essential to ensure you're running the latest version. This will guarantee compatibility with settings in this article.
To confirm, the Azure Site Recovery provider is responsible for coordinating communications between on-premises servers and Azure Hyper-V with Virtual Machine Manager. It's installed on Virtual Machine Manager servers.
The provider is also responsible for managing communications with Hyper-V without Virtual Machine Manager, and in this case, it's installed on Hyper-V hosts. This ensures seamless replication between on-premises and cloud environments.
Here's a quick rundown of the different providers and their roles:
By keeping your provider up-to-date, you'll be able to take advantage of the latest features and fixes.
Network Configuration
Network Configuration is a crucial step in setting up Azure Hyper-V. To allow your environment to replicate, you need to modify outbound network connectivity, which Site Recovery doesn't support using an authentication proxy to control.
To give your guest VM an IP address, you'll need to use an IP address from the NAT'ed address range. For example, 192.168.0.2 is a valid IP address. The DNS server address is your Azure DNS server, which can be found by running the command `IPConfig/all` on your Hyper-V host.
You can configure your Azure VM network to support various components, including Azure ExpressRoute, ILB, ELB, and Azure Traffic Manager, regardless of whether you use Hyper-V with Virtual Machine Manager or without. Here are the supported components:
Set Up Outbound Network Connectivity
To set up outbound network connectivity, you need to modify your environment to allow replication. Site Recovery doesn't support using an authentication proxy to control network connectivity.
You'll want to create a NAT'ed vSwitch for outside connectivity, as mentioned in Example 3. This will enable your nested VMs to access the internet.
To do this, you'll need to add a 2nd NIC to your Hyper-V host, as described in Example 5. This will allow you to create a NAT'ed vSwitch and enable IP forwarding on the NIC.
Here's a summary of the steps:
- Add a 2nd NIC to your Hyper-V host
- Enable IP forwarding on the NIC
- Create a NAT'ed vSwitch for outside connectivity
By following these steps, you'll be able to set up outbound network connectivity and allow your environment to replicate as expected.
User Defined Routes
User Defined Routes are a crucial part of Azure network configuration. They allow you to specify custom routes for traffic from Azure to access your nested VMs.
To create a user defined route, you'll need to set up a route table following the Microsoft guide. This involves creating a route table and specifying the next hop type and address.
The next hop type should be set to Virtual Appliance, and the next hop address is the LAN NIC address, which can be found by running IPCONFIG on your host VM. For example, the LAN NIC address is 10.0.2.4/24.
You'll also need to associate this custom route with your LAN subnet and any production subnets that need access to your nested VMs. This is done by clicking on the Subnets tab and associating your route table with the desired subnets.
It's worth noting that you may need to reboot your VMs for the new routes to take effect.
See what others are reading: Azure Nested Virtualization
Replication and Failover
Replicated VMs must meet Azure requirements and can be any workload running on a supported operating system.
VMs that replicate to Azure can have any guest OS supported for Azure, except Windows Server 2016 Nano Server isn't supported.
The finalize protection process configures network and other post-replication settings, so that the virtual machine is protected. This process runs after the initial replication finishes.
You can check the virtual machine settings to make sure it's ready for failover, and run a disaster recovery drill (test failover) to check that it fails over as expected.
In the failover process, you can run a planned or unplanned failover from on-premises Hyper-V virtual machines to Azure. If you run a planned failover, the source virtual machines are shut down to ensure no data loss.
Here's a summary of the failover process:
- Run a planned or unplanned failover from on-premises Hyper-V virtual machines to Azure.
- After the first stage of failover completes, you can see the created replica virtual machines in Azure.
- You can assign a public IP address to the virtual machine if required.
- You then commit the failover to start accessing the workload from the replica Azure virtual machine.
Failback occurs in three stages. First, you kick off a planned failover from Azure to the on-premises site. After initial synchronization finishes, you select to complete the failover. After it completes, you can log onto the on-premises virtual machine to check everything's working as expected. In the Azure portal, you can see that the Azure virtual machines have been stopped.
Additional reading: Azure Create Vm
VM Management
You can't resize a disk on a replicated Hyper-V VM, so you'll need to disable replication, make the change, and then re-enable replication for the VM.
If you need to add a disk to a replicated Hyper-V VM, you're out of luck - you'll have to disable replication, make the change, and then re-enable replication for the VM.
Changing the disk ID on a replicated Hyper-V VM is also not supported - if you do it, it'll impact the replication and show the disk as "Not Protected".
Intriguing read: Nextcloud Aio Vm
VM Management
VM management can be a bit tricky, especially when it comes to making changes on replicated Hyper-V VMs. One thing to keep in mind is that you can't simply resize a disk on a replicated VM, you'll need to disable replication first.
If you need to add a disk to a replicated VM, you'll have to go through a similar process - disable replication, make the change, and then re-enable it. This is a bit of a hassle, but it's necessary to ensure the replication process doesn't get messed up.
Changing the disk ID on a replicated VM can also cause problems. If you change the ID, it will impact the replication and the disk will show up as "Not Protected".
Configure Guest VM
To configure a guest VM, you'll need to give it an IP address from the NAT'ed address range.
You can use the IP address 192.168.0.2, as demonstrated in the example.
The default gateway for the NAT'ed internal switch is 192.168.0.1, which you'll also need to set.
For DNS server address, use 168.63.129.16, your Azure DNS server.
To find your Azure DNS server, run the command "IPConfig/all" on your Hyper-v host.
Vault Actions
When replicating Hyper-VMs from on-premises to Azure, you can replicate to only one AD tenant from one specific environment - Hyper-V site or Hyper-V with VMM as applicable.
Replication to multiple AD tenants is not supported in this scenario.
In order to replicate Hyper-VMs, you'll need to set up a Hyper-V site or a Hyper-V with VMM environment.
This allows you to replicate to a single AD tenant, which can be a limitation depending on your organization's needs.
A different take: Azure Auth Json Website Azure Ad Authentication
Security and Compliance
Azure Hyper-V provides strong security assurance processes, including automated build integration that triggers periodic security reviews, threat modeling, code reviews, fuzzing, and testing by a dedicated security team.
The attack surface related to the hypervisor is tracked and monitored through these processes, ensuring that potential vulnerabilities are identified and addressed before they can be exploited.
Multiple security boundaries are enforced by the hypervisor, including between virtualized "guest" partitions and the privileged partition ("host"), between multiple guests, and between the hypervisor and the host.
Here are the security boundaries enforced by the hypervisor:
- Virtualized “guest” partitions and privileged partition (“host”)
- Multiple guests
- Hypervisor and the host
- Hypervisor and all guests
These boundaries defend against attacks such as side-channel information leaks, denial-of-service, and elevation of privilege, ensuring confidentiality, integrity, and availability of the hypervisor security boundaries.
WDAC Policy
Windows Defender Application Control (WDAC) is a security feature that controls and manages the applications and code running on your Windows devices.
WDAC enforces policies to ensure only trusted and approved applications run on your devices while preventing unauthorized and potentially malicious software.
By default, Azure Stack HCI OS 23H2 has WDAC enabled and running in enforcement mode.
A WDAC supplemental policy from the third-party software vendor is required to allow non-Microsoft signed software to run on Azure Stack HCI nodes.
For more information, refer to the Microsoft documentation on understanding WDAC policy rules and file rules.
Consider reading: Windows Azure down
Defined Security Boundaries
Defined Security Boundaries are a crucial aspect of Azure's security features. The Azure hypervisor enforces multiple security boundaries between virtualized "guest" partitions and privileged partition ("host"), as well as between multiple guests.
These boundaries are designed to ensure confidentiality, integrity, and availability. This defense against a range of attacks, including side-channel information leaks, denial-of-service, and elevation of privilege.
The hypervisor security boundary provides segmentation between tenants for network traffic, virtual devices, storage, compute resources, and all other VM resources. This means that each tenant's data is isolated and secure.
Here are the key security boundaries enforced by the Azure hypervisor:
- Virtualized “guest” partitions and privileged partition (“host”)
- Multiple guests
- Itself and the host
- Itself and all guests
These boundaries work together to provide a robust and secure environment for Azure users.
Defense-in-Depth Exploit Mitigations
Microsoft's Azure hypervisor has defense-in-depth exploit mitigations in place to protect against cross-VM vulnerabilities. These mitigations are designed to make the development of an exploit infeasible.
The hypervisor isolates host-based process hosting cross-VM components, creating a secure environment. This isolation helps prevent attacks from spreading between VMs.
Suggestion: Azure Hypervisor
Virtualization-based security (VBS) ensures the integrity of user and kernel mode components from a secure world. This means that even if a vulnerability is found, the system will still be protected.
Multiple levels of exploit mitigations are implemented, including address space layout randomization (ASLR), data execution prevention (DEP), arbitrary code guard, control flow integrity, and data corruption prevention. These mitigations make it difficult for attackers to exploit vulnerabilities.
Automatic initialization of stack variables at the compiler level and kernel APIs that automatically zero-initialize kernel heap allocations made by Hyper-V are also in place. These features reduce the risk of attacks.
Here are the multiple levels of exploit mitigations used by the Azure hypervisor:
- Address space layout randomization (ASLR)
- Data execution prevention (DEP)
- Arbitrary code guard
- Control flow integrity
- Data corruption prevention
Frequently Asked Questions
What is Hyper-V in Azure?
Hyper-V in Azure is a virtualization product that allows you to create and run virtual machines, each with its own operating system and programs. It's a powerful tool for deploying and managing virtual environments in the cloud.
Is Azure Hyper-V or VMware?
Azure uses Hyper-V, a virtualization technology developed by Microsoft, to manage its cloud infrastructure. This sets Azure apart from VMware, which is a separate virtualization platform.
What is difference between VM and Hyper-V?
VMware and Hyper-V differ in memory management, with VMware offering more efficient memory usage through memory duplication, allowing for more simultaneous applications and services, whereas Hyper-V prioritizes higher host server memory support.
Sources
- https://help.druva.com/en/articles/9285223-protect-hyper-v-hosts-on-azure-stack-hci
- https://learn.microsoft.com/en-us/azure/site-recovery/hyper-v-azure-architecture
- https://cloudinfrastructureservices.co.uk/how-to-setup-hyper-v-nested-virtualization-on-azure/
- https://learn.microsoft.com/en-us/azure/site-recovery/hyper-v-azure-support-matrix
- https://learn.microsoft.com/en-us/azure/security/fundamentals/hypervisor
Featured Images: pexels.com