Release date: April 29th 2020
Welcome to my VMware Horizon series. In this session I will venture into the “somewhat unknown”, VMware Horizon 7 for Linux desktops. As I’m in no sense a Linux-expert, this has been planned for quite some while. I like the idea about an operating system that isn’t linked to one company, but rather is made as best possible by many great minds. VMware has a great guide to setting up Linux as a Horizon desktop, but I find it lacking in some areas, but this is probably most likely due to the fact that there are different ways of using the Linux-specific technology to achieve the same goals. VMware’s official documentation about setting up Linux in VMware Horizon is here: Setting Up Horizon 7 for Linux Desktops. I was careful to check out the system requirements before starting this session, and I’ll be using CentOS 8.1 for this. Beforehand I have verified that this is supported. For anyone that are venturing down the path of setting up Linux in a VMware Horizon environment, I would recommend reading the documentation beforehand carefully.
To complete this session, I have identified the following tasks that have to be completed.
- Deploy Virtual Machine
- Configure Virtual Machine
- Install Operating System
- Configure Operating System
- Install VMware Tools
- Install and configure VMware Horizon Agent
- Create Desktop Pool
Deploy Virtual Machine
Login to vSphere, select the cluster and choose “New Virtual Machine”, Next…
I give the Virtual machine a name, and select the location where the VM should to be placed, Next…
I select FreLab Cluster as my compute resources where the VM will be placed, Next…
Select the Storage on where the VM will be placed, Next…
Select the compatibility. I have chosen to use the “ESXi 6.7 and later”, Next…
I select Linux as Guest OS Family and CenOS 8 (64 bit) as OS Version, Next…
Customize the hardware, in my case I added an extra vCPU, extended the memory to 4GB and hard disk to 60GB thin provisioned, Next…
Under the second tab VM Options, I select Boot Options and change firmware to BIOS and enable force UEFI setup. With this option enabled, I go straight into the BIOS of the VM after powering it on.
Check the installation summary and finish.
Configure Virtual Machine
When the VM is created, I first need to add and change some settings. I select the VM from vCenter and select “Edit Settings”.
- Select the right Network Label for the Network adapter and check the “Connect”
- Select the “Datastore ISO File”and browse to the CentOS 8 ISO-file, check the “Connect” box
- Go to the second tab “VM Options”.
- In the VM Options uncheck the “Enable Logging” option, which is unnecessary when using Instant-Clones
- Select “Edit Configuration” under the Advanced Settings
Instant Clones CBT-Issue: Changed Block Tracking (CBT) on virtual machines (1020128) “If you are using VMware Horizon View and linked clone or instant clone virtual machines, you should not be using CBT. Always ensure that CBT is disabled for the parent virtual machine.” To disable CBT on the Template edit the following lines to False:
- ctkEnabled = FALSE
- scsi0:0.ctkEnabled = FALSE
Save the configuration and “Power on” the VM. The VM boots to BIOS
Launch the Web or Remote Console. In BIOS I disable all features that are unnecessary. In the Main-tab, all Diskette stations are disabled, which is OK.Next, I open the Advanced–tab.
Within the advanced section, select I/O Device Configuration. We don’t need any of the I/O Devices, so we disabled them all. Press ESC to return to the BIOS main screen. Select Boot-Tab
I change the boot-order as follows. When done I press ESC and F10. Save and exit
Install Operating System
It is now time to install the Operating System. The ISO with the software is already attached to the VM and Connected. The installation screen from CentOS are shown, I select “Install CentOS Linux 8“, Enter…
The first thing I do is to select the language to be used during installation, Continue…
The installation summary shows all settings I can configure prior to installation. I make no adjustments to the Security Policy, but the other options I configure as follows:
I start with the “Network and Host Name” configuration. If you don’t start with the network, you cannot select your NTP-servers. I first enable the network interface, then edit the Host Name and finally hit the Configure-button.
Under IPv6 Settings, I select “Ignore” as the Method, Save…
Under Date & Time settings, I choose my Region and configure NTP. I choose to enable NTP, but disable all NTP Host names which aren’t available.
I select my Keyboard Layout.
As this is going to be used as a Horizon Desktop, I choose Workstation and select the software required from the list on the right.
I select my Vmware Virtual Disk as installation destination, Done…
Now that I’m done with the configuration, I click “Begin Install”…
The configuration screen appears, I set the “Root password” and create a user.
After the reboot I accept the EULA
Configure Operating System
With the first logon you get some first run screens were you need to set user specific settings. I set the preferred Language, Next…
I choose keyboard layout, Next…
Disable the slider to “Off” as I don’t want applications to determine my geographical location, Next…
I don’t want to connect any “Online Accounts”, Skip…
Ready to GO!
Install VMware Tools
As I don’t want to use open-vm-tools, I will uninstall open-vm-tools and install VMware Tools from the esxi-server.
I open Terminal and switch to the Root account «su root»
Remove the open-source VMTools running the following command: «yum remove open-vm-tools»
Reboot the VM
After the reboot, I first need to extract the VMware Tools installation software so that I can install it. In vSphere, I click «Install Vmware Tools», Mount…
I copy the Vmware-tools tar-file to Downloads and extract it here
I install the VMware Tools by running the following command: “./vmware-install.pl”
After a reboot of the VM, I can verify that VMware Tools are now replaced with the correct version
Before I proceed, I confirm that the default runlevel is on 5 (graphical.target), running the following command: “systemctl get-default”
The table below shows the different runlevels and targets
I also disable the libvird service using the following command: “systemctl disable libvirtd.service”
Install and configure VMware Horizon Agent
First I download the correct version of VMware Horizon agent for Linux from My VMware
I extract the downloaded tar file in Downloads
I launch installation of the Horizon Agent running this command: “./install_viewagent.sh”
During the installation there are several choices that can be made, but I choose to leave all settings default.
After the installation completes, I browse to the install location of the VMware Horizon Agent “cd /etc/Vmware” and open the Horizon Agent configuration file with the Nano editor: nano viewagent-custom.conf
I adjust the following settings
After a reboot of the VM, I join it to the domain with the following command: “realm join -U username” (no domain or UPN) and enter the password when needed
I can now verify that the domain is discovered and configured correctly suing the following command: “realm list” and “realm discover -v”
Create Desktop Pool
I login to VMware Horizon Admin Console and starte the Create new Desktop Pool Wizard. For this session it will be An Automated Desktop Pool
I choose Instant Clone, my vCenter, Next…
As I don’t have any way of roaming my users Linux settings, as of yet, I will be using Dedicated Assignment
I enter an ID and a Display name, Next…
I provide the provisioning details, Next…
I detail the vCenter configuration, Next…
I configure the connection settings, Next…
I select my Remote Display settings, Next…
I choose the Domain and Active Directory settings, Next…
I complete the New Desktop Pool wizard and entitle my test users, Submit…
The publishings starts immediately
Once the state changes to “Published”, I can verify that the desktops are available
When I log on with the VMware Horizon Client, I see that I now have access to a Cent OS 8.1 Desktop Pool. I launch this shortcut
I run through the startup wizard and do e few adjustments to the user experience.
When I log out of the desktop, I can now see that I have now been assigned a dedicated desktop from the CentOS 8.1 Desktop pool instead.
And with that, I finally have a working Instant Clone Desktop Pool with CentOS 8.1 desktops.
Disclaimer: Every tips/tricks/posting I have published here, is tried and tested in different it-solutions. It is not guaranteed to work everywhere, but is meant as a tip for other users out there. Remember, Google is your friend and don’t be afraid to steal with pride! Feel free to comment below as needed.