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:

Wednesday, July 15, 2015

Site relaunch!

Welcome to the new That Virtual Boy blog! I'm excited to relaunch the site with a new domain, new site host, and new authors! Be sure to bookmark the new link (thatvirtualboy.com) and check back often!
Share:

Friday, May 29, 2015

Using OwnCloud with an NTFS file share [Updated]

Trying to use NTFS with your OwnCloud server? You may be running into some challenges.

My setup

I'm running OwnCloud 8 server in a Linux Mint VM (VMware Workstation) for personal use. It uses a USB 3.0 2TB drive formatted as NTFS and it works pretty darn well.

I won't be going over how to setup OwnCloud server in Ubuntu - if you're interested in that, here's a great guide by our friends over at Noobs Lab (I highly recommend using MySQL or any other database solution over the included SQLite.. you will have major performance issues if you use SQLite)

The reason I wanted to go this route with my configuration is because I can have a small (~20GB) Ubuntu Server utilizing a larger external drive that can be easily read by both my Linux Server, as well as my Windows host machine. Smaller VMs means more internal space on my host machine!

At first I thought I could simply "pass through" my drive to the VM for hosting my personal cloud, similar to how I configured my Plex Server. Unfortunately the system was having trouble recognizing the pass-through (even though file syncing actually worked when manually copying files to the share.. very strange). I would see an error similar to the one below:



Data directory (/mnt/hgfs/owncloud/data) is readable by other users.

Please change the permissions to 0770 so that the directory cannot be listed by other users.

I was unable to change the permissions on the NTFS mount when it was configured this way.

Through researching the issue and the options available, I decided the easiest method to continue to use NTFS with this setup is to create a Windows share on my owncloud data folder, and mount it as a CIFS share to the OwnCloud server.

What you'll need

  1. Host machine with VMware Workstation (or similar software)

  2. OwnCloud server in a Ubuntu-based Virtual Machine (~20gb vm)

  3. External USB 3.0 Drive formatted as NTFS

  4. Patience and determination!
On to the how-to:

I should preface this section: this setup works for me and my needs, which is a single-user personal setup. This is not recommended for a multi-user, production configuration.

  1. Remove any VMware Workstation-based pass through you have configured for the NTFS drive. This may require you to power off the VM and delete the pass through.

  2. On the host side (in my case, Windows 8.1 Windows 10) create a local user account dedicated for owning the share. This will be used later when we mount it to Linux. In my example, ocadmin

  3. On the host side, create a normal share on the folder you'll be using as the owncloud data folder (right click, properties, Sharing tab, Share...) and give full permissions to the user account you created. This should create a share location similar to \\hostname\data

  4. Now login to the OwnCloud server, edit your /etc/fstab using vi, or gedit, or what have you. At the bottom of the file, add an entry that looks like this://<ip of host>/data </location/to/put/share> cifs uid=www-data,username=ocadmin,password=<your password>,iocharset=utf8,file_mode=0770,dir_mode=0770,sec=ntlm 0 0Tips:<ip of host> This is the IP of the machine running Workstation
    </location/to/put/share> This is where the share will be mounted to the Linux OwnCloud server. This could be your Linux Home folder, desktop, documents folder.. the options are endless... endless
    www-data is the default OwnCloud server account running the owncloud service
    ocadmin/password is the local host machine account we careated earlier

  5. Now we need to make OwnCloud aware of the location we want it to use for storing files. Edit the config.php file to include the you typed above.sudo vi /var/www/owncloud/config/config.phpModify the 'datadirectory' field to your new location so it reads something like:'datadirectory' => '/var/www/owncloud/data',

    Save and close this file.

  6. Now in the terminal, type sudo mount -a and ensure there are no errors mounting the share we configured in fstab.

  7. Give your Linux system a quick reboot and you should no longer receive the errors at the top of this post when accessing your OwnCloud URL.
[Update, May 13 2016]

If you've followed this method and are planning on an upgrade from OC8 to OC9, be sure to read the OC Upgrade documentation very carefully as it states, "When using an NFS mount for the data directory, do not change its ownership from the default. The simple act of mounting the drive will set proper permissions for ownCloud to write to the directory. Changing ownership as above could result in some issues if the NFS mount is lost."

Did this post help you? Let me know in the comments!
Share:

Wednesday, May 27, 2015

VMware Labs Hidden Gem



I discovered a hidden gem this morning: docs.hol.vmware.com 

If you don't know what VMware HOL is, it stands for Hands On Labs. It's an amazing platform that delivers technical guided product training right through your browser. Oh did I mention that it's free? If you're interetested in learning how to setup and deploy vSphere, NSX, AirWatch, Workspace Portal etc.. HOL is something you'll want to bookmark.

The labs themselves aside (which are awesome!), I stumbled upon the document space of the HOL. This section of VMware's HOL allows you to read through the step-by-step labs provided from HOL in either PDF or HTML format. The best part is you can easily save these PDFs to your local system for some offline reading. Perfect for catching up on how-tos for those VMware products you're planning on learning or deploying in the near future.

For more info on VMware HOL, check out their Twitter account here: @VMwareHOL

Have you used VMware HOL? Do you read lab how-tos to put yourself to sleep? Let me know in the comments!
Share:

Thursday, April 30, 2015

VMware releases vSphere security patches

Calling all non-vSphere 5.5 users. Check out today's new VMware releases which address JRE security vulnerabilities, as well as SKIP-TLS, FREAK, and POODLE.

More details in the release notes linked below.

VMware vCenter Server 5.0 U3d
VMware vCenter Server 5.1 U3a
VMware vSphere VUM 5.0 U3d
VMware vSphere VUM 5.1 U3a
VMware vCenter Orchestrator 5.1.3.1
VMware vCloud Networking and Security 5.5.4.1
Share:

Monday, April 27, 2015

Freeing my iPad of Social Media is the best thing I've done

Whether you're an Apple fan boy, or a die hard Android enthusiest, we can all agree tablets are great. I've recently come to realize, however, how much more I can enjoy my iPad when I exclude certain distractions from it. Namely, social media. 

Twitter, Facebook, Instagram - our digitial social lives are calling out for our attention ALL the time. I've come to realize the benefit of not only finding a time and place for social media, but also a platform for it.

Like most, my phone is with me pretty much wherever I go. And this is what I generally use for things like Twitter and Instagram (I ditched Facebook months ago - yet another hugely gratifying decision, but is a story for another day). My iPad is also with me quite often, but I tend to use it for different things.

For instance, though my iPad and iPhone are capable of the same applications, I much, much prefer to use my iPad for reading a book, checking out a comic book, or catching up on saved blog posts. There's something to be said about having that screen real estate for reading. It was far too often though that these activities would get distracted by social notifications. Not only notifications, but it's more peaceful reading a book now knowing I'm not subconciously looking for that next great quote to tweet, or that new blog post that should get shared.

I can enjoy a good news article or book way more now than before when I knew my social media was just around the corner.

Sure there are plenty of other ways to get distracted. Maybe you're more prone to spend hours on YouTube, or browse all the latest podcasts (who are you?). On the other hand, there's a good chance you have more self control than I. But the fact of the matter is, I can enjoy a good news article or book way more now than before when I knew my social media was just around the corner. I've even gone to disable the majority of notifications on my iPad to simmer down distractions.

Differentiating what my iPhone and iPad are used for has greatly improved my enjoyment of each device. Maybe you're different and you enjoy having all the same apps on your phone and your tablet. More power to you!

As silly as a post this is, it's something that has dramatically increased my productivity and media consumption enjoyment. Try it out. You'll probably be glad you did!
Share:

Thursday, April 2, 2015

Fast Lane Support for VMware's Premier Services customers

The latest version of the My VMware mobile application now allows VMware Premier Services customers to open up a Severity 1 SR and get connected to support in minutes. This new feature is called "Fast Lane Support" and is now live!






Check it out on iTunes: https://itunes.apple.com/us/app/my-vmware/id512689552?mt=8

Check it out on Google: https://play.google.com/store/apps/details?id=com.vmware.myvmware&hl=en
Share: