Setting Up Horizon 6 for Linux Desktops Horizon 6 Version 6.1.1 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
Setting Up Horizon 6 for Linux Desktops You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ 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 © 2015 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 6 for Linux Desktops 5 1 Installing and Configuring Horizon 6 for Linux Desktops 7 Features of a Horizon 6 for Linux Desktop 7 System Requirements for Horizon 6 for Linux 8 Create a Virtual Machine and Install Linux 10 Prepare a Linux Guest Operating System for Remote Desktop Deployment Install View Agent on a Linux Virtual Machine 12 Create a Desktop Pool That Contains Linux Virtual Machines 14 10 2 Configuring Linux Machines for vDGA 17 Configure RHEL 6.
Setting Up Horizon 6 for Linux Desktops 4 VMware, Inc.
Setting Up Horizon 6 for Linux Desktops The Setting Up Horizon 6 for Linux Desktops document provides information about setting up a Linux virtual machine for use as a VMware Horizon 6™ desktop, including preparing the Linux guest operating system, installing View Agent on the virtual machine, and configuring the machine in View Administrator for use in a Horizon 6 deployment.
Setting Up Horizon 6 for Linux Desktops 6 VMware, Inc.
Installing and Configuring Horizon 6 for Linux Desktops 1 To set up a Linux virtual machine as a remote desktop in a Horizon 6 environment, you must prepare the Linux guest operating system, install View Agent on the virtual machine, and configure the machine in View Administrator.
Setting Up Horizon 6 for Linux Desktops System Requirements for Horizon 6 for Linux Horizon 6 for Linux must meet certain operating system, Horizon 6, and vSphere platform requirements. Supported Linux Operating Systems for View Agent The following table lists the Linux operating systems that are supported on virtual machines in a desktop pool. Table 1‑1. Supported Linux Operating Systems for View Agent Linux Distribution Architecture Ubuntu 12.04 x86 and x64 RHEL 6.6 x86 and x64 CentOS 6.
Chapter 1 Installing and Configuring Horizon 6 for Linux Desktops Table 1‑2. Recommended vRAM Settings for Linux Guest Operating Systems vRAM Size Number of Monitors Maximum Resolution 10 MB 1 1600x1200 or 1680x1050 12 MB 1 1920x1440 16 MB 1 2560x1600 32 MB 2 2048x1536 or 2560x1600 48 MB 3 2048x1536 64 MB 3 2560x1600 64 MB 4 2048x1536 128 MB 4 2560x1600 RHEL and CentOS only support this configuration on vSphere 5.5.
Setting Up Horizon 6 for Linux Desktops Create a Virtual Machine and Install Linux You create a new virtual machine in vCenter Server for each remote desktop that is deployed in Horizon 6. You must install your Linux distribution on the virtual machine. Prerequisites n Verify that your deployment meets the requirements for supporting Linux desktops. See “System Requirements for Horizon 6 for Linux,” on page 8.
Chapter 1 Installing and Configuring Horizon 6 for Linux Desktops n Familiarize yourself with the steps for mounting and installing VMware Tools on a Linux virtual machine. See "Manually Install or Upgrade VMware Tools in a Linux Virtual Machine" in the vSphere Virtual Machine Administration document. n Familiarize yourself with the steps for configuring your Linux machine to be resolvable through DNS. These steps vary for the different Linux distributions and releases.
Setting Up Horizon 6 for Linux Desktops 9 If the Linux virtual machine is not connected to the Internet, manually download and install the required JRE version before you install View Agent. You do not have to take this step if the machine is connected to the Internet. In this case, the View Agent installer automatically downloads the JRE to the machine. If necessary, take the following steps to install the JRE: Linux Distribution Description Ubuntu 12.
Chapter 1 Installing and Configuring Horizon 6 for Linux Desktops n Verify that the View Connection Server administrative user that you provide with the installation command has the Agent Registration Administrators or Administrators role in View Administrator. Specifically, the Register Agent privilege is required to register View Agent with View Connection Server. Agent Registration Administrators is a restricted role that provides this minimum privilege.
Setting Up Horizon 6 for Linux Desktops install_viewagent.sh Command Usage and Options The install_viewagent.sh script installs View Agent on a Linux guest operating system. Use the following form of the install_viewagent.sh script in a command window in the gnome desktop environment. install_viewagent.sh command_option argument [command_option argument] . . . The install_viewagent.sh script includes mandatory and optional parameters. Table 1‑4. install_viewagent.
Chapter 1 Installing and Configuring Horizon 6 for Linux Desktops Prerequisites n Verify that View Agent is installed on the Linux guest operating systems. See “Install View Agent on a Linux Virtual Machine,” on page 12. n Verify that the Linux virtual machines are registered in View Connection Server. In View Administrator, select View Configuration > Registered Machines and select the Others tab. Verify that each machine's state is Available.
Setting Up Horizon 6 for Linux Desktops 16 VMware, Inc.
Configuring Linux Machines for vDGA 2 You can configure Horizon 6 for Linux virtual machines to use Virtual Dedicated Graphics Acceleration (vDGA) on NVIDIA GRID graphics cards that are installed on ESXi hosts. Shared GPU hardware acceleration (NVIDIA GRID vGPU) is not supported in Horizon 6 for Linux. The Autofit feature and multiple monitors are supported on Linux desktops that are configured to use vDGA.
Setting Up Horizon 6 for Linux Desktops 2 Click the Manage tab and click Settings. 3 In the Hardware section, click PCI Devices. 4 To enable DirectPath I/O passthrough for the NVIDIA GRID GPUs, click Edit. 5 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.
Chapter 2 Configuring Linux Machines for vDGA Install an NVIDIA GRID Driver on RHEL 6.6 To install an NVIDIA GRID driver on a RHEL 6.6 virtual machine, you must disable the default NVIDIA driver, download the NVIDIA GRID drivers, and configure the PCI device on the virtual machine. Prerequisites n Verify that the PCI device was added to the RHEL 6.6 virtual machine. See “Add a vDGA Pass-Through Device to a RHEL 6.6 Virtual Machine,” on page 18.
Setting Up Horizon 6 for Linux Desktops 8 Determine the kernel version that is running. uname -r The kernel version is displayed. For example: 2.6. 9 Start the NVIDIA installer with a flag pointing to the kernel source location. For example: sudo ./NVIDIA-Linux-x86_64-346.47.run --kernel-sourcepath=/usr/src/kernels/2.6. 10 Accept the NVIDIA software license agreement and select Yes to automatically update the X configuration settings.
Chapter 2 Configuring Linux Machines for vDGA For the BusID value, convert the hex to decimal: BusID "PCI:19:0:0" The Option lines are required to support the use of multiple monitors with vDGA. Use colons (:) as separators in the xorg.conf file. 15 Restart the virtual machine. The View Agent startup script initializes the X server and display topology. You can no longer view the virtual machine display in the vSphere console. 16 From Horizon Client, connect to the Linux desktop.
Setting Up Horizon 6 for Linux Desktops 22 VMware, Inc.
Bulk Deployment of Horizon 6 for Linux Desktops 3 With View Administrator, you can create a pool of Windows, but not Linux, desktop machines automatically. With vSphere PowerCLI, 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 responsibility for issues that might arise when you use and enhance the sample scripts.
Setting Up Horizon 6 for Linux Desktops 3 Setting Value Network Settings Use standard network settings. Primary DNS Specify a valid address. Clone virtual machines. For a sample script, see “Sample PowerCLI Script to Clone Linux Desktop Machines,” on page 25. 4 Install View Agent in virtual machines. For a sample script, see “Sample PowerCLI Script to Install View Agent on Linux Desktops,” on page 29. 5 Create a desktop pool.
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops 3 Power on the virtual machine and install the Linux distribution. 4 Create a user with root privileges, for example, ViewUser. This user is used to install and uninstall View Agent only. 5 Edit /etc/sudoers and add the line ViewUser ALL=(ALL) NOPASSWD:ALL. With this line in /etc/sudoers, no password is required to run sudo as ViewUser.
Setting Up Horizon 6 for Linux Desktops n Administrator login name for the vCenter Server n Administrator password for the vCenter Server n Clone type, which can be linked or full n Whether to disable vSphere VM console Script Content <# .SYNOPSIS Create Clones from a Master VM .DESCRIPTION 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 3 Bulk Deployment of Horizon 6 for Linux Desktops } #------------------------- Main Script --------------$vcAddress = Read-Host 'Your vCenter address' $vcAdmin = Read-Host 'Your vCenter admin user name' $vcPassword = Read-Host 'Your vCenter admin user password' -AsSecureString $vcPassword = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.
Setting Up Horizon 6 for Linux Desktops $deleteExisting = $line.DeleteIfPresent if (IsVMExists ($destVMName)) { Write-Host "VM $destVMName Already Exists in VC $vcAddress" if($deleteExisting -eq "TRUE") { Delete_VM ($destVMName) } else { Write-Host "Skip clone for $destVMName" continue } } $vm = get-vm $srcvm -ErrorAction Stop | get-view -ErrorAction Stop $cloneSpec = new-object VMware.VIM.VirtualMachineCloneSpec $cloneSpec.Location = new-object VMware.VIM.
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\CloneVMs.ps1 Your vCenter address: 10.117.44.
Setting Up Horizon 6 for Linux Desktops .NOTES #> #--------------------- Handle input -----------------"-----------------------------------------------------" $vcAddress = Read-Host 'Your vCenter address' $vcAdmin = Read-Host 'Your vCenter admin user name' $vcPassword = Read-Host 'Your vCenter admin user password' -AsSecureString $vcPassword = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops function RunCmdInVM($VMName, $cmd) { Write-Host "Run cmd '$cmd' in VM '$VMName' with user '$guestUser'" Invoke-VMScript -HostUser $hostAdmin -HostPassword $hostPassword -VM $VMName -GuestUser $guestUser -GuestPassword $guestpwd -Confirm:$false -ScriptText $cmd -ScriptType Bash } function UploadFileTovM($VMName, $localFile, $destFolder) { Write-Host "Upload File '$localFile' to '$destFolder' of VM '$VMName' with user '$guestUser'" Copy-VMGuestFile -H
Setting Up Horizon 6 for Linux Desktops } Disconnect-VIServer $vcAddress -Confirm:$false exit Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\InstallAgent.ps1 Your vCenter address: 10.117.44.
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops Script Content <# .SYNOPSIS Create Clones from a Master VM .DESCRIPTION The Tool is to uninstall the Linux Agent from desktination VM .NOTES #> #------------------- Handle input -------------------"-----------------------------------------------------" $vcAddress = Read-Host 'Your vCenter address' $vcAdmin = Read-Host 'Your vCenter admin user name' $vcPassword = Read-Host 'Your vCenter admin user password' -AsSecureString $vcPassword = [Runtime.
Setting Up Horizon 6 for Linux Desktops Write-Host "Upload File '$localFile' to '$destFolder' of VM '$VMName' with user '$guestUser'" Copy-VMGuestFile -HostUser $hostAdmin -HostPassword $hostPassword -VM $VMName -GuestUser $guestUser -GuestPassword $guestpwd -Confirm:$false -LocalToGuest -Destination $destFolder Source $localFile } #--------------------- Main -------------------------#Read input CSV file Disconnect-VIServer $vcAddress -Confirm:$false #Connect-VIServer $vcAddress -ErrorAction Stop -user $vc
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops Sample PowerCLI Script to Perform Operations on Linux Desktop Machines You can customize and use the following sample script to perform operations on any number of Linux desktop machines. To copy and paste the script content without page breaks, use the HTML version of this topic, available from the Horizon 6 documentation page at https://www.vmware.com/support/pubs/view_pubs.html.
Setting Up Horizon 6 for Linux Desktops function Delete_VM($VMToDelete) { Write-Host "Deleting VM $VMToDelete" Get-VM $VMToDelete | where { $_.
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops #check if file exists if (!(Test-Path $csvFile)) { write-host -ForeGroundColor Red "CSV File not found" exit } "-----------------------------------------------------" #--------------------- Main -------------------------#Read input CSV file Disconnect-VIServer $vcAddress -Confirm:$false #Connect-VIServer $vcAddress -ErrorAction Stop -user $vcAdmin -password $vcPassword Connect-VIServer $vcAddress -user $vcAdmin -password $vcPassword $csvData = Impor
Setting Up Horizon 6 for Linux Desktops Script Execution The following messages are from an execution of the script: PowerCLI C:\scripts> .\InstallAgent.ps1 Your vCenter address: 10.117.44.17 Your vCenter admin user name: administrator Your vCenter admin user password: ******* -------------------------------------------------Select action: 1). Power On 2). Power Off 3) Shutdown VM Guest 4). Restart VM 5). Restart VM Guest 6).
Administering Horizon 6 for Linux Desktops 4 After you deploy Horizon 6 for Linux desktops, you can manage, uninstall, and troubleshoot the virtual machines in your deployment.
Setting Up Horizon 6 for Linux Desktops 2 Double-click the pool ID of the manual pool. 3 Select the Inventory tab. 4 Select the unmanaged machines to remove. 5 Click Remove. 6 If users are logged in to the unmanaged machine-based desktops, choose whether to terminate the sessions or let the sessions remain active. 7 Option Description Leave active Active sessions remain until the user logs off. View Connection Server does not keep track of these sessions.
Chapter 4 Administering Horizon 6 for Linux Desktops Procedure 1 Open a terminal window on the virtual machine and run the View Agent uninstall script. For example: sudo /usr/lib/vmware/viewagent/bin/uninstall_viewagent.sh The script stops View Agent processes, deletes the View Agent service, and deletes the View Agent installation directory, /usr/lib/vmware/viewagent. 2 Manually delete the Horizon 6 for Linux configuration files, located in the /etc/vmware/ directory.
Setting Up Horizon 6 for Linux Desktops Configure Lossless PNG Images on Linux Desktops 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. By default, the lossless PNG mode is disabled. Procedure 1 On the Linux remote desktop, edit the /etc/vmware/config file.
Chapter 4 Administering Horizon 6 for Linux Desktops Gather Information About Horizon 6 for Linux Software To help manage and troubleshoot the Horizon 6 for Linux software, you can gather information about a View Agent installation on a Linux virtual machine. Procedure n Identify the View Agent version that is running on a Linux machine. Run the following command: cat /usr/lib/vmware/viewagent/Product.txt The output displays the View Agent version. For example: VMware-viewagent-linux-x.
Setting Up Horizon 6 for Linux Desktops Collect Diagnostic Information for a Horizon 6 for Linux Machine You can collect diagnostic information to help VMware Technical Support diagnose and resolve issues with a Horizon 6 for Linux machine. You create a Data Collection Tool (DCT) bundle that gathers the machine's configuration information and logs into a compressed tarball. Procedure 1 Log in to the Linux virtual machine as a user with the required privileges.
Chapter 4 Administering Horizon 6 for Linux Desktops 3 If the View administrator password includes a special character, escape the special character with a backslash. For example: ab\$cdef 4 On the Linux guest operating system, open the View Agent registration log. /usr/lib/vmware/viewagent/viewagent-registration.
Setting Up Horizon 6 for Linux Desktops As a workaround, you can manually add the View Connection Server FQDNs to the /etc/hosts file on the Linux machine. However, this method is not recommended for production use. The proper solution is to configure the DNS service so that the Linux machine can resolve the View Connection Server FQDNs. After you take these steps, ping the View Connection Server hostnames to verify that they can be resolved. For example: ping sm-15q1-broker.myDomain.
Chapter 4 Administering Horizon 6 for Linux Desktops Configuring the Linux Firewall to Allow Incoming TCP Connections To allow users to connect to their Linux desktops, the desktops must be able to accept incoming TCP connections from Horizon Client devices, security server, and View Connection Server. On Ubuntu and Kylin distributions, the iptables firewall is configured by default with an input policy of ACCEPT.
Setting Up Horizon 6 for Linux Desktops 48 VMware, Inc.
Index B bulk deployment create a virtual machine template for cloning 24 input file for sample scripts 25 overview 23 D desktops 5 preparing for desktop use 10 setting up for use as desktops 7 vSphere console display 42 lossless PNG display, Linux desktops 42 N NVIDIA GRID driver, installing on RHEL 6.
Setting Up Horizon 6 for Linux Desktops 50 VMware, Inc.