Use MCS to create Linux VMs

Starting with the 7.18 release, you can use Citrix Machine Creation Services (MCS) to create Linux VMs.

Note:

When using MCS to create Linux VMs, do not use easy install on the template VM.

To use MCS to create Linux VMs, prepare a master image on your XenServer hypervisor, Microsoft Azure, or VMware vSphere (support for other hypervisors is currently not available). This process entails installing the VDA on the template VM; creating a Machine Catalog in Citrix Studio; creating a Delivery Group; and performing certain configuration tasks.

Note:

Unexpected results can occur if you try to prepare a master image on hypervisors other than XenServer.

Use MCS to create Linux VMs on XenServer

Step 1: Prepare a master image

A master image contains the operating system, non-virtualized applications, VDA, and other software. To prepare a master image, do the following:

Step 1a: Install XenServer Tools

XenServer Tools must be installed on the template VM for each VM to be able to use the xe CLI or XenCenter. VM performance can be slow unless the tools are installed. Without the tools, you cannot do any of the following:

  • Cleanly shut down, restart, or suspend a VM.
  • View the VM performance data in XenCenter.
  • Migrate a running VM (through XenMotfion).
  • Create snapshots or snapshots with memory (checkpoints), and revert to snapshots.
  • Adjust the number of vCPUs on a running Linux VM.

Important:

Running a VM without installing the XenServer Tools is not a supported configuration.

  1. Run the following command to mount XenServer Tools named guest-tools.iso.

    sudo mount /dev/cdrom /mnt
    
  2. Run the following command to install the xe-guest-utilities package based on your Linux distribution.

    For RHEL/CentOS:

    sudo rpm -i /mnt/Linux/xe-guest-utilities_{package-version}_all.rpm
    

    For Ubuntu:

    sudo dpkg -i /mnt/Linux/xe-guest-utilities_{package-version}_all.deb
    

    For SUSE 12:

    sudo rpm -i /mnt/Linux/xe-guest-utilities_{package-version}_all.rpm
    
  3. Check the virtualization state of the template VM on the General tab in XenCenter. If XenServer Tools are installed correctly, the virtualization state is Optimized as shown below:

    image of virtualization state being optimized

Step 1b: Install the Linux VDA package on the template VM

Based on your Linux distribution, run the following command to set up the environment for the Linux VDA:

For RHEL/CentOS:

sudo yum –y localinstall <PATH>/<Linux VDA RPM>

For Ubuntu:

sudo dpkg –i  <PATH>/<Linux VDA DEB>

apt-get install -f

For SUSE 12:

sudo zypper –i install <PATH>/<Linux VDA RPM>

Step 1c: Enable repositories to install the tdb-tools package

For RHEL 7 server:

subscription-manager repos --enable=rhel-7-server-optional-rpms

For RHEL 7 workstation:

subscription-manager repos --enable=rhel-7-workstation-optional-rpms

Step 1d: Enable the EPEL repository to install ntfs-3g

For RHEL 6/CentOS 6:

sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

For RHEL 7/CentOS 7:

sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Step 1e: Install ntfs-3g for SUSE 12

On the SUSE 12 platform, there is no repository providing ntfs-3g. You must download the source code, compile, and install ntfs-3g manually:

  1. Install the GNU Compiler Collection (GCC) compiler system and the make package:

    sudo zypper install gcc
    sudo zypper install make
    
  2. Download the ntfs-3g package from https://www.tuxera.com/community/open-source-ntfs-3g/.

  3. Decompress the ntfs-3g package:

    sudo tar -xvzf ntfs-3g_ntfsprogs-<package version>.tgz
    
  4. Enter the path to the ntfs-3g package:

    sudo cd ntfs-3g_ntfsprogs-<package version>
    
  5. Install ntfs-3g:

    ./configure
    make
    make install
    

Step 1f: Set up the runtime environment

Before running deploymcs.sh, do the following:

  • Change variables in /var/xdl/mcs/mcs.conf. The mcs.conf configuration file contains variables for setting MCS and the Linux VDA. The following are variables you can set as required:

    • dns: Sets the DNS IP address.
    • AD_INTEGRATION: Sets Winbind or SSSD (SSSD is not supported on SUSE).
    • WORKGROUP: Sets the workgroup name (case-sensitive) if it is configured in AD.
  • On the template machine, add command lines to the /var/xdl/mcs/mcs_local_setting.reg file for writing or updating registry values as required. This action prevents the loss of data and settings every time an MCS-provisioned machine restarts.

    Each line in the /var/xdl/mcs/mcs_local_setting.reg file is a command for setting or updating a registry value.

    For example, you can add the following command lines to the /var/xdl/mcs/mcs_local_setting.reg file to write or update a registry value respectively:

     create -k "HKLM\System\CurrentControlSet\Control\Citrix\VirtualChannels\Clipboard\ClipboardSelection" -t "REG_DWORD" -v "Flags" -d "0x00000003" --force
    
     update -k "HKLM\System\CurrentControlSet\Control\Citrix\VirtualChannels\Clipboard\ClipboardSelection" -v "Flags" -d "0x00000003"
    

Step 1g: Create a master image

  1. Run /opt/Citrix/VDA/sbin/deploymcs.sh.
  2. On XenServer, shut down the template VM. Create and name a snapshot of your master image.

Step 2: Create a Machine Catalog

In Citrix Studio, create a Machine Catalog and specify the number of VMs to create in the catalog. Do other configuration tasks as needed. For more information, see Create a machine catalog using Studio.

Step 3: Create a Delivery Group

A Delivery Group is a collection of machines selected from one or more Machine Catalogs. The Delivery Group specifies which users can use those machines, and the applications and desktops available to those users. For more information, see Create Delivery Groups.

Use MCS to create Linux VMs on Azure

Step 1: Create a hosting connection to Azure in Citrix Studio

  1. In Citrix Studio, choose Configuration > Hosting > Add Connection and Resources to create a connection to Azure.

    image of creating the connection to azure

  2. Choose Microsoft Azure as the connection type.

    image of choosing azure connection type

  3. Type the subscription ID of your Azure account and type your connection name.

    image of typing azure subscription id

    A new connection appears in the hosting pane.

    image of new azure connection

Step 2: Prepare a master image

Follow Step 1 (except Step 1a and Step 1c) of the preceding Use MCS to create Linux VMs on XenServer section to prepare a master image.

After you finish installing applications on the template VM, shut down the template VM from the Azure portal. Ensure that the power status of the template VM is Stopped (deallocated).

Remember the name of the resource group here. You need the name to locate your master image on Azure.

image of stopped power status of template vm

Step 3: Create a Machine Catalog

In Citrix Studio, create a Machine Catalog and specify the number of VMs to create in the catalog. When creating the Machine Catalog, choose your master image from the resource group where the template VM belongs and find the VHD of the template VM, as shown below.

image of finding vhd of the template vm

Do other configuration tasks as needed. For more information, see the Knowledge Center article CTX219270 and Create a machine catalog using Studio.

Step 4: Create a Delivery Group

A Delivery Group is a collection of machines selected from one or more Machine Catalogs. The Delivery Group specifies which users can use those machines, and the applications and desktops available to those users. For more information, see Create Delivery Groups.

Use MCS to create Linux VMs on VMware vSphere

Step 1: Create a hosting connection to VMware in Citrix Studio

  1. Install vCenter Server in the vSphere environment. For more information, see VMware vSphere.

  2. In Citrix Studio, choose Configuration > Hosting > Add Connection and Resources to create a connection to VMware vSphere.

    image of creating connection to azure

  3. Choose VMware vSphere as the connection type.

    image of choosing vmware sphere

  4. Type the connection address (the vCenter Server URL) of your VMware account, your user name and password, and your connection name.

    image of vmware connection name

    A new connection appears in the hosting pane.

    image of new sphere connection

Step 2: Prepare a master image

Follow Step 1 (except Step 1a and Step 1c) of the preceding Use MCS to create Linux VMs on XenServer section to prepare a master image.

After you finish installing applications on the template VM, shut down the template VM from the VMware. Take a snapshot of the template VM.

Step 3: Create a Machine Catalog

In Citrix Studio, create a Machine Catalog and specify the number of VMs to create in the catalog. When creating the Machine Catalog, choose your master image from the snapshot list, as shown below.

image of choosing a master image

Do other configuration tasks as needed. For more information, see the Knowledge Center article CTX219270 and Create a machine catalog using Studio.

Step 4: Create a Delivery Group

A Delivery Group is a collection of machines selected from one or more Machine Catalogs. The Delivery Group specifies which users can use those machines, and the applications and desktops available to those users. For more information, see Create Delivery Groups.

To use MCS to upgrade your Linux VDA, do the following:

  1. Upgrade your Linux VDA on the template machine:

    For RHEL 7/CentOS 7:

    sudo rpm -U LinuxVDA-1811.el7_x.rpm
    

    For RHEL 6/CentOS 6:

    sudo rpm -U LinuxVDA-1811.el6_x.rpm
    

    For SUSE 12:

    sudo rpm -U LinuxVDA-1811.sle12_x.rpm
    

    For Ubuntu:

    sudo dpkg -i LinuxVDA-1811.ubuntu16.04.deb
    
  2. Edit /var/xdl/mcs/mcs.conf and /var/xdl/mcs/mcs_local_setting.reg.

  3. Take a new snapshot.

  4. In Citrix Studio, select the new snapshot to update your Machine Catalog. Wait before each machine restarts. Do not restart a machine manually.

Version

Use MCS to create Linux VMs