Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Monday, December 9, 2019

Upgrading AMDGPU 18.50 to 19.30 on Ubuntu 18.04



Hope you find this post helpful. My system is running Ubuntu 18.04.3 LTS with an AMD Ryzen 5 2400g and a separate Radeon RX 570 GPU.

Steam gameplay isn't perfect, but it's certainly good enough for my needs (minor screen tearing on most games, but it's not to the point of being overwhelmingly annoying or distracting).

Running sudo apt list --installed |grep -i amdgpu-pro reveals that I'm running the amdgpu-pro driver version 18.50-708488

Amdgpu 19.30 was released November 5th 2019 and can be found here: https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-19-30-unified and is only compatible with the following distros/versions:
  • Ubuntu 18.04.3
  • RedHat Enterprise Linux 8.0
  • RedHat Enterprise Linux 7.6
  • CentOS 8.0
  • CentOS 7.6
  • SLED/SLES 15 SP1

Performing the Upgrade

1. Backup Backup Backup. Be sure you have proper backups and restore mechanisms in place. For my system, I use multiple backup solutions including Timeshift, as well as daily, weekly, and monthly Rsync backups. 
2. Download the 19.30 driver for your system (Ubuntu 18.04.3 version available here)
3. Extract the archive, either using Ubuntu's GUI or using tar -Jxvf
4. CD into the resulting directory and run the installer:  sudo ./amdgpu-pro-install

You'll find that the installer will list a number of packages to be upgraded. Go ahead and choose the default Y by hitting Enter and it will progress through the upgrade. Note you'll see it "Deleting module verison 18.50" during the 19.30 installation.

Once complete, you won't get any obvious "Complete!" or "Success!" prompts, but will rather be taken back to the command prompt. If you scroll up a bit, you should see the message "DKMS: install completed."

Assuming you don't see any errors mentioned, go ahead and reboot. You can verify 19.30 is the current driver by running sudo apt list --installed |grep -i amdgpu-pro again. 

Vulkan

Now, keep in mind that in order to use the Vulkan driver, Vulkan must be SDK needs to be at version 1.1.109.0, per the official documentation above. Running vulkaninfo should show you what Vulkan Instance Version you have. In my case, I had 1.1.70 installed, so an update was needed. You'll find that 1.1.109 isn't available over at https://vulkan.lunarg.com/sdk/home. For the meantime, I have simply installed the latest SDK at version 1.1.126 (the latest available at the time of this writing). If you run into this issue as well, please upvote and comment over here: https://community.amd.com/message/2941548

Good luck!
Share:

Tuesday, November 14, 2017

Using Ubuntu 17.10 For Work

While my MacBook Pro was in the shop (that issue-riddled machine) I found myself in need of a substitute. The iPad Pro is great for quick bursts of productivity and for trips, but for work requiring 8 hours of sitting down at a desk, you just can't find a replacement for a mouse and keyboard.

I had a 2009 white MacBook in my garage running Linux Mint that was used for garage things, you know, playing classic rock, YouTube, etc. I decided to take it in, install the latest Ubuntu 17.10 on it and see how easy it would be to get by doing my day to day work.

I'm not missing macOS at all
After reading the news several months ago that Ubuntu was ditching Unity for GNOME 3, I thought, "Oh great, they're replacing a bad DE with an even worse one." However, I've been pleasantly surprised at the usability of Ubuntu 17.10, and dare I say, I've actually really enjoyed using it. I'm not missing macOS at all. The minimalist and streamlined top panel works great to show me the system info I need. Desktop notifications are front and center without getting in the way.
Once I configured a proper theme (took all of 5 minutes using GNOME Tweaks) I was ready to go. It's strange saying this, but Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted. Between the system's Activities (mission control) screen, Application Drawer, and multi-monitor support, everything works in a way that makes sense and is a joy to use.
Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted.
One example is having multiple Firefox windows open. In macOS, if all these windows are minimized, clicking the Firefox icon on the dock will maximize just one of the windows, causing me to have to right click the icon and figure out which window I meant to maximize. Ubuntu 17.10 handles this way better. When I click on the icon in the dock, instead of picking a random window to maximize, it shows me a preview of the open windows to ensure I open the desired one. Seems small enough, but it makes a big difference in your workflow.

Ok, I brought his thing inside to do work... Luckily, we use our very own Workspace ONE at VMware as well as an O365 subscription allowing access to the full Office suite from the browser, so almost all of my work could be done right in Firefox.
There were scenarios where the full PowerPoint exe was necessary, as well as Skype for Business, and that's where our internal Horizon View VDI came into play, again, completely accessible from Firefox.
All in all, I feel comfortable saying that Ubuntu 17.10 is the best Ubuntu yet. Now if only we can get Linux working on the latest MacBook Pros!
Share:

Wednesday, November 16, 2016

Horizon Linux VM (pre-packaged) [Updated]

I'm excited to share what I've been working on the last several weeks. Recently I posted over on my Github a new project I'm working called Horizon Linux VM. It's a pre-packaged Ubuntu OVA that automates most of the customization and configuration needed for a Linux Desktop Template to be used in a VMware Horizon 7 environment. The project is now an official VMware Fling. 



Check out the Ubuntu OVA for Horizon on VMware Flings

In short, it's an OVA built from Ubuntu's mini.iso (to keep footprint down) that has the below key features (full changelog available on Github)

  • Built from Ubuntu’s mini.iso for a minimal footprint

  • Installs the MATE desktop environment

  • Downloads and installs the latest Open VM Tools packages

  • Installs Horizon Agent dependencies

  • Installs Winbind (optional)

  • Configures krb5.conf

  • Configures smb.conf

  • Joins the domain (optional)

  • Optimizes login screen for VDI
Share:

Thursday, November 3, 2016

Send Time Machine backups to a VM hosted in Windows

I've successfully configured Time Machine backups over my home network using VMware Workstation, Ubuntu, and a 1 TB WD drive. A big thanks to HowToGeek for their Raspberry Pi post for the inspiration and to Netatalk's Wiki. Here we go!

screen-shot-2016-11-03-at-8-44-29-am:: Prerequisites


  • Windows (using Windows 10 in this tutorial)

  • VMware Workstation (using 12.5 Pro)

  • Linux ISO (using Ubuntu 16.04 mini.iso)

  • Dedicated backup drive (using a 1TB WD) formatted as HFS+

  • macOS Seirra

:: Prepare your drive


Format your hard drive to be HFS+. This can be done by booting to any linux live disk and using gparted. You'll likely need to install hfsprogs and hfsplus to enable the formatting.

When attached to your Windows Host system, Windows won't mount this drive in Explorer, but you can still see it in Windows Disk Management to ensure it's working properly. Here it shows as Disk 0screen-shot-2016-11-02-at-9-22-21-pm

Choose a mount point that your backup server will use for the drive. I'll use /media/tm
Choose a user that will connect to your backup server from the Mac. <your-user>

Save these for later.

:: Setting up the dedicated backup server


I run my personal servers on a Windows 10 box under VMware Workstation. It's plain simple, easy to administer and maintain, and works great for home needs. Because I like dedicating my servers to individual VMs, I wanted a small VM to attach my 1 TB backup drive to - something with a small footprint as I won't need to interact with the OS much. This is why I chose to use Ubuntu's mini.iso

  1. In Workstation, create a new VM using the mini.iso. The only 'options' I chose to install with it were opensshserver for management, and samba (might use this in the future). My VM uses 512 MB of RAM and 1vCPU.

  2. Obtain HFS+ support by running
    sudo apt-get install hfsprogs hfsplus

  3. Let's take a moment to add our disk to the VM. I chose for my VM to have direct access to the physical disk as its primary purpose will be for backups.screen-shot-2016-11-02-at-9-25-48-pm
    screen-shot-2016-11-02-at-9-26-09-pm

  4. Now boot the VM back up, and mount the drive
    sudo mount -t hfsplus -o force,rw /dev/sd* /media/tm

    You should also add this to /etc/fstab so it mounts properly at boot
    /dev/sd* /media/tm hfsplus force,rw,user,auto 0 0

  5. Setup permissions for your user that will connect to the server
    sudo chown -R root:users /media/tm
    sudo chmod -R g+rwx /media/tm
    sudo usermod -a -G users <your-user>

  6. Once that's done, follow Netatalk's Wiki on setting up v3.1.10 (current at time of writing) on Ubuntu 14.04 (my server is using Ubuntu 16.04 and I can attest it works). Here are the commands for reference:
    sudo apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libtracker-miner-1.0-dev

    wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.10.tar.gz

    tar -xf netatalk-3.1.10.tar.gz

    cd netatalk-3.1.10

    ./configure --with-init-style=debian-systemd --without-libevent --without-tdb --with-cracklib --enable-krbV-uam --with-pam-confdir=/etc/pam.d --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-tracker-pkgconfig-version=1.0

    make

    sudo make install

     
  7. Now edit your /etc/nsswitch.conf and append mdns4 mdns to the end of the hosts file so it looks like this
    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

     
  8. Create the file /etc/avahi/services/afpd.service with the below contents
    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
       <name replace-wildcards="yes">%h</name>
       <service>
         <type>_afpovertcp._tcp</type>
         <port>548</port>
       </service>
       <service>
         <type>_device-info._tcp</type>
         <port>0</port>
         <txt-record>model=TimeCapsule</txt-record>
       </service>
    </service-group>
     

  9. Setup the Netatalk AFP File Server config file /usr/local/etc/afp.conf
    [<your-user>]
     path = /home/<your-user>
     rolist = <your-user>
    
    [Global]
     mimic model = TimeCapsule6,106
    
    [Time Machine]
     path = /media/tm (or whatever your mount point is)
     time machine = yes

  10. Run the init scripts in this order
    sudo /etc/init.d/avahi-daemon start

    sudo service netatalk start
  11. Add services to default runlevels
    sudo update-rc.d avahi-daemon defaults
    sudo update-rc.d netatalk defaults

  12. Back on your Mac, add your Ubuntu machine to /etc/hosts
    x.x.x.x <ubuntu-hostname>

  13. At this point, you should be able to connect to the server via hostname. From Finder Window, press command+K and enter the server address afp://<ubuntu-hostname> 

  14. Open Time Machine Preferences and select the Time Machine disk
If you don't see your disk in Time Machine preferences, ensure that it was mounted as read/write on the backup server. Good luck!
Share:

Tuesday, September 27, 2016

Deploying Linux VDI Pools with Horizon 7 [Updated]

Interested in a pre-packaged Ubuntu OVA for Horizon 7? See my latest project here!

:: This post has been updated to included changes for Horizon 7.1 and Ubuntu 16.04. Any Horizon 7.1 specific callouts will be in GREEN ::

One of the more popular posts on That Virtual Boy has been Deploying Linux VDI Pools with Horizon 6. That post was written when Linux and VDI were just getting acquainted. Horizon has grown up a bit and we're now at Horizon version 7.0.2 which means we have plenty of new enhancements and capabilities to bring to the table. In this post, we're going to cover what has changed for Linux in Horizon since that last article, and then we'll dive right into the process of building out a Virtual Linux Desktop Infrastructure (VLDI? yeah.. I'm sticking with it!)

#VLDI

:: What's changed since the last article


  • No more 32bit Linux desktops. x64 Architecture is required.

  • Support for NVIDIA GRID vGPU, vSGA, RHEL 7.1 and Ubuntu 14.04

  • View Agent installation of JRE 8 is now automated

  • Blast Protocol changed from using port 5443 to 22443

  • Support for Clipboard Redirection (clipboard memory size also configurable)

  • Support for Single Sign On (SSO) >> Only for SLED, RHEL, and CentOS

  • Support for Smart Card Redirection with SSO

  • Support for SLED 11 SP3/SP4

  • Support for HTML Access 4.0.0 on Chrome

  • Support for CentOS 7.1

  • Support for SLES 12 SP1

  • Support to check dependency packages unique to your distro before installing the Horizon Agent

  • Support to use the Subnet option of /etc/vmware/viewagent-custom.conf to specify the subnet used for Linux Desktop connection with multiple subnets connected

  • Support for H.264 encoder software

  • Support for managed virtual machines (woot!)

  • Support for Horizon Client for iOS/Android (woot! woot!)

  • Support for Automated full-clone desktop pools (<insert triple woot!>)

  • RHEL 7.3, CentOS 7.3, SLED 12 SP2, and SLES 12 SP2 support

  • Linux Agent Single Sign On (SSO) for Ubuntu 14/16

  • Client Drive Redirection (CDR) available as tech preview

  • USB Redirection available on Ubuntu 14/16 as tech preview

  • Keyboard Layout/Locale Synchronization supported on Windows Client

VMware docs tell us that changes have been made in Horizon 7 to how Linux desktops are managed - they're now vCenter managed instead of UNmanaged desktops (Horizon 6). This will require us to perform one of two actions to our existing Linux Desktops:

  1. Upgrade to 7.0.2 and retain the unmanaged VM.

  2. Upgrade to 7.0.2 and convert the VM to a managed VM.

NOTE: Linux desktops still have to be deployed to a Manual Pool, similar to the process followed in my Horizon 6 post, unless creating an automated Full Clone pool which this article will cover.

:: Getting Started

Before jumping in, there are a few prerequisites that should be considered.

  1. Will your Linux Desktops be using 2D graphics or 3D graphics? Currently only RHEL 6.6/6.7/6.8 and 7.2 can utilize 3D graphics. See VMware Pubs for more info.

  2. Confirm supportability for your desired guest distro.

  3. Ensure vSphere is version 5.5 u3 (for Horizon 7.0.x), or 6.0 u2 (for Horizon 7.1) or later

  4. Best stick with the latest Horizon Client available for the client machines. See what's new with Horizon Client 4.2 here. (Latest Client Downloads Here)

  5. Verify Ports
    screen-shot-2016-09-19-at-12-04-59-pm

  6. Verify recommended vCPU and vRAM sizing based on your configuration needs.

:: Preparing our Parent Image


Some call this the Golden Image, or the VDI Template.. I will refer to this as the Parent.

  1. First, create a new VM. We'll be using Ubuntu 14.04 x64. Notice my vRAM configuration. 10 MB is the minimum vRAM size recommendation for a machine that is configured with a single monitor at the lowest resolution.
    screen-shot-2016-09-26-at-10-13-25-am

  2. Make any necessary network configurations to gain network access, and ensure the VM is fully patched. You'll want to ensure you can ping your Connection Servers by FQDN.
    [gallery ids="1714,1712,1711" type="rectangular"]

  3. Now we'll install VMware Tools. Previously, we just mounted the ISO from ESXi and installed it. However, VMware now recommends installing Open VM Tools - a tools package managed through the OS's native packaging system. This is actually a much better way to manage Tools for Linux desktops. Follow along with the Ubuntu 14.04 Open VM Tools Guide Here. For Horizon 7.1 and Ubuntu 16.04, open-vm-tools-desktop is already in the Ubuntu repositories, so all you need to do is type 'apt-get install open-vm-tools-desktop' and skip the rest of this step.

    1. Starting at Step 2 from the guide, we download the VMware Package Keys in order to add the deployPkg Tools Plugin.

cd ~
mkdir vmw_pckg_keys
cd vmw_pckg_keys
wget -r --no-parent --reject "index.html*" http://packages.vmware.com/tools/keys/

** Be sure to include the trailing  /  otherwise you'll be downloading everything from packages.vmware.com.

Ensure you see both keys listed in your directory, then import them.
sudo apt-key add VMWARE-PACKAGING-GPG-DSA-KEY.pub
sudo apt-key add VMWARE-PACKAGING-GPG-RSA-KEY.pub

Create the tools-install.list by first going to su, then entering the data below
sudo su -
echo "deb http://packages.vmware.com/packages/ubuntu precise main" > /etc/apt/sources.list.d/vmware-tools/list
screen-shot-2016-09-21-at-3-55-33-pm

Then run apt-get update and install the package
# apt-get update && apt-get install open-vm-tools-dploypkg

Then either log out and back in, or reboot

You can verify your tools version by running
vmware-toolbox-cmd -v
screen-shot-2016-09-21-at-4-00-45-pm

:: System OS Tweaks


  1. Set Default Run Level to 5
    sudo vi /etc/init/rc-sysinit.conf

    Change this line to runlevel 5
    env DEFAULT_RUNLEVEL=5

    screen-shot-2016-09-27-at-3-25-47-pm

  2. On an Ubuntu machine that was configured to authenticate with an OpenLDAP server, set the fully qualified domain name on the machine.

  3. Edit the nsswitch.conf file to improve the VM's network outage recovery capability
    vi /etc/nsswitch.conf

    Change this line to
    hosts: cache db files dns

  4. Install Dependency Packages for Horizon Agent (Ubuntu 14.04)
    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
    Screen Shot 2016-09-27 at 3.35.24 PM.png


For Ubuntu 16.04


apt-get install python-dbus python-gobject

:: Configure Ubuntu to Integrate with Active Directory


NOTE: I will be installing and using Winbind. A good reference for doing this can be found here. For Ubuntu 16.04 on Horizon 7.1, you will also need to install libnss-winbind and libpam-winbind
"With the Winbind solution, the step to join the domain will fail because each cloned VM has a different host name. Each cloned VM needs to run the following command to rejoin the domain" - so we will add this to our logon scripts. << Per Documentation


sudo /usr/bin/net ads join -U <domain user>%<domain password>

  1. Update /etc/hosts to include the Domain Server
    screen-shot-2016-09-27-at-3-46-25-pm

  2. Edit /etc/krb5.conf to look like this
    [libdefaults]
    ticket_lifetime = 600
    default_realm = YOURDOMAIN
    default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc
    default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc
    [realms]
    YOURDOMAIN = {
    kdc = IP of your AD 
    default_domain = YOURDOMAIN
    }
    [domain_realm]
    .yourdomain = YOURDOMAIN
    yourdomain = YOURDOMAIN
    [kdc]
    profile = /etc/krb5kdc/kdc.conf
    [logging]
    kdc = FILE:/var/log/krb5kdc.log
    admin_server = FILE:/var/log/kadmin.log
    default = FILE:/var/log/krb5lib.log

Enter the following at the shell to test kerberos authentication:
kinit username@DOMAIN

screen-shot-2016-09-27-at-4-06-32-pm

Use the command klist to verify you received a ticket.
Screen Shot 2016-09-27 at 4.08.55 PM.png

3. Edit /etc/samba/smb.conf to look like below

[global]
workgroup = domainname
password server = hostname of domain controller
wins server = IP of wins server
realm = DOMAIN
security = ads
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/bash
winbind use default domain = false 
winbind offline logon = false
winbind separator = +
allow trusted domains = Yes

4. Edit /etc/nsswitch.conf once again to include winbind
passwd: compat winbind 
shadow: compat 
group: compat winbind
Screen Shot 2016-09-27 at 4.16.47 PM.png


Restart Samba and Winbind.
sudo service smbd restart && sudo service winbind restart

Assuming those come up alright, let's join the domain:
net ads join -U username%password
screen-shot-2016-09-27-at-4-37-28-pm

Then test the join using:
net ads testjoin
screen-shot-2016-09-27-at-4-39-30-pm

Now let's test winbind:
wbinfo -u (This will list your AD users)
wbinfo -g (This will list your AD Groups)
screen-shot-2016-09-27-at-4-43-05-pm

:: Configure Single Sign-on (SSO)


Unfortunately SSO is not yet supported for Ubuntu Guests.It is currently supported with RHEL 6.6/6.7/6.8, CentOS 6.6, 6.7, 6.8, and SLED 11 SP3/SP4. As of Horizon 7.1, SSO is now supported with Ubuntu 14.04 and Ubuntu 16.06.

  1. Be sure you set winbind use default domain in your smb.conf to be true

  2. Follow the steps here to set this up for your supported distro.

:: Additional User Experience Tweaks


If you'd like to perform additional tweaks to the system like adjusting the launcher Icon sizes, Disable Shopping Suggestions, or customizing the theme, check out this post with lots of great tips and tricks. Note some items like default wallpaper will require additional default-user tweaking.

NOTE: The docs recommend using a gnome desktop session for increased performance.
screen-shot-2016-09-28-at-9-14-25-am

Speaking of default user, we need to adjust the default login screen to allow domain users to enter their credentials, as well as ensure they get a profile upon logging in. I don't know why VMware docs fail to include any of this information. But if you don't follow these steps, your final desktop will have only two login options: the admin user you created, and Guest login. There won't be an option for domain users to login.

  1. To have every new user get a home directory upon logging in, have sudoer type:
    echo 'session required pam_mkhomedir.so skel=/etc/skel/ umask=0022' >> /etc/pam.d/common-session
    Screen Shot 2016-09-28 at 2.37.46 PM.png

  2. To adjust the login screen to allow domain users, remove Guest login, and hide previously logged in accounts, have sudoer type:
    echo 'greeter-show-manual-login=true' >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
    
    echo 'greeter-hide-users=true' >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
    
    echo 'allow-guest=false' >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
    Screen Shot 2016-09-28 at 12.02.10 PM.png

:: Install the Horizon Agent


  1. Download the appropriate Horizon Agent for Linux Installer

  2. Unpack the tarball
     tar -xzvf <horizon_agent_filename>
    screen-shot-2016-09-28-at-9-23-06-am

  3. Navigate to the extracted folder and run the shell script as super user
    sudo ./install_viewagent.sh -A yes
    
    screen-shot-2016-09-28-at-9-26-50-am


    1. NOTE: if you're upgrading the agent on an existing Horizon Linux VM, you don't have to uninstall the agent first. The installer will handle that for you.

    2. There are special parameters you can use on the install command. For example, if you are upgrading the agent on an existing Horizon Linux Desktop, etc. See the doc here for available commands.

:: Configure Options for Horizon Agent


The Horizon Agent configuration file allows us to make certain tweaks such as Build to Lossless, support left-handed mouse devices, specify max Blast bandwidth, etc. The list is available here. For the purpose of this article, the only option we will modify is the RunOnceScript since we're using Winbind. We'll need each clone to run the Domain Join command after being created.

  1. Create the script and place it /opt. I'm calling mine join_domain.sh. You'll also want to chmod 777 the file so there aren't any issues running the script later.
    screen-shot-2016-09-28-at-1-32-15-pm

  2. Now modify /etc/vmware/viewagent-custom.conf to look like below. Be sure to uncomment the line, as well as the RunOnce Timeout if desired.
    Screen Shot 2016-09-28 at 1.33.25 PM.png

  3. For example Blast Settings, see the configurations here

  4. Unlike traditional Windows VDI desktops, the Linux Console is viewable from the vSphere Console, even when a user is logged in. To make the console blank when a user is logged in, you need to modify the Linux VM's VMX file by adding the line
    RemoteDisplay.maxConnections = "0"

  5. At this point, our Parent VM should be complete. You can shut it down and convert it to a Template, or clone it to a Template to be used in the section below.

:: Creating the Desktop Pool


Horizon 7.0.2+ now supports two methods for managing Linux Desktop Pools

  1. Manual Desktop Pool with vCenter VMs (similar to how we did in Horizon 6)

  2. Automated full-clone desktop pool

In this post, we'll use automated full-clone pools. Assuming you've been following along, our Parent image should be good to go with the necessary prerequisites. Now we need to create the customization spec in vCenter.

  1. In the vSphere Web Client,  go to Policies and Profiles > Customization Specification Manager

  2. Click Create a New Specification

  3. Select Linux as the Target OS

  4. Let's name this Linux_VDI_Custom_Spec 

  5. Complete the form as follows

    Setting
    Value
    Target Virtual Machine OS
    Linux
    Computer Name
    Use the Virtual Machine Name
    Domain
    Specify the domain of the View environment
    Network Settings
    Use Standard Network Settings
    Specify DNS
    Enter a valid address




    Screen Shot 2016-09-28 at 10.24.47 AM.png

Now lets jump over to Horizon Administrator

  1. Catalog > Desktop Pools > Add

  2. Choose Automated Desktop Pool 

  3. Pick your assignment preference. I'll use Floating.

  4. Choose Full virtual machines

  5. Enter your Pool ID and Display Name. Mine will be Legion of Doom (to pair nicely with my Hall of Justice Instant Clone pool!)

  6. For Desktop Pool Settings, choose
       Default display protocol:  VMware Blast
       Allow users to chose protocol:  No
       3D Renderer:  Manage using vSphere Client for 2D (unless you've configured the VM for 3D graphics)
    Screen Shot 2016-09-28 at 10.31.12 AM.png

  7. For Provisioning Settings, specify the names manually
    screen-shot-2016-09-28-at-10-33-54-am

  8. Finish the rest of the prompts and review the Ready to Complete page. Check the box to Entitle Users after the wizard finishes, and click Finish
    screen-shot-2016-09-28-at-10-54-53-am

  9. At this point, you should see the VMs in vCenter and the cloning operation status. Horizon Administrator should also show the VMs as Provisioning
    screen-shot-2016-09-28-at-10-58-51-am

:: Verify all the things



  1. We want to make sure our RunOneScript worked. Verify with your Active Directory that the desktops were properly joined to the Domain. You should also see the DNS Name being reported in Horizon Administrator and showing Available
    screen-shot-2016-09-28-at-11-31-19-am

  2. Launch the Horizon Client and verify you can load the desktop and that it reads the new DNS name
    screen-shot-2016-09-28-at-11-32-57-am
    Screen Shot 2016-09-28 at 3.23.05 PM.png
    ubuntu_vdi_domain_logon

  3. If your login changes from earlier were done correctly, we should be able to login as one of our domain users (username@domain).

Thanks for reading!
Share:

Thursday, July 23, 2015

Deploying Linux VDI Pools with Horizon 6

LinuxSee the updated version for Horizon 7 here.

Horizon 6 brought us many exciting changes. One of the more memorable ones is the addition of support for certified Linux Guests. At the time of this writing, Horizon 6 supports RHEL 6.6, Ubuntu 12.04, CentOS 6.6, and Neoukylin 6/6U1.

NOTE: newer versions may work just fine, but aren't certified to work. Meaning, if you want VMware Support to back you up, you should probably stick with the versions listed above.

To get started using Linux with your VDI implementation, make sure you have the prereqs:
  • vSphere 5.5 U2 or vSphere 6.0 and later
  • Horizon 6.1.1 or later
  • Horizon Client 3.4 or later
  • Note that Zero and mobile are not supported at this time
For the purposes of this post, we'll be using Ubuntu 12.04 with vSphere 5.5 U2e and Horizon 6.1.1. I'm going to cover building both a manual pool, as well as a bulk linked clone pool.
  1. First, let's build the template VM.

    1. Create a new VM and install Ubuntu 12.04 with 2vCPU and 2GB of RAM
      ubuntu-settings

  2. After it's installed, run Ubuntu's Update Manager and get the system fully patched (be sure to decline the 14.04 dist upgrade)
    ubuntu-update-manager

  3. Now we'll install VMware Tools
    1. Right click VM > All vCenter Actions > Guest OS > Install VMware Tools
    2. Click Mount
    3. Once mounted, you should see a folder pop up
      tools-mounted

    4. I like to copy the VMwareTools-9*.tar.gz file to the Desktop.
      1. Right click the .tar.gz and choose Copy to > Desktop
    5. Right click the .tar.gz on the desktop and choose Extract Here
    6. Open Terminal, change directory into the folder, and run vmware-install.pl
      tools-install
      To accept defaults, hit Enter for each question unless you understand what you're customizing.

    7. Reboot Ubuntu

  4. Ensure DNS is working to and from the View Connection Server
    DNS DNS-broker

  5. Proceed to building a manual pool or bulk linked clone pool below.

Building a manual Pool

  1. Now we're ready to install the Linux View Agent!

    1. NOTE: if using Windows Server 2012/R2 AD, follow the step 8 on page 11 from this doc

    2. NOTE: if your Ubuntu VM doesn't have internet access, follow step 9 on page 12 from the above doc
      agent-download

  2. Unpack the tar ball, and run install_viewagent.sh -b -d -u -p appropriately:
    agent-install

    1. When the install completes successfully, it should prompt you to reboot or logout
      agent-install-successful

  3. Reboot Ubuntu

  4. Back in the View Admin page, ensure the VM is registered to View
    registered

  5. In the View Admin page, create a new Manual Desktop Pool and add the VM.

    1. NOTE: This pool can only contain Linux VMs

Building a bulk Linked Clone pool

Building a Linux linked clone pool is not quite as simple as creating a Windows linked clone pool (yet .. crossing fingers). Essentially we automate the cloning process with PowerCLI, then add the created linked clones to a manual pool within View.

  1. Create a View Administrative user (viewuser) in the Ubuntu Guest OS. This account is dedicated for installing the View Agent.

    1. Settings > User Accounts > Create Admin User
      new-user

    2. The account will remain disabled until you set a password. Hover your mouse over Password under Login Options and set the password.

    3. Edit /etc/sudoers and add viewuser ALL=(ALL) NOPASSWD:ALLsudoers

  2. Shutdown the VM and take a vCenter Snapshot

  3. Build the guest customization script

    1. From vSphere Web Client Home page, click Rules and Profiles > Customization Specification Manager

    2. Click the Create a New Specification button

    3. Select Linux for the target OS and enter your desired input

      custom-spec-name custom-spec-review

    4. Note the specification name you entered as this will be referenced in your CloneVMs.csv file later

  4. On your PowerCLI machine, create a folder to store the Horizon Linux PowerCLI scripts

  5. Download these three files to your folder (Sometimes my file server is down for maintenance): CloneVMs.csv, CloneVMs.ps1 and InstallAgent.ps1. If you'd rather copy the text from the official VMware docs, you'll want to copy it from the HTML version here. You'll also want to include the Linux Agent installer in your folder for later.
    files

  6. Customize CloneVMs.csv to match the details of your environment - in my file, I'm only building 2 VMs

VMName,Parentvm,CustomSpec,Datastore,Host,FromSnapshot,DeleteIfPresent
linux-001,Ubuntu-Template,linuxagent,share,192.168.1.174,snap1,TRUE
linux-002,Ubuntu-Template,linuxagent,share,192.168.1.174,snap1,TRUE

Once this file is tweaked to match your environment, we can starting running the PowerCLI scripts

  1. Launch PowerCLI and change directory into the folder we created containing the scripts

  2. Invoke the CloneVMs.ps1 script and answer the prompts
    powerCLI_linkedclone
    You should start seeing the clones show up in vCenterpowerCLI_linked_creation

  3. Once the linked clones have been created, we'll run the Agent Installation script
    powerCLI_Agent_install3

  4. If you run into any errors, check out the troubleshooting section below.

  5. Assuming this completes successfully, you should see the machines show up as registered VMs in View Administrator: View Configuration > Registered Machines > Other
    registered_linked
    NOTE: at this point you shouldn't see a Pool assigned already like my screenshot. We'll perform that next

  6. Now let's create a manual pool to add our freshly baked Ubuntu Linked Clones

    1. Catalog > Desktop Pools > Add

    2. Select Manual Desktop Pool

    3. Pick your assignment preferences

    4. On Machine Source page, choose Other Sources

    5. After selecting your VMs, don't change the Remote Display Protocol - it needs to be left default.

    6. NOTE: Don't add Windows VMs to this pool, it will cause the Linux machines to become unavailable

  7. Victory! Ensure you're on the latest Horizon Client before connecting
    success!




Troubleshooting VM cloning and Agent install


When running the InstallAgent.ps1 script, you see the error 

sudo: no tty present and no askpass program specified
Sorry, try again
askpass
:: Double check your sudoers file we edited earlier. There is likely a typo, or the username wasn't entered in all lowercase.


When running InstallAgent.ps1 you see the error
Failed to authenticate with the guest operating system
powerCLI-agent-install-failed-to-athenticate

:: Verify password is correct. Check username is lowercase in script as that's the default case for new accounts

When running InstallAgent.ps1 you see the errorHostname not resolvable, terminating installation
Ensure host is registered with name service or listed in hosts file
troubleshoot-hostname-resolveable


:: Ensure your Custom Specification file is properly referenced and the vm naming is correct

View Administrator shows VMs as Agent Unreachable
troubleshoot-unreachable

:: Check out the official troubleshooting doc for this one here.
Share: