Citrix XenDesktop, Windows 10

Configuring Citrix MCS for XenDesktop 7 1903, SCVMM 2016 & Windows 10 1903

I was recently involved in a project  where one of the options is to use Citrix Machine Creation Services to create desktops.  I have to admit I have never really used MCS in a production environment before so I thought I would document the steps to get this up and running.

So let’s begin.

Step 1 – Configure the Master VM.

Before we do anything around creating multiple VMs we need to build a Master VM to create VM’s from.  This master VM should contain all the configuration settings and software that you want to be deployed to all your desktops and end users.  We also need to ensure that the VM is optimised as much as possible to ensure that we get the best performance possible and there are no unwanted processes and scheduled tasks which could cause issues on the hosts. I am not going to re-invent the wheel around optimisation as there are plenty of blogs out there discuss this. I opted to use the Citrix Optimiser tool which can be downloaded here –  https://support.citrix.com/article/CTX224676

When you run the tool it will inform you of what has been optimised. As we can see the tool disables services, removes built-in apps, disables scheduled tasks and a few other things.

image

Once we have ran the tool we can proceed to the VDA Agent. When configuring the VDA Agent make sure you select the “Create a master MCS image” option.

After we have installed the VDA Agent reboot the VM and make sure that it has registered successfully with the Citrix Delivery Controller. Once you are happy that the VM is working as expected and you have installed all your required apps you can shut the VM down in preparation for configuring MCS.

Step 2 – Configure the Host Connection

The next step in the process is to configure the host connection between SCVMM & XenDesktop.  When we create desktops via MCS Citrix is responsible for communicating with the SCVMM API’s to create and configure the desktops.

From Citrix Studio go to the Hosting section and create a new connection.  For this scenario where we are using SCVMM select “Microsoft System Center Virtual Machine Manager” from the options list.

image

Enter the relevant details for your environment. The connection address is your SCVMM host details and the User name is the account which will be used to communicate with SCVMM. I highly recommend you create a dedicated service account for this with the necessary permissions in SCVMM to be able to create, manage and delete VMs.

image

Next we select the Cluster where we want the VM’s to be created on. Note if you have multiple clusters you will need to create multiple connections and then select the relevant connection when you create the VMs.

image

in the next step we select which storage locations we want the VMs to be placed on. I don’t have any shared storage available so I have selected local storage on my Hyper-V nodes.

image

The next screen is just a summary of all our storage locations.

image

Next we need to define the network that the VM’s will be configured on. This network needs to be defined and configured in SCVMM. If you have multiple VLAN’s that your desktops are on then you can change these within SCVMM after the VMs have been created.

image

After we have created the cluster we can run a test to make sure everything is working ok

image

Step 3 – Create the machine catalog

Now that we have a Master VM created and configured, and communication between SCVMM & XenDesktop we can now proceed with creating the machine catalogue and the VMs Smile 

When creating the catalog make sure that the Desktop OS is selected as we are using a Desktop Operating System (Windows 10 1903)

image

Next make sure that you have Citrix Machine Creation Services selected and the cluster you want them to be created on. If you have multiple clusters configured this is where you would select which one you will need

image

Now we need to define how the desktops will be configured.

image

Now we need to select our template VM.  It is recommended for you to take a snapshot so that is what I did previously. So here you can see the VM I created and its snapshot.

image

Now we configure how many VMs we want to create, the amount of memory that each VM will have and the cache size

image

Now we select the OU location and the computer names that we want for the VMs. Note that it uses the permissions of the person using Citrix Studio to ensure that whoever is performing this task has the necessary permissions to create computer accounts in the OU which you are using.

image

Now we just need to give the Machine Catalog a name. After doing this the creation will begin

image

The first thing which will be done will be that a copy of the master image will be taken:

image

image

A temporary preparation VM is created in SCVMM. This is where the VM is generalised.

image

You can see the tasks which are completed if you enable debugging. There is a log file created on the VM called c:\image-prep.log. You will have no network connectivity to the VM so you will need to log onto the VM from the SCVMM or Hyper-V console

image

Once the generalisation tasks are complete the VM is automatically shut down and deleted

image

The machine catalog creation process continues

image

Active Directory Machine Accounts are created

image

And the VMs are created

image

image

image

And the VMs are created successfully and registered successfully in the XenDesktop console Smile 

image 

Till next time!

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *