VMware Horizon – CentOS Linux 8 Instant-clone Desktop-pool

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
  • Test

 

Deploy Virtual Machine

Login to vSphere, select the cluster and choose “New Virtual Machine”, Next…

CenOS-IC-01

 

I give the Virtual machine a name, and select the location where the VM should to be placed, Next…

CenOS-IC-02

 

I select FreLab Cluster as my compute resources where the VM will be placed, Next…

CenOS-IC-03

 

Select the Storage on where the VM will be placed, Next…

CenOS-IC-04

 

Select the compatibility. I have chosen to use the “ESXi 6.7 and later”, Next…

CenOS-IC-05

 

I select Linux as Guest OS Family and CenOS 8 (64 bit) as OS Version, Next…

CenOS-IC-06

 

Customize the hardware, in my case I added an extra vCPU, extended the memory to 4GB and hard disk to 60GB thin provisioned, Next…

CenOS-IC-07

 

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.

CenOS-IC-08

 

Check the installation summary and finish.

CenOS-IC-09

 

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”.

CenOS-IC-10

  • 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

CenOS-IC-11

 

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

CenOS-IC-12

 

Save the configuration and “Power on” the VM. The VM boots to BIOS

CenOS-IC-13

 

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 Advancedtab.

CenOS-IC-14

 

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

CenOS-IC-15

CenOS-IC-16

 

I change the boot-order as follows. When done I press ESC and F10. Save and exit

CenOS-IC-17

 

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…

CenOS-IC-19

 

The first thing I do is to select the language to be used during installation, Continue…

CenOS-IC-20

 

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:

CenOS-IC-21

 

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.

CenOS-IC-22

 

Under IPv6 Settings, I select “Ignore” as the Method, Save…

CenOS-IC-23

 

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.

CenOS-IC-24

CenOS-IC-25

 

I select my Keyboard Layout.

CenOS-IC-26

 

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.

CenOS-IC-27

 

I select my Vmware Virtual Disk as installation destination, Done…

CenOS-IC-28

 

Now that I’m done with the configuration, I click “Begin Install”

CenOS-IC-29

 

The configuration screen appears, I set the “Root password” and create a user.

CenOS-IC-30

CenOS-IC-31

 

After the reboot I accept the EULA

CenOS-IC-32

CenOS-IC-33

CenOS-IC-34

 

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…

CenOS-IC-35

 

I choose keyboard layout, Next…

CenOS-IC-36

 

Disable the slider to “Off” as I don’t want applications to determine my geographical location, Next…

CenOS-IC-37

 

I don’t want to connect any “Online Accounts”, Skip…

CenOS-IC-38

 

Ready to GO!

CenOS-IC-39

 

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»

CenOS-IC-40

 

Remove the open-source VMTools running the following command: «yum remove open-vm-tools»

CenOS-IC-41

 

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…

CenOS-IC-42

CenOS-IC-43

 

I copy the Vmware-tools tar-file to Downloads and extract it here

CenOS-IC-44

CenOS-IC-45

 

I install the VMware Tools by running the following command: “./vmware-install.pl”

CenOS-IC-46

 

After a reboot of the VM, I can verify that VMware Tools are now replaced with the correct version

CenOS-IC-47

 

Before I proceed, I confirm that the default runlevel is on 5 (graphical.target), running the following command: “systemctl get-default”

CenOS-IC-48

 

The table below shows the different runlevels and targets

CenOS-IC-49

 

I also disable the libvird service using the following command: “systemctl disable libvirtd.service”

CenOS-IC-50

 

Install and configure VMware Horizon Agent

First I download the correct version of VMware Horizon agent for Linux from My VMware

CenOS-IC-51

 

I extract the downloaded tar file in Downloads

CenOS-IC-52

 

I launch installation of the Horizon Agent running this command: “./install_viewagent.sh”

CenOS-IC-53

 

During the installation there are several choices that can be made, but I choose to leave all settings default.

CenOS-IC-54

 

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

CenOS-IC-55

 

I adjust the following settings

  • SSOUserFormat=username]@[domain]
  • KeyboardLayoutSync=FALSE
  • OfflineJoinDomain=none

CenOS-IC-56

CenOS-IC-57

CenOS-IC-58

 

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

CenOS-IC-59

 

I can now verify that the domain is discovered and configured correctly suing the following command: “realm list” and “realm discover -v”

CenOS-IC-60

CenOS-IC-61

 

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

CenOS-IC-70

 

I choose Instant Clone, my vCenter, Next…

CenOS-IC-71

 

As I don’t have any way of roaming my users Linux settings, as of yet, I will be using Dedicated Assignment

CenOS-IC-72

 

I enter an ID and a Display name, Next…

CenOS-IC-73

 

I provide the provisioning details, Next…

CenOS-IC-74

 

I detail the vCenter configuration, Next…

CenOS-IC-75

 

I configure the connection settings, Next…

CenOS-IC-76

 

I select my Remote Display settings, Next…

CenOS-IC-77

 

I choose the Domain and Active Directory settings, Next…

CenOS-IC-78

 

I complete the New Desktop Pool wizard and entitle my test users, Submit…

CenOS-IC-79

 

The publishings starts immediately

CenOS-IC-80

 

Once the state changes to “Published”, I can verify that the desktops are available

CenOS-IC-81

CenOS-IC-82

 

Testing

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

CenOS-IC-83

 

I run through the startup wizard and do e few adjustments to the user experience.

CenOS-IC-84

CenOS-IC-85

CenOS-IC-86

CenOS-IC-87

CenOS-IC-88

 

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.

CenOS-IC-89

 

And with that, I finally have a working Instant Clone Desktop Pool with CentOS 8.1 desktops.

 

VMware Horizon View planning, deployment etc.

VMware’s official documentation: Setting Up Horizon 7 for Linux 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.