Friday, May 18, 2018

My Experiences Updating VCSA 6.5a to 6.5 U2

Today we'll be updating my lab's VCSA 6.5a (build 4944578) to version 6.5 Update 2 (build 8307201) which was released  May 3 2018. vCenter Server 6.5 U2 includes some backported features of vSphere 6.7 making it a slick update for users not quite ready to move to version 6.7. Some of the new features include

NOTE: Currently, upgrading from vSphere 6.5 U2 to vSphere 6.7 GA is not supported

You can verify your VCSA version by clicking on the top most level of the hierarchy tree in the vSphere Web Client and viewing the Summary tab

Before I perform this update, I'm going to verify compatibility with my registered and connected solutions with the VMware Interoperability Matrix

Then, I'm going to login to the vCenter Server Appliance Management Interface (VAMI) at <https://fqdn-of-vc:5480and ensure overall Health Status is green, take a VM-level snapshot (not pictured) and create a native VCSA Backup.

Upon entering my Backup details and clicking Next, I got a message stating that the service 'statsmonitor' wasn't running

A quick SSH session to the VCSA and running service-control --start vmware-statsmonitor resulted in starting the service

This allowed the Backup to continue

After it validated the input, we're ready to click Finish, which initiated the backup and showed a Backup Progress Bar

With our VM snapshot and VCSA Backup in place, we're ready to go to the Update section of the VAMI and check for Updates

Click Install Updates and accept the EULA to begin the update. My update jumped straight to 40% with status "Start staging packages" then had a "Download Failed"

At this point, I took a break for the evening (hey can't a man eat and unwind with some SNES Classic?!) and revisited it in the morning. This time, I did a tail -f on /var/log/vmware/applmgmt/software-packages.log to watch the progress of the downloads and to my surprise, the downloads worked this time without any changes made. If you run into a similar error, I would review this log to see what could be causing the downloads to fail (proxy config, incorrect URL, etc).

The Update window status changed to "Start running pre-install scripts"

Then made its way to 100% with the message "Packages upgraded successfully, reboot required to complete the installation"

And checking the software-packages.log we can confirm the packages were properly staged and ready for reboot

Clicking OK, I proceeded to the Summary Tab where I could click Reboot

Upon logging back in to the VAMI, we can verify the new build version!

Confirming in vSphere Web Client

Remember, we haven't fully upgraded to vSphere 6.5 U2 until the ESXi hosts are also updated. The embedded VUM instance in VCSA 6.5 makes that an almost effortless task.

Thanks for reading and good luck with your updates!

Sunday, February 4, 2018

The Mobile Plex Media Server - Local Streaming on the Go

The mobile Plex Server powered by Pi! The best mobile media streaming solution for those long family road trips. Who cares if your kids have the capacity-starved 16GB hand-me-down phones and tablets from 2012 - this untethered setup allows you to broadcast your Plex Library from literally anywhere.

To wirelessly stream movies to devices while on the road, mitigating the need for high storage-capacity endpoints

Raspberry Pi 3 Model B
160GB 2.5” USB HDD
8000mAh Lithium Ion Battery

How to build it
  1. Get yourself a RaspberryPi unit. Here I’m using the rPi 3 Model B. I also got an enclosure that has a CPU fan - figured this would be handy during those hot summer road trips.
  2. Install Raspbian. Here I’m using Raspbian Stretch Lite (2017-11-29 build) 
  3. Ensure the Pi is connected to the network via Ethernet for the next several steps
  4. Configure a static IP. For the Stretch build, you need to configure this using dhcpcd.conf, not /etc/network/interfaces as mentioned here 
  5. Install Plex Media Server. These instructions are for an older Raspberry Pi build (Jessie) but it is still relevant for the Stretch build used in this post
  6. Ensure you can connect to Plex using the static IP you configured, I.e., 192.168.x.x:32400/web/ Don’t mess with adding your Libraries - we’ll do that later
  7. Configure hostapd and dnsmasq. This is what allows you to have the Pi broadcast a wireless signal, authenticate your endpoints, and hand out DHCP addresses. The best option I’ve found for getting this done is this fantastic little script. As of this writing, the script states to use the 2017 August Stretch Pi image, but I can confirm it works great with my November Stretch build. Huge shoutout to GitHub user Lewiscowles1986.
    1. See the owner’s process for running the script in his github comment here
  8. After rebooting, UNplug your Ethernet cable and give the Pi another reboot - from a wireless device, ensure you see the SSID you configured using the script. Connect to it
  9. Once connected, launch the Plex Client app and ensure it connects to the media server. 
  10. If you successfully connect to the server, all you need to do is load your external storage device with content, then add the Libraries to Plex (The Plex Install guide from above walks you through this). If at all possible, format your external drive to EXT4 for maximum compatibility with the Raspbian.
  11. Once the drive is loaded with content, plug the drive into the Pi
    1. Type sudo blkid and find your drive. Most likely, it will be /dev/sda1 or /dev/sda2
    2. Create a mount point for the drive: sudo mkdir /mnt/library
    3. Change permissions: sudo chmod 755 /mnt/library 
    4. Mount the drive to your configured location: sudo mount -t ext4 /dev/sda1 /mnt/library
    5. Update fstab so the drive always mounts to this location: sudo vi /etc/fstab
      1. Add the following to the bottom of the file:  /dev/sda1 /mnt/library ext4 defaults 0 0
    6. Reboot
At this point, you should have a fully functional Plex Media Server on your Raspberry Pi. Here are some additional tips:

  • Remember your Pi must be unplugged from Ethernet in order for the Plex Media Server to function properly over your configured wlan0
  • This setup allows you to take your PMS with you anywhere, but if you intend to use a portable battery source, ensure it puts out enough power. Pi Documentation recommends 2.5 Amps - the one pictured in this post is 2.4 and works just fine

Friday, January 5, 2018

Goodbye Owncloud, Hello Seafile

I had been an OwnCloud user for several years now. The En0ch team's OwnCloud VM made it easy to deploy and get setup in no time. My configuration was perhaps somewhat unique with the server being a hosted VM and the files being stored on a NTFS drive shared through a CIFS Mount to the VM. Performance was less than stellar, but it worked! For my home needs anyway.

Recently we had a power outage in my neighborhood (a new neighborhood, so this was certainly not the first) and every time this happened, OwnCloud would crash hard. I was always surprised at how much work it took for me to get the service back up and running. I was on the latest stable 9.x build for some time (I think 10.0.4 is the latest at the time of this writing). For a while I had been thinking it was time to either wipe it all and start new, or find a new solution. After this most recent power outage, I figured it was time to start fresh AND look for a new solution.

I soon discovered Seafile and thought the initial configuration looked simple to setup. It's friendly integration with Let's Encrypt and modern UI were also intriguing.

After 30 minutes I had seafile up and running on my LAN. It was extremely simple following their documentation. It wasn't until I tried to enable HTTPS over WAN that I ran into some challenges, but once that was taken care of, I've been able to explore the product more.

Over my own experience with OwnCloud, Seafile is significantly faster. From syncing, to downloading, to streaming media - the overall experience is quite pleasant. It even works well for sharing public download and upload links, which was one of the most useful features of a self-hosted cloud file share.

Here are some of the tricks to my setup I had to configure:


  • Seafile 6.2.3 on Ubuntu Server 16.04 VM in VMware Workstation (hosted on Windows 10)
  • Storage is 2TB NTFS WD Passport configured as a Shared Folder to the Guest OS via Workstation
  • MySQL DB since storage is on NTFS (per user docs)
  • Let's Encrypt SSL Cert
  • NGINX reverse proxy

The first challenge was making it so I didn't have to run the and services with sudo. Because I'm using shared folders in Workstation, I wasn't the 'owner' of the data folder that get's configured and the services would fail to start unless ran with sudo. I found that if I opened
and used my own GID and UID, it would mount the HGFS share properly and I could start the services without sudo

# Mount all hgfs filesystems
vmware_mount_vmhgfs() {
  if [ "`is_vmhgfs_mounted`" = "no" ]; then
    if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
      mkdir -p $vmhgfs_mnt
      vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
         -o subtype=vmhgfs-fuse,allow_other,uid=1000,gid=1000 $vmhgfs_mnt"
      vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=1000,gid=1000"

The second biggest challenge was getting my nginx configuration right. I found that when I would enter my DDNS address for the server, I would be directed to my router's login - I wasn't getting passed through to the server itself. You can read more about the symptoms in the Seafile Forums. Long story short, I was missing some information shared in the Sample configuration file from the docs. Read those buggers carefully!

Whatever your self-hosted cloud storage provider is (OwnCloud, Seafile, NextCloud, etc), we can at least all agree that we're glad to be off of the big brother alternatives!

Tuesday, November 28, 2017

Plex DVR Postprocessing Script

I've been using Plex DVR the last couple months, testing the Plex Pass and Beta capabilities, and figuring ways to make it a solid solution for me and my family. The DVR aspect works well on the latest Beta release, and the GUI is very simple to use. Setting up recordings and having them auto-added to my library works almost like magic.

But amidst the magic, I had some requirements that took more than out-of-the-box configuration. My two requirements were

  1. Remove commercials
  2. Reduce the final file size while preserving quality
Through lots of trial and error (lots), I was able to provide Plex with a script that takes care of both of these requirements. This script is provided to Plex via its path on the server in the DVR settings of the web console. Here, you can see I have added the script

The Plex Pass beta build mentioned above introduced commercial cutting natively within the Plex GUI. For those just starting out with Plex DVR, this is a fantastic addition they've added, and will greatly reduce the technical challenges of implementing it yourself. This newly built-in feature is still, however, in beta and may come with some unwanted bugs.

This script is a combination of information found online and tweaks for my needs (my household is mostly Apple products, hence the transcoding presets). All of this is maintained on my GitHub page, so check there for the latest bits.

My Environment (not earth shattering by ANY means)

  • PMS (latest Plex Pass Beta) running on a virtual Ubuntu 16.04
  • 4vCPU / 2GB RAM
  • AMD A-10 6800k APU in host running Windows 10 Pro
  • HDHomeRun Connect Tuner


  1. Comcut
    1. Comskip
    2. ffmpeg
  2. Handbrake-CLI
This script is used to run comcut on completed Plex DVR recordings, then transcode them using handbrake with the Apple TV 1080p preset.

Shout out
Original inspiration for this script came from this post

  • Be sure to change permissions on the .sh file, something like chmod 777 or u+x
  • Edit the script to put the paths to your Comcut and Handbrake-CLI locations. I've included mine as examples within the script
#! /bin/bash
# Plex DVR Postprocessing
# Version 0.0.1


time=`date '+%Y-%m-%d %H:%M:%S'`
handbrake=/PATH/TO/YOUR/INSTALL (mine is /usr/bin/HandBrakeCLI)
cut=/PATH/TO/YOUR/COMCUT/INSTALL (mine is /home/ryan/comchap/comcut)

echo "'$time' Plex DVR Postprocessing script started" | tee $dvrPostLog

# Check if post processing is already running
while [ -f $lockFile ]
    echo "'$time' $lockFile' exists, sleeping processing of '$inFile'" | tee -a $dvrPostLog
    sleep 10

# Create lock file to prevent other post-processing from running simultaneously
echo "'$time' Creating lock file for processing '$inFile'" | tee -a $dvrPostLog
touch $lockFile

# Run comcut
echo "'$time' Comcut started on '$inFile'" | tee -a $dvrPostLog
$cut "$inFile"

# Encode file to MP4 with handbrake-cli
echo "'$time' Transcoding started on '$inFile'" | tee -a $dvrPostLog
$handbrake -i "$inFile" -o "$tmpFile" --preset="Apple 1080p30 Surround" --encoder-preset="veryfast" -O

# Overwrite original ts file with the transcoded file
echo "'$time' File rename started" | tee -a $dvrPostLog
mv -f "$tmpFile" "$inFile"

#Remove lock file
echo "'$time' All done! Removing lock for '$inFile'" | tee -a $dvrPostLog
rm $lockFile

exit 0

Once the recording is complete, the script will kickoff and get to work on the file before adding it to the Plex library. While the script is running, you'll see that the recording sits at a 100% complete status until it's done.

If you have two shows recording back-to-back, this script will also process one recording at a time, to not tax your system.

I hope you find this useful. Thanks for reading!

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!

Thursday, August 31, 2017

VMworld US 2017 Wrap Up

Sitting at the airport waiting to board allows you time to reflect on all he awesomeness that happened at VMworld US 2017. Product Announcements, Demos and Deep Dives, networking, and of course the Appreciation Party - Las Vegas was overtaken with VM goodness. 

Day 1 and 2 General Sessions can be watched here

Top Sessions from each day can be watched here

Full conference registers have access to all on-demand sessions here

Sunday, August 27, 2017

VMworld US 2017 Day #1

Today marks the official first day of VMworld US as the Welcome Reception and Solution's Exchange opened for all 20k attendees. Everyone here is energetic and excited to get the conference started. The 110 degree weather here in Las Vegas only made the drinks and apps better at the welcome reception. Mini-Grilled cheese anyone? How about a Greek Salad Shooter?

The registration and merch lines were almost non-existent (I guess it pays to land right as the welcome reception is starting!). After running into some fun faces like Ray O'Ferrell (CTO), Jack McMichael (EUC SE), and Brian Davidson (PREM Sr. Mgr), I got to mingle with some TAM customers and discuss the SDDC Journey they're on.

VMware's booth (at the very back of Solution's Exchange) has an amazing setup with demos and experts to talk about VMware vision and to dig into the technical details of our solutions. Other than beer sleeves, the hand out of choice this year appears to be none other than the fidget spinner.

Tomorrow's General Session with Pat Gelsinger should be great. See you there!

Follow by Email