Setting Up Horizon 7 for Linux Desktops Last modified 15 SEP 2017 VMware Horizon 7 7.
Setting Up Horizon 7 for Linux Desktops You can find the most up-to-date technical documentation on the VMware Web site at: https://docs.vmware.com/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com Copyright © 2016, 2017 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc.
Contents Setting Up Horizon 7 for Linux Desktops 5 1 Features and System Requirements 7 Features of Horizon Linux Desktops 7 Overview of Configuration Steps for Horizon 7 for Linux Desktops System Requirements for Horizon 7 for Linux 11 10 2 Preparing a Linux Virtual Machine for Desktop Deployment 19 Create a Virtual Machine and Install Linux 19 Prepare a Linux Machine for Remote Desktop Deployment 20 Install Dependency Packages for Horizon Agent 22 3 Setting Up Active Directory Integration for Linux
Setting Up Horizon 7 for Linux Desktops 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools 65 Overview of Bulk Deployment of Linux Desktops 65 Overview of Bulk Upgrade of Linux Desktops 67 Create a Virtual Machine Template for Cloning Linux Desktop Machines 67 Input File for the Sample PowerCLI Scripts to Deploy Linux Desktops 69 Sample Script to Clone Linux Virtual Machines 69 Sample Script to Join Cloned Virtual Machines to AD Domain 73 Sample Script to Join Cloned Virtual Machines to AD Domain Usi
Setting Up Horizon 7 for Linux Desktops The Setting Up Horizon 7 for Linux Desktops document provides information about setting up a Linux virtual ® machine for use as a VMware Horizon 7 desktop, including preparing the Linux guest operating system, installing Horizon Agent on the virtual machine, and configuring the machine in View Administrator for use in a Horizon 7 deployment.
Setting Up Horizon 7 for Linux Desktops 6 VMware, Inc.
Features and System Requirements 1 With Horizon 6 or later, users can connect to remote desktops that run the Linux operating system. This chapter includes the following topics: n “Features of Horizon Linux Desktops,” on page 7 n “Overview of Configuration Steps for Horizon 7 for Linux Desktops,” on page 10 n “System Requirements for Horizon 7 for Linux,” on page 11 Features of Horizon Linux Desktops Horizon 7 version 7.2 introduces several new features for Linux desktops.
Setting Up Horizon 7 for Linux Desktops n 2D/vSGA desktop on vSphere 6.0 or later supports a maximum resolution of 2048x1536 on four monitors or a maximum resolution of 2560x1600 on three monitors. For Ubuntu 14.04/16.04, you must disable Compiz to support multiple monitors. See http://kb.vmware.com/kb/2114809 for more information. For SLES 12 SP1, you must use the default package with kernel level kerneldefault-3.12.49-11.1.
Chapter 1 Features and System Requirements Audio-in Audio input redirection from a client host to a remote Linux desktop is supported. This feature is not based on the USB redirection function. If you want this feature enabled, you must select it during installation. You must select the system default audio in device "PulseAudio server (local)" in your application for the audio input. The feature is supported on: n Ubuntu 14.04/16.
Setting Up Horizon 7 for Linux Desktops The Horizon 7 Agent for Linux implements cryptographic modules that are designed for FIPS 140-2 compliance. These modules were validated in operational environments listed in CMVP certificate #2839 and #2866, and were ported to this platform. However, the CAVP and CMVP testing requirement to include the new operational environments in VMware's NIST CAVP and CMVP certificates remains to be completed on the product roadmap.
Chapter 1 Features and System Requirements 4 Configure the Linux guest operating system to authenticate with Active Directory. This step is implemented with 3rd-party software, based on the requirements in your environment, and is not described in this guide. 5 Configure 3D capabilities on your ESXi hosts and the Linux virtual machine. Follow the procedures for the 3D feature you intend to install. n See “Configure Supported RHEL Distributions for vGPU,” on page 29.
Setting Up Horizon 7 for Linux Desktops Table 1‑2. Required Platform and Horizon 7 Software Versions Platform and Software Supported Versions vSphere platform version n vSphere 6.0 U2 or a later release vSphere 6.5 or a later release Horizon environment n Horizon Connection Server 7.2 Horizon Client software n Horizon Client 4.5.0 for Android Horizon Client 4.5.0 for Windows Horizon Client 4.5.0 for Linux Horizon Client 4.5.0 for Mac OS X Horizon Client 4.5.0 for iOS (iPad Pro) HTML Access 4.5.
Chapter 1 Features and System Requirements Table 1‑5. Supported Desktop Environments Linux Distribution Default Desktop Environment Desktop Environment Supported by Horizon 7 for Linux Desktop Ubuntu 14.04/16.04 Unity Gnome Fallback/Flashback (Metacity) Ubuntu 12.
Setting Up Horizon 7 for Linux Desktops Table 1‑6. Default Kernel Versions Linux Distribution Default Kernel Version RHEL/CentOS 6.9 2.6.32-696.el6.x86_64 SUSE 12 SP2 4.4.21-69-default RHEL/CentOS 7.3 3.10.0-514.el7.x86_64 Ubuntu 14.04 3.13.0-24-generic Ubuntu 16.04 4.4.0-21-generic If your Linux system uses a kernel version that is different from the default versions included with the Horizon for Linux installer, you must download the USB VHCI source code from https://sourceforge.
Chapter 1 Features and System Requirements Table 1‑7. Compile and Install USB VHCI Driver Linux Distribution Steps to Compile and Install USB VHCI Driver Ubuntu 14.04 Ubuntu 16.04 Compile and install the VHCI drivers. RHEL/CentOS 6.9 RHEL/CentOS 7.3 1 Install the dependency packages. 2 # yum install gcc-c++ # yum install kernel-devel-$(uname -r) # yum install kernel-headers-$(uname -r) # yum install patch Compile and install the VHCI drivers. # # # # tar -xzvf vhci-hcd-1.15.tar.gz cd vhci-hcd-1.
Setting Up Horizon 7 for Linux Desktops Virtual Machine Settings for 2D and vSGA Graphics When you create certain Horizon 7 for Linux virtual machines, you must change the memory settings and configuration parameters to the minimum values recommended. Virtual machines that are configured to use NVIDIA vDGA use the NVIDIA physical graphic card. Virtual machines that are configured to use NVIDIA GRID vGPU use the NVIDIA virtual graphic card, which is based on the NVIDIA physical graphic accelerator.
Chapter 1 Features and System Requirements If a Linux virtual machine's Number of displays value is less than the actual required count, one or more monitors display blank for the desktop. If you encounter an autofit issue with the recommended settings, you can specify a larger vRAM size. vSphere Client permits a maximum vRAM size of 128 MB. If your specified size exceeds 128 MB, you must modify the vmx configuration file manually. The following example specifies a vRAM size of 256 MB: svga.
Setting Up Horizon 7 for Linux Desktops Multiple-monitor connection might require a screen size larger than 4096x4096. To bypass this limitation, use one of the following solutions: n If you have to use VMware Hardware version 11 (HWv11) or later for your virtual machine, add the following line into the virtual machine's VMX configuration file: mks.enable3d = TRUE With this solution, the Linux operating system can report 3D capabilities to software applications, such as Chrome.
Preparing a Linux Virtual Machine for Desktop Deployment 2 Setting up a Linux desktop involves creating a Linux virtual machine and preparing the operating system for remote desktop deployment.
Setting Up Horizon 7 for Linux Desktops 2 Configure custom configuration options. a Right-click the virtual machine and click Edit Settings. b Specify the number of vCPUs and the vMemory size. For recommended values, follow the guidelines in the installation guide for your Linux distribution. For example, Ubuntu 12.04 recommends configuring 2048 MB for vMemory and 2 vCPUs. c Select Video card and specify the number of displays and the total video memory (vRAM).
Chapter 2 Preparing a Linux Virtual Machine for Desktop Deployment 2 Right-click the VMware Tools installer file, VMwareTools.x.x.x-xxxx.tar.gz, click Extract to, and select the desktop for your Linux distribution. The vmware-tools-distrib folder is extracted to the desktop. 3 On the VM, log in as root and open a terminal window. 4 Uncompress the VMware Tools tar installer file. For example: tar zxpf /mnt/cdrom/VMwareTools-x.x.x-yyyy.tar.gz 5 Run the installer and configure VMware Tools.
Setting Up Horizon 7 for Linux Desktops After installing VMware Tools, if you upgrade the Linux kernel, VMware Tools might stop running. To resolve the problem, see http://kb.vmware.com/kb/2050592. Install Dependency Packages for Horizon Agent Horizon Agent for Linux has some dependency packages unique to a Linux distribution. You must install these packages before installing Horizon Agent for Linux.
Chapter 2 Preparing a Linux Virtual Machine for Desktop Deployment n On Ubuntu 16.04 desktops with multi-monitors, gnome-session-flashback is needed to disable Compiz for better performance.. sudo apt-get install gnome-session-flashback VMware, Inc.
Setting Up Horizon 7 for Linux Desktops 24 VMware, Inc.
Setting Up Active Directory Integration for Linux Desktops 3 View uses the existing Microsoft Active Directory (AD) infrastructure for user authentication and management. You can integrate the Linux desktops with Active Directory so that users can log in to a Linux desktop using their Active Directory user account.
Setting Up Horizon 7 for Linux Desktops If you use the LDAP-based solutions, you need to do the configuration in a template virtual machine and no additional steps are required in the cloned virtual machines. If you use the Winbind Domain Join solution or other Keberos authentication-based solution, you need join the template virtual machine to the Active Directory, and re-join the cloned virtual machine to the Active Directory.
Chapter 3 Setting Up Active Directory Integration for Linux Desktops View does not require the user name to be case-sensitive. You must ensure that the Linux operating system can handle case-insensitive user names. n For Winbind, the user name is case-insensitive by default. n For OpenLDAP, Ubuntu uses NSCD to authenticate users and is case-insensitive by default. RHEL and CentOS use SSSD to authenticate users and the default is case-sensitive. To change the setting, edit the file /etc/sssd/sssd.
Setting Up Horizon 7 for Linux Desktops 28 VMware, Inc.
Setting Up Graphics for Linux Desktops 4 You can configure the currently supported RHEL distributions to take advantage of NVIDIA capabilities on ESXi host or on a guest operating system. VM Clone Requirements for Setting Up 3D Graphics You must consider the following requirements for VM Clone before setting up 3D graphics. For vGPU and vSGA, complete the graphic setup in the base VM. Clone the VMs. The graphic settings n work for cloned VMs and no further settings are required.
Setting Up Horizon 7 for Linux Desktops Install the VIB for the NVIDIA GRID vGPU Graphics Card on the ESXi Host You must download and install the VIB for your NVIDIA GRID graphics card on the ESXi 6.0 U1 or later host. NVIDIA provides a vGPU software package that includes a vGPU Manager, which you install on the ESXi host in this procedure, and a Linux Display Driver, which you will install on the Linux virtual machine in a later procedure. Prerequisites n Verify that vSphere 6.
Chapter 4 Setting Up Graphics for Linux Desktops This is a new requirement with the NVIDIA 352.* host driver: # /etc/init.d/nvidia-vgpu start Restart xorg, which is used for GPU assignment: # /etc/init.d/xorg start 9 Verify that the xorg service is running after the host is restarted. Configure a Shared PCI Device for vGPU on the Linux Virtual Machine To use NVIDIA vGPU, you must configure a shared PCI device for the Linux virtual machine.
Setting Up Horizon 7 for Linux Desktops Table 4‑1. Virtual GPU Types Available for NVIDIA GRID M60 vGPU on Linux Virtual Machines (Continued) Display Heads Maximum Resolution Maximum Virtual GPUs Per Physical GPU Maximum Virtual GPUs Per Physical Board Virtual GPU Type Physical Board Physical GPUs FB Per Virtual GPU GRID M60-2q GRID M60 two 2G 4 2560x1600 4 8 GRID M60-4q GRID M60 two 4G 4 3840x2160 2 4 GRID M60-8q GRID M60 two 8G 4 3840x2160 1 2 Table 4‑2.
Chapter 4 Setting Up Graphics for Linux Desktops c Edit the blacklist.conf file. sudo vi /etc/modprobe.d/blacklist.conf d Add the following line anywhere in the blacklist.conf file. blacklist nouveau 2 Restart the virtual machine. The display has a changed look and feel. 3 (Optional) Verify that the Nouveau driver is disabled. /sbin/lsmod | grep nouveau If the grep search does not return any results, the Nouveau driver is disabled. 4 Copy the NVIDIA Linux Display Driver to the virtual machine.
Setting Up Horizon 7 for Linux Desktops Procedure 1 Restart the Linux virtual machine. The Horizon Agent startup script initializes the X server and display topology. You can no longer view the virtual machine display in the vSphere console. 2 From Horizon Client, connect to the Linux desktop. 3 In the Linux desktop session, verify that the NVIDIA display driver is installed. Open a terminal window and run the glxinfo | grep NVIDIA command. The NVIDIA driver output is displayed.
Chapter 4 Setting Up Graphics for Linux Desktops 4 5 To enable DirectPath I/O passthrough for the NVIDIA GRID GPUs, click Edit. Icon Description Green icon The PCI device is active and can be enabled. Orange icon The state of the device has changed. You must reboot the host before you can use the device. Select the NVIDIA GRID GPUs and click OK. The PCI devices are added to the table, DirectPath I/O PCI Devices Available to VMs.
Setting Up Horizon 7 for Linux Desktops Procedure 1 Disable and blacklist the default NVIDIA Nouveau driver. a Edit the grub.conf file. For RHEL 6, the file is /boot/grub/grub.conf. RHEL Version Command 6 sudo vi /boot/grub/grub.conf b Add the rdblacklist=nouveau line at the end of the kernel options. c Edit the blacklist.conf file. sudo vi /etc/modprobe.d/blacklist.conf d Add the following line anywhere in the blacklist.conf file. blacklist nouveau 2 Restart the virtual machine.
Chapter 4 Setting Up Graphics for Linux Desktops Create a desktop pool that contains the configured Linux virtual machines. See “Create a Manual Desktop Pool for Linux,” on page 57. Verify That the NVIDIA Display Driver Is Installed You can verify that the NVIDIA display driver is installed on a RHEL 6 virtual machine by displaying the NVIDIA driver output in a View desktop session. Prerequisites n Check that you installed the NVIDIA display driver.
Setting Up Horizon 7 for Linux Desktops Prerequisites n Verify that vSphere 6.0 U1 or a later release is installed in your environment. n Verify that NVIDIA driver is installed in your environment. n Verify that the NVIDIA GRID K1 or K2 GPUs are installed on the ESXi host. Procedure 1 Download the VIB for your NVIDIA GRID vGPU graphics card from the NVIDIA Driver Downloads site. Select the appropriate VIB version from the drop-down menus.
Chapter 4 Setting Up Graphics for Linux Desktops 3 In the Virtual Hardware tab, click Video card to expand the menu settings. 4 Set the Total video memory to 128 MB. 5 For 3D Graphics, select Enable 3D Support. 6 For 3D Renderer, select Hardware from the drop-down menu. 7 For 3D Memory, select a suitable value for your application requirements. If your users connect to more than 3 monitors, set this value to at least 1024 MB. 8 Click OK. 9 Power on the virtual machine.
Setting Up Horizon 7 for Linux Desktops 40 VMware, Inc.
Installing Horizon Agent 5 You must install Horizon Agent on the Linux desktops so that View Connection Server can communicate with and manage the desktops.
Setting Up Horizon 7 for Linux Desktops Procedure 1 Download the Horizon Agent for Linux installer file from the VMware download site at https://my.vmware.com/web/vmware/downloads. Under Desktop & End-User Computing, select the VMware Horizon 7 download, which includes the Horizon Agent for Linux installer. The installer filename is VMware-horizonagent-linux-x86_64-y.y.y-xxxxxxx.tar.gz for 64-bit Linux where y.y.y is the version number and xxxxxxx is the build number.
Chapter 5 Installing Horizon Agent Table 5‑2. install_viewagent.sh Optional Parameters Optional Parameters Description -a yes|no Install or bypass audio input redirection support. Default is yes. -f yes|no Install or bypass support of the cryptographic modules designed for Federal Information Processing Standards (FIPS) 140-2. Default is no. For more information, see the FIPS 140-2 Mode description in “Features of Horizon Linux Desktops,” on page 7. -j JMS SSL keystore password.
Setting Up Horizon 7 for Linux Desktops Procedure 1 2 Install the private key and the certificate to VMwareBlastServer. a Rename the private key to rui.key and the certificate to rui.crt . b Run sudo chmod 550 /etc/vmware/ssl. c Copy the rui.crt and rui.key to /etc/vmware/ssl. d Run chmod 440 /etc/vmware/ssl. Install the root and intermediate Certificate Authority into the Linux OS Certificate Authority store. Note Check your Linux distribution documentation for the Linux system settings change.
Chapter 5 Installing Horizon Agent Table 5‑4. Optional Parameters for Upgrading the Horizon Agent (Continued) Parameter Description -r yes|no Reboot the operating system after installation. The default is no. -C yes|no Install or bypass Clipboard Redirection support. Default is yes. -F yes|no Install or bypass CDR support. Default is yes. -M yes|no Upgrade the Linux Agent to managed|unmanaged agent. The default value is yes. -S yes|no Install or bypass SingleSignOn (SSO) support. Default is yes.
Setting Up Horizon 7 for Linux Desktops Uninstall Horizon 7 for Linux Machines To uninstall Horizon 7 for Linux on a virtual machine, you must uninstall Horizon Agent and remove configuration files. Prerequisites Verify that the VMwareBlastServer process is not running. To stop this process, ensure that you log off the machine and no desktop session is active, or reboot the machine. Procedure 1 Open a terminal window on the virtual machine and run the Horizon Agent uninstall script.
Configuration Options for Linux Desktops 6 You can configure various options to customize the user experience using configuration files.
Setting Up Horizon 7 for Linux Desktops Table 6‑1. Configuration Options in /etc/vmware/config 48 Option Value/Format Default Description RemoteDisplay.alwaysLossless true or false false Graphic applications, especially graphic design applications, require pixel-exact rendering of images in the client display of a Linux desktop. You can configure a lossless PNG mode for images and video playback that are generated on a Linux desktop and rendered on the client device.
Chapter 6 Configuration Options for Linux Desktops Table 6‑1. Configuration Options in /etc/vmware/config (Continued) Option Value/Format Default Description cdrserver.permissions R RW Use this option to apply additional read/write permissions that Horizon Agent has on the folders shared by Horizon Client. For example: n If the folder shared by Horizon Client has read and write permissions and you set cdrserver.permissions=R, then Horizon Agent only has read access permissions.
Setting Up Horizon 7 for Linux Desktops Table 6‑1. Configuration Options in /etc/vmware/config (Continued) 50 Option Value/Format Default Description viewusb.SplitVidPid {m|o}: vidxxxx_pidyyyy([exintf:z z[;exintf:ww]] )[;...] undefined Set this option to treat the components of a composite USB device specified by Vendor and Product IDs as separate devices.
Chapter 6 Configuration Options for Linux Desktops Table 6‑1. Configuration Options in /etc/vmware/config (Continued) Option Value/Format Default Description viewusb.ExcludeAllDevices {true|false} undefined, which equates to false Use this option to exclude or include all USB devices from being redirected. If set to true, you can use other policy settings to allow specific devices or families of devices to be redirected.
Setting Up Horizon 7 for Linux Desktops Table 6‑1. Configuration Options in /etc/vmware/config (Continued) Option Value/Format Default Description mksvhan.clipboardSize An integer 1024 Use this option to specify the clipboard maximum size to copy and paste. RemoteDisplay.maxBandwidth Kbps An integer 4096000 Specifies the maximum bandwidth in kilobits per second (kbps) for a VMware Blast session. The bandwidth includes all imaging, audio, virtual channel, and VMware Blast control traffic.
Chapter 6 Configuration Options for Linux Desktops Table 6‑2. Configuration Options in /etc/vmware/viewagent-custom.conf Option Value Default Description Subnet NULL or network address and mask in IP addres s/CIDR format NULL If there are multiple local IP addresses with different subnets, use this option to set the subnet that the Linux Agent provides to the View Connection Server.
Setting Up Horizon 7 for Linux Desktops Table 6‑2. Configuration Options in /etc/vmware/viewagent-custom.conf (Continued) Option Value Default Description SSLCipherServerPr eference true or false true Use this option to enable or disable the option SSL_OP_CIPHER_SERVER_PREFERENCE. For more information, see https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_ set_options.html.
Chapter 6 Configuration Options for Linux Desktops Table 6‑3. Example Blast Configuration Options in /etc/vmware/config Option name Parameter Highspeed LAN LAN Dedicate d WAN Broadba nd WAN Lowspeed WAN Bandwidth settings RemoteDisplay.max BandwidthKbps 1000000 (1 Gbps) 1000000 (1 Gbps) 1000000 (1 Gbps) 5000 (5 Mbps) 2000 (2 Mbps) 1000 (1 Mbps) Max FPS RemoteDisplay.max FPS 60 30 30 20 15 5 Audio Playback RemoteDisplay.
Setting Up Horizon 7 for Linux Desktops 56 VMware, Inc.
Create and Manage Linux Desktop Pools 7 To configure Linux virtual machines for use as remote desktops, you must create a desktop pool with Linux virtual machines. Horizon for Linux supports the following desktop pool types: n Manual desktop pool with vCenter virtual machine n Automated full-clone desktop pool To create a manual desktop pool with a vCenter virtual machine, you must install the Horizon agent on all virtual machines.
Setting Up Horizon 7 for Linux Desktops 4 On the Machine Source page, select vCenter virtual machinesand click Next. 5 On the vCenter Server page, select the appropriate vCenter server and click Next. 6 Enter the desktop pool id. 7 On the Desktop Pool Settings page, set the following options.
Chapter 7 Create and Manage Linux Desktop Pools Table 7‑1.
Setting Up Horizon 7 for Linux Desktops Procedure 1 Create a guest customization specification. See "Create a Customization Specification for Linux in the vSphere Web Client" in the vSphere Virtual Machine Administration document. When you create the specification, make sure that you specify the following settings correctly. Setting Value Target Virtual Machine OS Linux Computer Name Use the virtual machine name. Domain Specify the domain of the View environment.
Chapter 7 Create and Manage Linux Desktop Pools b VM folder location c Host or cluster d Resource pool e Datastores 11 On the Advanced Storage Options page, select the appropriate storage options and click Next. 12 On the Guest Customization page, select your guest customization for Linux and click Next. 13 On the Ready to Complete page, review the details and select Entitle users after this wizard finishes. 14 Click Finish.
Setting Up Horizon 7 for Linux Desktops Create a Full-Clone Automated Desktop Pool Add-AutomaticPool -DefaultProtocol Blast -AllowProtocolOverride $false -threedRender usevc|vgpu ` -Pool_id -Vc_id ` -NamePrefix " ` -templatePath ` -VmFolderPath ` -ResourcePoolPath ` -dataStorePaths ` -customizationSpecName ` [more parameters] For Linu
Chapter 7 Create and Manage Linux Desktop Pools Logoff Desktop Connection n Logoff from the desktop session of myuser. Get-RemoteSession -Username "mydomain.org\myuser" | Send-SessionLogoff For more information on broker PowerCLI cmdlet, see Using View PowerCLI in View Integration. VMware, Inc.
Setting Up Horizon 7 for Linux Desktops 64 VMware, Inc.
Bulk Deployment of Horizon 7 for Manual Desktop Pools 8 With View Administrator, you can create a pool of Windows, but not Linux, desktop machines automatically. However, you can develop scripts that automate the deployment of a pool of Linux desktop machines. The sample scripts that are provided are for illustration purposes only. VMware does not accept any responsibility for issues that might arise when you use the sample scripts.
Setting Up Horizon 7 for Linux Desktops PowerCLI SSH No need to install additional tools. n For Ubuntu, you need to install the SSH server with the command sudo apt-get install openssh-server. For RHEL and CentOS, openssh-server is installed by default but you need to ensure that the firewall settings allow ssh. n Need to download the SSH client applications pscp.exe and plink.exe and put them in the same folder as the PowerCLI scripts. Uploading files and command execution are slower.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools See “Sample Script to Upload Configuration Files to Linux Virtual Machines,” on page 79 or “Sample Script to Upload Configuration Files to Linux Virtual Machines Using SSH,” on page 83. 6 Create a desktop pool. See “Create a Manual Desktop Pool for Linux,” on page 57.
Setting Up Horizon 7 for Linux Desktops n Familiarize yourself with the steps for creating virtual machines in vCenter Server and installing guest operating systems. See "Creating and Preparing Virtual Machines" in the Setting Up Virtual Desktops in Horizon 7 document. n Familiarize yourself with the recommended video memory (vRAM) values for the monitors you will use with the virtual machine. See “System Requirements for Horizon 7 for Linux,” on page 11.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools 9 For RHEL and CentOS, enable the Network Connection setting Connect automatically. 10 Perform the AD integration tasks. 11 Perform the steps to set up graphics. 12 Install Horizon agent sudo ./install_viewagent.sh -A yes 13 Perform additional configurations using the View configuration files. 14 Shut down the virtual machine and create a snapshot.
Setting Up Horizon 7 for Linux Desktops n Whether to disable vSphere VM console Script Content <# Create Clones from a Master VM The Tool supports creation of Full clone and linked clone from Master VM. The parent VM is required for the linked-clone to work and the parent VMs file cannot be renamed or moved.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools $extra = New-Object VMware.Vim.optionvalue $extra.Key="RemoteDisplay.maxConnections" $extra.Value="0" $vmConfigSpec.extraconfig += $extra $vm = Get-VM $VMToDisableConsole | Get-View $vm.ReconfigVM($vmConfigSpec) } function Delete_VM() { Param($VMToDelete) Write-Host "Deleting VM $VMToDelete" Get-VM $VMToDelete | where { $_.
Setting Up Horizon 7 for Linux Desktops Write-Host 'Exit since failed to login vCenter' exit } else { Write-Host 'vCenter is connected' } #Read input CSV file $csvData = Import-CSV $csvFile #$csvData = Import-CSV $csvFile header("VMName","Parentvm","CustomSpec","Datastore","Host","FromSnapshot","DeleteIfPresent") foreach ($line in $csvData) { "`n-----------------------------------------------------" $VMName = $line.VMName write-host -ForeGroundColor Yellow "VM: $VMName`n" $destVMName=$line.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools $task = $vm.CloneVM_Task($vm.parent, $destVMName, $cloneSpec) # Get the task object $task = Get-Task | where { $_.
Setting Up Horizon 7 for Linux Desktops n Administrator password for the ESXi host n User login name for the Linux VM n User password for the Linux VM n Login name of an AD user that is authorized to join machines to the domain n Password of the authorized AD user Script Content <# .SYNOPSIS run command "sudo /usr/bin/net ads join" .DESCRIPTION The tool is to run the command "sudo /usr/bin/net ads join" to join Linux to AD .
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools "`nPlease type the AD user password." "Plase note that special character in password may not work with the script" $adUserPassword = GetInput -prompt 'Your AD user password' -IsPassword $true "-----------------------------------------------------" #$csvFile = Read-Host 'Csv File ' $csvFile = '.\CloneVMs.
Setting Up Horizon 7 for Linux Desktops -------------------------------------------------Your VM guest OS user name: ViewUser Your VM guest OS user password: ******* -------------------------------------------------Type the AD user name to join the AD: viewadmin Please type the AD user password. Please note that special character in password may not work with the script.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools { $input = Read-Host -AsSecureString $input = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin gToBSTR($input)) } else { $input = Read-Host } [Console]::ResetColor() return $input } function Check_SSH_Client { Param($IsPlink, $IsPSCP) if ($IsPlink) { if (Test-Path ".\plink.
Setting Up Horizon 7 for Linux Desktops $command = "echo yes | .\plink.exe -ssh -l $user -pw $password $IP " + '"' + $cmd +'"' $output = Invoke-Expression $command return $output } else { echo yes | .\plink.exe -ssh -l $user -pw $password $IP "$cmd" } } function UploadFileViaSSH { Param($VM_Name, $User, $Password, $LocalPath, $DestPath) $VM= Get-VM $VM_Name $IP = $VM.guest.IPAddress[0] $command = "echo yes | .\pscp.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools { Write-Host 'vCenter is connected' } #Read input CSV file $csvData = Import-CSV $csvFile $destFolder = "/home/$guestUser/" #Handle VMs one by one foreach ($line in $csvData) { "-----------------------------------------------------" $VMName = $line.
Setting Up Horizon 7 for Linux Desktops n Administrator login name for the vCenter Server n Administrator password for the vCenter Server n Administrator login name for the ESXi host n Administrator password for the ESXi host n User login name for the Linux VM n User password for the Linux VM Script Content <# Upload the configuration files config and viewagent-custom.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools $config_File = "config" $customConf_File = "viewagent-custom.conf" #check if config file exists if(Test-Path $config_File) { $setConfig = $true write-host -ForeGroundColor Yellow '"config" file found' } else { write-host -ForeGroundColor Yellow '"config" file not found, skip it' } if(Test-Path $customConf_File) { $setCustomConf = $true write-host -ForeGroundColor Yellow '"viewagent-custom.
Setting Up Horizon 7 for Linux Desktops #Try to delete the configuration file from home folder on destination VM $cmd = "rm -rf config viewagent-custom.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools Sample Script to Upload Configuration Files to Linux Virtual Machines Using SSH You can customize and use the following sample script to upload the configuration files config and viewagent-custom.conf to multiple Linux virtual machines (VMs). This script uses SSH to run commands on the Linux VMs.
Setting Up Horizon 7 for Linux Desktops if (Test-Path { write-host } else { write-host from its official web exit } } if ($IsPSCP) { if (Test-Path { write-host } else { write-host from its official web exit } } } ".\plink.exe") -ForeGroundColor Yellow 'SSH client "plink.exe" found' -ForeGroundColor Red 'SSH client "plink.exe" not found, please download site' ".\pscp.exe") -ForeGroundColor Yellow 'SSH client "pscp.exe" found' -ForeGroundColor Red 'SSH client "pscp.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools } #------------------------- Handle Input ------------------------"-----------------------------------------------------" Check_SSH_Client -IsPlink $true -IsPSCP $true "-----------------------------------------------------" write-host -ForeGroundColor Blue 'Please ensure your config file and viewagent-custom.
Setting Up Horizon 7 for Linux Desktops } else { Write-Host 'vCenter is connected' } #Read input CSV file $csvData = Import-CSV $csvFile $destFolder = "/home/$guestUser/" #Handle VMs one by one foreach ($line in $csvData) { "`n-----------------------------------------------------" $VMName = $line.VMName write-host -ForeGroundColor Yellow "VM: $VMName`n" #Try to delete the configuration file from home folder on destination VM $cmd = "rm -rf config viewagent-custom.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\UpdateOptionFile.ps1 -------------------------------------------------Please ensure your config file and view-agent.conf file are in current working directory. Your vCenter address: 10.117.44.
Setting Up Horizon 7 for Linux Desktops function GetInput { Param($prompt, $IsPassword = $false) $prompt = $prompt + ": " Write-Host $prompt -NoNewLine [Console]::ForegroundColor = "Blue" if ($IsPassword) { $input = Read-Host -AsSecureString $input = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools } "-----------------------------------------------------" #$csvFile = Read-Host 'Csv File ' $csvFile = '.\CloneVMs.
Setting Up Horizon 7 for Linux Desktops foreach ($line in $csvData) { "`n-----------------------------------------------------" $VMName = $line.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools } else { Write-Host $VMName": Uploaded installer's MD5Sum does NOT match the local installer's MD5Sum"; Write-Host $VMName": Skip the installation. Please check your network and VMware Tools status"; exit; } } Disconnect-VIServer $vcAddress -Confirm:$false exit Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\InstallAgent.
Setting Up Horizon 7 for Linux Desktops n Administrator login name for the ESXi host n Administrator password for the ESXi host n User login name for the Linux guest operating system n User password for the Linux guest operating system n Horizon Agent tar ball path n Upgrade to managed VM n Install the Smartcard redirection feature Script Content <# Upload the Linux Agent installer tar ball and re-install #> #----------------------------------------------------Functions-----------------------
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools } if ($IsPSCP) { if (Test-Path { write-host } else { write-host from its official web exit } } } ".\pscp.exe") -ForeGroundColor Yellow 'SSH client "pscp.exe" found' -ForeGroundColor Red 'SSH client "pscp.exe" not found, please download site' function RunCmdViaSSH { Param($VM_Name, $User, $Password, $Cmd, $returnOutput = $false) $VM= Get-VM $VM_Name $IP = $VM.guest.
Setting Up Horizon 7 for Linux Desktops { write-host exit -ForeGroundColor Red "You need accept the EULA with 'yes'(case sensitive)" } $vcAddress = GetInput -prompt "Your vCenter address" -IsPassword $false $vcAdmin = GetInput -prompt "Your vCenter admin user name" -IsPassword $false $vcPassword = GetInput -prompt "Your vCenter admin user password" -IsPassword $true "-----------------------------------------------------" $guestUser = GetInput -prompt 'Your VM guest OS user name' -IsPassword $false $guest
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools } #----------------------------------------------------Main-----------------------------------------------------------------#Get installer MD5Sum $installerMD5Hash = GetSourceInstallerMD5; #Connect to vCenter $VC_Conn_State = Connect-VIServer $vcAddress -user $vcAdmin -password $vcPassword if([string]::IsNullOrEmpty($VC_Conn_State)) { Write-Host 'Exit since failed to login vCenter' exit } else { Write-Host 'vCenter is connected' } #Read input
Setting Up Horizon 7 for Linux Desktops RunCmdViaSSH -VM_Name $VMName -User $guestUser -Password $guestPassword -Cmd $cmd $cmd = "sudo setenforce 0"; Write-Host "Set the selinux to permissive mode: $cmd" RunCmdViaSSH -VM_Name $VMName -User $guestUser -Password $guestPassword -Cmd $cmd $cmd = "sudo killall /usr/lib/vmware/viewagent/VMwareBlastServer/VMwareBlastServer" Write-Host "Stop VMwareBlastServer before upgrading: $cmd" RunCmdViaSSH -VM_Name $VMName -User $guestUser -Password $guestPassword -Cmd $cmd
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools Sample Script to Perform Operations on Linux Virtual Machines You can customize and use the following sample script to perform operations on multiple Linux virtual machines (VMs). The operations include powering on, powering off, shutting down, restarting, and deleting the VMs. This script can delete virtual machines from vCenter Server but not from View.
Setting Up Horizon 7 for Linux Desktops $input = Read-Host } [Console]::ResetColor() return $input } function IsVMExists ($VMExists) { Write-Host "Checking if the VM $VMExists [bool]$Exists = $false Exists" #Get all VMS and check if the VMs is already present in VC $listvm = Get-vm foreach ($lvm in $listvm) { if($VMExists -eq $lvm.
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools "Your selection is 3) Shutdown" } 4 { "Your selection is 4). Restart VM" } 5 { "Your selection is 5). Restart VM Guest" } 6 { "Your selection is 6). Delete VM" } default { "Invalid selection for action: $action" exit } } [Console]::ResetColor() $csvFile = '.\CloneVMs.
Setting Up Horizon 7 for Linux Desktops 4 { Get-VM $VMName | Restart-VM -Confirm:$false } 5 { Get-VM $VMName | Restart-VMGuest -Confirm:$false } 6 { if (IsVMExists ($VMName)) { Delete_VM ($VMName) } } default{} } Start-Sleep -s $sleepTime } Disconnect-VIServer $vcAddress -Confirm:$false exit Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\VMOperations.ps1 Your vCenter address: 10.117.44.
Troubleshooting Linux Desktops 9 Certain issues might arise when you manage Linux desktops. You can follow various procedures to diagnose and fix problems.
Setting Up Horizon 7 for Linux Desktops Troubleshooting Copy and Paste between Remote Desktop and Client Host Copy and Paste between the remote desktop and client host takes more than three seconds for maximum supported data of 1 MB. This issue does not occur if you copy and paste a small data size. Problem When you configure 1 vCPU and 1 GB memory for SLED 11 SP3/SP4 desktop, it might take more than three seconds to copy and paste between the remote desktop and local client host.
Chapter 9 Troubleshooting Linux Desktops SLES 12 SP1 Desktop does not Auto Refresh after Drag and Drop SLES 12 SP1 does not auto refresh in a multimon mode when you drag and drop a gnome terminal. Problem When you launch SLES 12 SP1 in a multimon mode and return to the window mode, the desktop does not refresh automatically when you drag and drop a gnome terminal. Cause The gnome terminal does not respond to the drag and drop operation. Solution 1 End the gnome-shell.
Setting Up Horizon 7 for Linux Desktops 104 VMware, Inc.
Index A Active Directory, integrating with Linux 25 automated full-clone desktop pool creation, Linux virtual machines 59 B broker powercli 61 bulk deployment create a virtual machine template for cloning 67 input file for sample scripts 69 overview 65 bulk upgrade 67 C configuration options audio out 47 clipboard redirection 47 example Blast settings for Linux desktops) 54 example client drive redirection for Linux desktops 55 left-handed mouse 47 lossless PNG mode 47 single sign-on (SSO) 47 configuring
Setting Up Horizon 7 for Linux Desktops configuring for vGPU 29 configuring for vSGA 37 S sample script clone desktop machines using SSH 76 perform operations on VMs 97 to clone desktop machines 69, 73 to upgrade Horizon Agent 87 upgrade Horizon Agent using SSH 91 upload configuration files 79 upload configuration files using SSH 83 sample scripts, input file 69 single sign-on 26 smart card redirection 26 sso failure 103 SSSD LDAP Authentication 25 T troubleshooting 101–103 troubleshooting, disconnecting