Introduction
In this tutorial, I will explain how to install and configure a VDI (Virtual Desktop Infrastructure) environment.
Before getting to the heart of the matter, I will quickly present to you what a virtual office infrastructure is and especially the difference with an RDS environment.
The main difference between VDI and an RDS farm is the isolation from the environment made available to the user. As a reminder, on an RDS environment, a remote desktop host server will provide a shared environment to several users who will connect to the same server and therefore share resources (CPU, RAM, etc.).
In a VDI infrastructure, for each user a virtual machine is started and dedicated to the user, therefore the environment is no longer shared and the resources are “dedicated” to the user and uses a Desktop version of Windows like Windows 10. Virtualization is based on Hyper-V and as for an RDS server, the connection is made through the Windows RDP client.
As you can see I put in dedicated quotation marks at the resource level, the virtual machines will share the Hypervisor resources, they will be careful of the CPU over-allocation which could impact the overall performance of the virtual machines.
Now that I have “introduced” the VDI, we will see the prerequisites.
Prerequisite
Before talking about servers, you must be in an Active Directory environment and have a DHCP service in place.
A VDI environment requires at least 2 servers, but I advise you to do it on 3.
- A physical or virtual server for the broker role, it will manage the connections.
- A physical or virtual server for the Web access role, it is possible to install it on the broker server, personally in production I prefer to separate the roles.
- A physical server for the Hyper-V role. (For tests, it is possible to use nested virtualization from Windows Server 2016)
For virtual machines, you need an Enterprise version of Windows.
The capture below shows the 3 virtual machines for the server part that I used.
Preparation
Before starting to install roles on the different servers, we will prepare the environment.
Create an OU in the Active Directory for the computer objects.
We will see in the collection configuration later, it is necessary to create an OU for virtual machines. I recommend a dedicated OU, as it will be easier if you want to apply specific policies to these computers.
On a domain controller, create an OU dedicated to VDI 1.
Create a share for storing user profile disks – UPD
So that the user profile data is not lost, as for an RDS farm, it is possible to use the user profile disks. A user profile disk is a virtual disk (vhdx) that stores profile data (Desktop, Documents, AppData …).
On a server, create a folder 1 dedicated to the storage of UPDs.
Access the properties of the folder, go to the Sharing 1 tab and click on Advanced Sharing 2.
Check the Share this folder 1 box and click on the Apply 2 and OK 3 buttons.
The folder is shared, note the UNC path of the 1 share, you will need to enter it when configuring the collection.
The rights for the Hyper-V servers will be configured automatically when configuring the collection.
Installing the Remote Desktop Virtualization Host role
This step is optional and can be done at the same time as the VDI deployment, I advise you to do it separately so that you can configure after installing the virtual switch.
This step is not as detailed. On the Hyper-V server, launch the role setup wizard, in the list of server roles, check the Remote Desktop Services role 1 and click Next 2.
Optionally, select the Remote Desktop Virtualization Host 1 check box.
Validate the addition of dependencies such as the Hyper-V role by clicking on Add features 1.
Validate the role service then configure the Hyper-V role.
Validate the installation by clicking on the Install 1 button.
Once the installation is complete, close the wizard and restart the server. The server started, check the IP configuration, for my case, the virtual card was in DHCP.
Add the servers that make up the VDI environment in the server manager
As to install an RDS farm, it is necessary to add all the servers that make up the VDI environment on the same server.
For my part, I used the broker server (LAB-BRK) to manage the VDI infra, so I added the LAB-GW-RDS and LAB-HV-VDI server).
On the broker server, open the server manager and click on Add other servers to manage 1.
In the add servers window, click on Find now 1 to display the computers in the Active Directory, select the servers to add 2 and click on the arrow 3 for them. add.
In a production environment with a lot of computer objects in the Active Directory, it will be easier to search by name and add them one by one.
Once the servers have been selected 1 click on OK 2 to validate the addition in the server manager.
Wait while the manager refreshes then click on All servers 1 and check that the servers are present 2.
The environment is ready, we will now move on to the deployment of the virtual office infrastructure.