Template maintenance
A template can be put into to a special mode called "maintenance", which is primarily used to update or install software in the guest operating system. While in this mode, the template becomes unavailable for all normal tasks, including creating new hosts, and it becomes possible to start it as a regular virtual machine. Once the virtual machine is running, you can install or update software in the guest OS or perform administrative tasks in the operating system.
Depending on whether a template is configured for full or linked clones, the maintenance mode is used slightly differently, as described below.
Full clones
If your template is configured to create full clones, do the following:
- Select a template and click Tasks > Maintenance and select the template version to be put in maintenance. The template becomes disabled (grayed out) and all operations on it are suspended. The status of template in the Status column changes to Entering maintenance and when completed, changes to Maintenance.
- Using native tools of the hypervisor, start the template as a normal virtual machine.
- Install Windows updates or software as necessary.
- When done, shut down the virtual machine.
- Back in the RAS Console, select the template and click Tasks > Maintenance again to exit the maintenance mode. You will see a dialog where you can choose whether to create a new version or discard the changes. Select Create a new version.
- Create a new template version as described in section Using template versions, subsection "Creating a new version". When you update a full clone template, the changes will only affect future clones. For existing clones to have these updates, they must be recreated. You can choose to recreate existing hosts now or you can postpone it. Please note that recreating a full clone is a time consuming process. Also, a new app may be installed in a full clone VM or a user profile may be changed while the recreation is in progress, all of which will be lost. To minimize impact on users, it makes sense to schedule a maintenance window during which the clones can be recreated.
Linked clones
Since linked clones share the virtual hard disk with a snapshot of a template, you need to take additional steps compared to full clones.
First, you need to notify host users to save their data and log off. This is necessary for existing hosts to include the updates that you will install in the template. Once all users are logged off, do the following:
- Select a template and click Tasks > Maintenance and select the template version to be put in maintenance. The template becomes disabled (grayed out) and all operations on it are suspended. The status of the operation is displayed at the bottom of the window.
- Using native tools of the hypervisor, start the template as a normal virtual machine.
- Install Windows updates or software as necessary.
- When done, shut down the virtual machine.
- Back in the RAS Console, select the template and click Tasks > Maintenance again to exit the maintenance mode. You will see a dialog where you can choose whether to create a new version or discard the changes. Select Create a new version.
- Create a new template version as described in section Using template versions, subsection "Creating a new version". Please note that if you create a new version without recreating linked clones, you will have to recreate them manually or by using scheduler.
Updating RAS Guest Agent inside a template
A template must have the latest version of RAS Guest Agent installed in it. The agent is installed when you create a template. When a new version of RAS Guest Agent becomes available, it should be updated. To update the agent, the maintenance mode must be used as described above. To simplify agent updates, Parallels RAS monitors all installed agents and notifies the administrator when an update is available.
When the RAS Console starts, all installed agents are checked and a message is displayed if one or more agents need to be updated. This applies to servers in the RAS infrastructure and the templates. The message will ask if you want to update all agents. If you click Yes, you are presented with a dialog listing all servers and templates on which an agent needs to be updated. You can select or un-select a server/template to include it in the bulk update procedure or exclude it. Once you've made your selection, click OK to start the update. Follow the onscreen instructions and update the agents.
When you update the Agent in a linked clone template, you'll be asked if you want to recreate all hosts that were created from this template. You can click Yes and they will be automatically recreated to match the template.
When you update the Agent in a full clone template, full clone hosts are not automatically recreated. You will be asked if you want to recreate them. If you decide to do so, please note that full clone VMs are complete machines, so recreating them is a time-consuming process. Alternatively, you can update the agent in these VMs by push-installing it from the RAS Console. This can be done by clicking Tasks > Upgrade all Agents while on the VDI > Desktops tab.
To manually check the RAS Guest Agent status in a template, click Tasks > Check agent. If the agent is up to date, a message box is displayed confirming this. If a newer version of RAS Guest Agent is available, you'll see a dialog asking you to update it. Please note that the difference in updating full and linked clone templates (as described above) applies to this scenario as well.
Maintaining RD Session Hosts based on a template
If you need to do a scheduled maintenance of RD Session Hosts that were created from a template, please follow these steps:
- Create a schedule that fits your maintenance window to drain a desired RD Session Host group.
- During maintenance (or right before it) switch the template into maintenance mode. Then apply the necessary changes.
- The schedule disables groups provisioned by the template (while the maintenance window lasts) which leads to removing (unassigning) all hosts from them.
- Release the template from maintenance and click Yes when asked whether to recreate all clones.
- Enable groups which were disabled in step 3 (above). At this point, the groups will begin receiving hosts to comply with Keep Available Buffer setting
- From this point forward, groups are provisioned with VMs on demand.