horizonlinuxSince version 6 Horizon has the possibility to use Linux desktops for VDI. There are other ways to access your Linux, like VNC,NX, X-terminals, or even SSH if you only need a text based session. By using Horizon to deliver your Linux desktop you get the option to amp up your Linux virtual desktop with graphical power with GRID cards, unified access by using the same client for Windows and Linux desktops and more.

The Linux desktop in Horizon was one of the things I had on my todo list, but today I finally managed to do it. So here it goes.

Supported distributions

Not all distributions are supported for various reasons. The current list of supported distributions are at the moment:

  • Ubuntu 14.04  x64
  • Ubuntu 12.04 x64
  • RHEL 6.6 and 7.1 x64
  • CentOS 6.6 and 7.1 x64
  • NeoKylin 6 Update 1 x64
  • SLED 11 SP3/SP4 x64
  • SLED 12 (supported for installation and connections) x64

Other version might work, nothing is guaranteed and certainly not supported. YMMV.

Before you begin

When you get started with your Linux VM’s, make sure that everything works. Make sure you have installed your Connection Server according to the best practices and that you can ping it and can resolve it in DNS. In my case I had to enable the Echo firewall rule in Windows Server 2012R2 and fix my backend.local DNS zone.

check-dns firewall-change

Installing the VM

For the installation I used Ubuntu 14.04, which is the long time support release of Ubuntu. The installation of Ubuntu is pretty straight forward. Of course the configuration itself needs some tweaking here and there for your organization. Remember though that you are creating a manual pool with multiple VMs in it, so every VM has te be created by hand. In the documentation of VMware on bulk deployment there are scripts to generate multiple Linux VMs.

newvm-linux

ubuntu-install

Make sure you use Gnome as your desktop manager. KDE isn’t supported with the Horizon agent.

For a lot of Linux distributions you can skip installing the VMware tools, since the Open VMware Tools are part of the installation. Check KB  2073803 for more information on the distributions. For Ubuntu I was able to install the Open VMware Tools with ‘sudo apt-get install open-vm-tools’ For the other systems you need to install the VMware Tools on the command line:

  1. In vSphere Web Client or vSphere Client, mount the VMware Tools virtual disk on the VM.
  2. Log into the virtual machine
  3. Start an terminal session (terminal/UXTerm/Xterm, whichever you like)
  4. The VMware Tools CD/ISO are automatically mounted. You can check this with df  It probably looks something like: df I used ‘df -h’ so the disk usage is shown in human readable format, but it isn’t necessary.
  5. If you don’t see a directory containing VMware Tools like the image above you have to mount it by hand with sudo mount /dev/cdrom /mnt . Mounting drives need root permission, hence the ‘sudo’
  6. unzip the VMware Tools with tar xzvf /<mount location>/VMwareTools-version>.tar.gz . This will create a directory ‘vmware-tools-distrib’
  7. Change to the directory with cd vmware-tools-distrib
  8. install VMware tools with sudo ./vmware-install.pl -d
  9. If you get a message on Open VMware Tools for your OS, double check if that is the case.
  10. answer the questions and you should have installed the VMware Tools

Don’t forget to clean up the directory, since this is your master image.

Before a Linux machine can be managed by Horizon 7, the machine must be able to communicate with Connection Server. You must configure networking on the Linux machine so that the Linux machine can ping the Connection Server instance using its FQDN (fully qualified domain name). For this test to work I had to enable ping (ICMP Echo) on the Windows firewall) <plaatje>

There are some other things to configure, for example if you are using OpenLDAP. For a complete list check out the Horizon 7 – prepare a Linux machine for Remote Desktop Deployment documentation There are also a couple of dependencies that you need to install. Which ones depend on the distribution. Check the complete list in the documentation.

For my Ubuntu desktop I installed the update for indicator-session. libexpat1 and libpng12-0 were already installed.

wget http://launchpadlibrarian.net/201393830/indicator-session_12.10.5+15.04.20150327-0ubuntu1_amd64.deb sudo dpkg -i ./indicator-session_12.10.5+15.04.20150327-0ubuntu1_amd64.deb

I didn’t integrate the Linux desktop with Active Directory because this is only a demonstration of what you can do.

Installing the Horizon Agent

To use your Linux VM in Horizon you need to install the Horizon Agent in the virtual machine. After downloading the agent from the VMware site you have to place it somewhere you can reach from your Linux VM. I copied it to my homedirectory from my laptop with scp. scp Extract the agent with  tar xzvf VMware-horizonagent-linux-x86_64-7.0.0-3617131.tar.gz After extraction you can install it with cd VMware-horizonagent-linux-x86_64-7.0.0-3617131 ./install-viewagent.sh -b connmgr.backend.local -d backend.local -u administrator -k dc01.backend.local'

Where -b is the connection broker, -d is the domain of the administrator account and -u is for the administrators user account itself. The -k is for the domain controller where the user account resides (Kerberos).

After accepting the EULA you are prompted for the password of your administrator account.

If you have trouble registering the agent, check your DNS settings. Next to the password having characters that you need to escape not being able to connect to the connection manager by name is often the issue.

After a reboot you’re ready to create a new desktop pool and add the VM to this pool. Now you entitled users for the desktop pool it is time to connect to the desktop pool.

The end result

If all goes well you can to the Linux virtual desktop with your Horizon Client.

endresult