Linux Desktops with Horizon
Since 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.
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.
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:
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.
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.
Anne Jan Elsinga
Related Posts
12 Comments
Leave a Reply Cancel reply
You must be logged in to post a comment.
i did this w/ ubuntu 12.04 and centos 7. I just can’t get the agent to register. it never shows up in View Administration. Any ideas? Ports?
What error message do you get when registering the machine?
Check out the logfiles for the agent if there is any hint on what is going wrong.
Common causes:
■ The View Connection Server FQDN, domain name, user name, or password that was provided during View Agent installation was incorrect.
■ The View administrator user does not have 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.
■ The View administrator password contains a special character, such as $, that was not escaped with a backslash.
■ Reversible password encryption was not enabled on the Windows Server 2012 or 2012 R2 Active Directory (AD) server.
In my case I forgot to configure the reversible password encryption for the account.
I’m trying to figure out how to install the Linux View Agent without a broker – has anyone figured out how to do this yet?
I haven’t
Hi, This might be a dumb question but I can’t seem to download the Linux Agent anymore.. Do you need to be a paying VMware customer to get it?
If you go to the VMware download site, you can download the Linux agent here: https://my.vmware.com/web/vmware/details?downloadGroup=LINUXVDI17Q2_720&productId=654&rPId=17477
Hi Erik,
Been there and yes, they don’t allow it for download anymore. I’ve been jumping through hoops with 2 VMware sales guys and they told me they will get in-touch me soon to sort it out, but not after doing all the usual pre-sales qualifying interviews.
It’s just really disappointing as all other components sans the Linux Horizon agent is available for download. I mean c’mon, its not like we can use the Linux agent perpetually as the other trial licenses would expire if we don’t purchase licenses after the trial anyway. (sorry for the rant)
I don’t understand what the problem is, I can download it just fine using a corporate account and a newly registered trial account. Check this screenshot: https://vmguru.com/wordpress/wp-content/uploads/2017/08/Screen-Shot-2017-08-04-at-23.51.30.png
Hi Erik,
Lucky for you I guess. No luck even if creating new accounts using corporate email. Corporate account can’t even download it. Might be region thing (we long to ANZ). Any chance though that you would be willing to host the file for our download? :)
Hi Erik,
All good now, we got copies from vmware sales guys. At first they sent us the 6.2.1 version and has just recently provided the 7.2 version as well. It really does seem that we need to get in-touch with vmware sales to get the Linux Horizon clients in our region.
Hi Again,
Just want to ask for advice, as we’ve been unable to get the setup with Linux desktops working. With version 6.2.1 of the agent, we were able to successfully install the agent but for some reason, the installer doesn’t install the viewagent service on Ubuntu 16.04. The agent will install successfully and we can see the machine registered on the view connection server albeit showing unreachable (of course as the agent on the vm is not installed for some reason.)
Thinking it might be a compatibility issue, we got our hand on the 7.2 agent and it installed fine with the viewagent service running. However, we can’t see it in the view connection server. VCS can ping the vm and vice versa. Logs don’t appear to tell that something is wrong.
How are you adding users to the VM upon initial login from that user?