Unidesk OS Layer and Platform Layer

Last Modified: Feb 1, 2017 @ 8:45 am

Navigation

This topic assumes the Unidesk Enterprise Layer Manager has already been imported and configured. See Create and update the OS Layer in Unidesk 4.0.8 by George Spiers for Hyper-V and PvS focused instructions.  💡

Layers Overview

Unidesk uses several types of layers:

  • Operating System Layer
  • Platform Layer
  • Application Layer
  • Image Template
  • User Layer

The master versions of all Layers are stored on the Enterprise Layer Manager virtual appliance.

 

Operating System Layer is just the base OS (with patches) and VMware Tools. There’s usually no need to install anything else.

The remaining layers (Platform and Application) are created from an OS Layer. These layers are linked to one OS Layer, and can’t be used on any other OS Layer.

Any application that creates local users (e.g. XenApp 6.5) should be installed in the OS Layer.

 

Platform Layer contains the following:

  • Citrix Virtual Delivery Agent, or VMware Horizon Agent.
  • Citrix Provisioning Services Target Devices Software
  • Hypervisor Tools – if packaging or publishing to a different hypervisor than originally used to create the OS Layer.

An Image Template (the composed machine that is published to the hypervisor) can contain only one Platform Layer. If you are creating a Platform Layer for Citrix Provisioning Services, then that one Platform Layer should include both the Citrix VDA, and the Citrix PvS Target Device Software.

 

Application Layers contain anything not in the OS Layer or Platform Layer, including the following:

  • Applications
  • Antivirus
  • Print Drivers
  • Citrix WEM Agent
  • SCCM Client

When creating a Unidesk Machine, there are two methods of merging the Application Layers:

  • Pre-boot – Unidesk merges the App Layer with the OS Layer and Platform Layer to create a single monolithic disk file. This method provides the greatest application compatibility. Use this method for Apps with boot time services or drivers.
  • Elastic – When the user logs into a Unidesk machine, a service looks in a file share for any Elastic Layers assigned to the user, and merges (mounts) them as the user logs in. Different users can have different Elastic Layers, even on multi-user Remote Desktop Session Host (XenApp) machines. However, Elastic Layering doesn’t work for apps that need boot-time services/drivers.

A single App Layer can be merged using either of these methods. If the App Layer doesn’t work Elastically, then you can mount it Pre-boot (Image Template) instead. There is no need to create separate App Layers for each mounting method.

Elastic App Layers are stored in a SMB file share. You can use any desired method to provide High Availability for this file share including: Scale Out File Server, DFS Namespace/Replication, etc.

 

Image Template contains one OS Layer, one Platform Layer, and zero or more App Layers. The App Layers assigned in the Image Template are merged pre-boot.

You then Publish the Image Template to your hosting platform.

  • For MCS, the Template is pushed to a hypervisor (e.g. vSphere) virtual machine, which becomes the master image for an MCS Catalog.
  • For PvS, Unidesk creates a VHD file, and pushes it to a PvS vDisk Store, so you can assign it to Target Devices.

 

User Layers allow users to install their own applications. This Layer Type is not yet available in Unidesk 4.0.8, but is coming soon.

User Layers require additional consideration for backup, replication, and recovery.

Operating System Preparation

Unidesk has several Test drives, which are complete procedures for creating layers for various platforms.

  1. Create a virtual  machine.
  2. If vSphere, make sure your OS Layer creation machine has VMXNET3 NIC.
  3. Install an operating system and patch it.
  4. Install VMware Tools.
  5. Don’t join the template machine to the domain. Leave it in a workgroup.
  6. Disable Automatic Updates on the template machine. You can use layers to install updates. An easy method to disable it is in Group Policy > Computer Configuration > Policies > Administrative Templates > Windows Components > Windows Update > Configure Automatic Updates. Disable the setting.
  7. If PvS, George Spiers says IPv6 should be disabled.  💡
  8. Go to the downloaded Unidesk files, right-click the unidesk_os_machine_tools.exe file, and click Run as Administrator.
  9. Click Install.
  10. Go to C:\Windows\Setup, and create the Scripts folder.
  11. You can optionally configure an unattend file to join the Unidesk machines to the domain. If MCS, you can skip this step and MCS will do it for you. For PvS, you can manually join the domain when creating a Platform Layer. Or you can use PowerShell for Advanced Domain Join Operations. The unattend file is more appropriate for full clone VMs.
    1. To create an unattend file, in C:\Windows\Setup\Scripts, right-click Unattend.exe, and run as administrator.
    2. At the top of the page, select the correct operating system.
    3. When choosing to join the domain, note that Domain join credentials are stored in the unattend.xml file in plain text.
    4. Continue to scroll down and enter configuration settings.
    5. At the bottom of the window, click Save File
    6. The tool creates the SetupComplete.cmd file.
  12. In C:\Windows\Setup\Scripts, run Optimize64.exe as administrator.
  13. At the top, select your operating system.
  14. Scroll down. As you scroll, review the changes it’s going to make. Then click Save File.
  15. Click OK when Optimizations have been saved. Then close the optimization tool.
  16. Run setup_x64.exe from C:\Windows\Setup\scripts. Make sure you run it elevated.
  17. In the Welcome to the InstallShield Wizard for the Unidesk Image Preparation Utility page, click Next.
  18. In the Specify your answer file page, click Next.
  19. In the InstallShield Wizard Completed page, click Finish.
  20. Shut down the machine.

Export OVF Template

  1. Make sure popup blocker is disabled for this vSphere Web Client website.
  2. In vSphere Web Client, right-click the OS Image machine, expand Template, and click Export OVF Template.
  3. In the Export OVF Template window, click OK.
  4. Eventually, you’ll see a Save As dialog box. This process is much quicker if the VM has no snapshots.
  5. Save the OVF file to the Unidesk file share so Unidesk ELM can access it later.
  6. You’ll be prompted to save multiple files to the same location.

Import OS Layer

  1. In the Unidesk ELM Management Console, go to the Layers tab.
  2. Right-click in the grey area, and click Create OS Layer.
  3. In the Layer Details page, give the OS Layer a name and version.
  4. Specify a Max Layer Size. Note: the packaging machine is thick provisioned using the size specified here.
  5. Click the down arrow to proceed to the next page.
  6. In the Connector page, the file share should already be selected. Click Next (down arrow).
  7. In the OS Disk Details page, click Browse, and select the .vmdk file. Click Next.
  8. In the Icon Assignment page, select an icon or upload a new one. Then click Next.
  9. In the Confirm and Complete page,  you can enter a Comment to indicate who created this layer and when. Then click Create Layer.
  10. At the bottom of the screen, click the up chevron to display the Tasks pane.
  11. You’ll see a Running task. Click the information icon to view more details.

Platform Layer

  1. In the Layers tab, right-click in the grey area, and click Create Platform Layer.
  2. In the Layer Details page, give the layer a name and version. Note: Platform Layers are linked to OS Layers, so it’s best to indicate which OS Layer this Platform Layer is based on. You can’t use a Platform Layer created on one OS Layer on a different OS Layer.
  3. Specify a Max Layer Size. Note: the packaging machine is thick provisioned using the size specified here, plus the size of the OS Layer.
  4. Click Next (down button).
  5. In the OS Layer page, select the OS Layer this Platform Layer will be based on, and click Next.
  6. In the Connector page, if you already have a vSphere connector, select it, and click Next. If you don’t already have a vSphere connector, then click New.

    1. To create the vSphere connector, in the Choose a Connector Type window, select VMware vSphere, and click New.
    2. A new tab opens.
    3. Give the Connector a name (e.g. vCenter name). The Connector specification includes specific storage, so you might want the Connector name to indicate the storage name.
    4. Enter the vCenter FQDN and service account credentials. The vCenter permissions needed by the service account are detailed at Unidesk Prerequisites (vSphere) at unidesk.com.
    5. Click Check Credentials.
    6. Scroll down and use the drop downs to select where you want Packaging VMs and Published Templates to be created. Published Templates are later used by MCS to create more machines.
    7. The Packaging VMs and Published Templates will be created under the Virtual Machine Folder that you specify here.
    8. Click Test.
    9. When the Test is successful, click Save.
    10. Then click Close.
  7. Back in the Connector page, select the vSphere connector, and click Next.
  8. In the Platform Types page, change the selection to This platform layer will be used for publishing Layered Images. The other selection is if you want to deploy the vSphere OS Layer on a different hypervisor (e.g. Azure).
  9. Use the drop downs to select the Hypervisor, Provisioning Method, and Connection Broker. These can be changed later. Click Next.
  10. In the Packaging Disk page, enter a name for the .vmdk disk that will be created in vSphere. Click Next.
  11. In the Icon Assignment page, select an icon, or upload a new one. Click Next.
  12. In the Confirm and Complete page, click Create Layer.
  13. On the bottom of the screen, open the Tasks pane.
  14. Click the information icon to view what the task is doing.
  15. Eventually it will say Pending (Action Required), meaning it’s waiting for you to perform the packaging in vSphere.
  16. In vSphere Web Client, in the VMs and Templates view, expand the Unidesk folder, expand Packaging VMs, and click the new Packaging Machine.
  17. If you edit the VM’s hardware, notice that the disk is Thick Provisioned.
  18. You can now access the console of the Packaging VM and install VDA software.
  19. Feel free to reboot the Packaging VM.
  20. If PvS:
    1. Join the machine to the domain. MCS does this automatically during Image Prep.
    2. Install the PvS Target Device Software. The Unidesk Templates only allow one Platform Layer per template, so you’d need to install both VDA and PvS Target Device components in a single Platform Layer.
    3. Rearm KMS licensing (slmgr /rearm). MCS does this automatically during Image Prep.
  21. When you are done installing VDA (and optionally PvS Target Device Software), double-click the Shutdown for Finalize icon on the desktop. If it finds issues, it will tell you what to do (e.g. reboot needed). Otherwise, it will shut down the VM.
  22. Back in the Unidesk ELM Management Console, in Layers > Platform Layers, right-click the Editing layer, and click Finalize.
  23. In the Confirm and Complete page, click Finalize.
  24. You can click the information icon next to the running task to see what it’s doing.
  25. Eventually the icon will say Deployable.
  26. You can click the information icon on the Platform Layer to view its details.

Next Steps

Update OS or Platform Layers

  1. Right-click an OS Layer or a Platform Layer, and click Add Version.
  2. In the Version Details page, enter a new version, and click Next.
  3. In the OS Layer page, click Next.
  4. In the Connector page, select a Connector, and click Next.
  5. In the Platform Types page, click Next.
  6. In the Packaging Disk page, click Next.
  7. In the Confirm and Complete page, click Add Version.
  8. The task details shows the current progress.
  9. When the Packaging Machine is deployed, you can connect to its console and perform any desired updates. When you are done performing updates, double-click the Shutdown for Finalize icon on the desktop.
  10. When done updating the Packaging Machine, right-click the Layer that is marked as Editing, and click Finalize.
  11. In the Confirm and Complete page, click Finalize.
  12. View the task details to see the current progress.
  13. To confirm that you have a new version, right-click the Layer, and click Delete Versions.
  14. You can only delete versions that are not assigned to any Image.
  15. There are two methods of assigning a new version: one image at a time, or multiple images.
  16. To edit one image:
    1. Go to the Images tab. Right-click an Image, and click Edit Template.
    2. Click the OS Layer or Platform Layer page.
    3. Click the plus arrow next to a Layer and select the new version. Then complete the wizard.
  17. To update multiple images:
    1. Right-click the updated layer, and click Update Assignments.
    2. In the Select Version page, select the version you want to assign, and click Next.
    3. In the Image Template Assignment page, select the templates you want to update, and click Next.
    4. In the Confirm and Complete page, click Update Assignments.
  18. Once an image has a new version assigned, you must republish it.

10 thoughts on “Unidesk OS Layer and Platform Layer”

  1. I had some issues with creating an OS Layer and had to contact Unidesk support. They told me that only MBR is supported at this time. This was for Unidesk 4.0.8. Hope this helps

    1. My suspicion is that only Basic disks are supported.

      GPT/MBR are two methods of partitioning a disk. MBR is certainly supported. Not sure about GPT.

  2. Hello! Really love your site and your work! THANKS! Saves a lot of time for us out in the field!
    I have tried to make a OS Layer Server 2016 from your instruction above but when the layer is created to 97% the next I get is “Failed to attach the disk /mnt/repository/Unidesk/OsImport Disks/Server_2016.vhd.
    Failed to probe partitions from virtual disk.”
    Any idea what could be wrong?

    /Kent

    1. Kent,
      Normally I hit shift+F10 when installing the OS (2016 in this case), and I go through diskpart to create/format an NTFS partition. This stopps the hidden system partition from being created. That is what I did the first time when I had the same error as you.
      The second time I did it I followed the same steps, but I didn’t format the partition in diskpart… I let the installer handle that part. Viola it worked!

Leave a Reply