Wednesday, August 6, 2014

Plex Server, Virtual Machines, and Google Chromecast

Recently I discovered Plex and its many wonderful capabilities. In looking for an easier way to get my media to my non-smart TV, I found a cheap solution that works extremely well. Now my home setup is not that extravagant. I have a simple Windows 8.1 box. 8GB of RAM, A10 6800k APU, AMD Radeon 7900 series GTX 960 Superclocked GPU and plenty of storage. If you're like me and have a simple setup, all you need are the following components:


  • Google Chromecast (or similar)
  • VMware Workstation (or similar)
  • A library of media

    Note: exploring the features/capabilities of Plex is outside the scope of this post.
In VMware Workstation, I use a Linux Mint VM to run my Plex server. Your server doesn't have to be Linux, so simply grab the appropriate install from the Plex Downloads.


All my media is on my host machine (the Windows 8.1 box) in my normal Library locations. What this means is that for the Plex server to be able to serve up media, it needs access to those locations. This is easily done in Workstation by adding shared folders in the VM options.


Another thing to note.. if you want to be able to access your media from outside the VM itself, you'll need the proper networking configuration to do that. With this particular setup, the easiest option is to Bridge your network connection. This simply connects the VM to the same network as your Host machine (more here). No further router configuration should be needed. You shouldn't have to tweak your network much further unless you are using something like double NAT. If you find yourself having issues loading the library later on, check out Plex's Troubleshooting page.


One last setting is needed. On your Plex server, launch the Plex Media Manager (localhost:32400/web/index.html) and go to Settings > Server > Connect and follow the prompts to connect your server to Plex. Once done, you can start adding your media into Plex by having it share your Library locations. If you used shared folders like I did, your Library will be in a location similar to /mnt/hgfs/

You should now be able to access your media from any device, on or off your home network. 



Now to get this media to your non-smart TV. This is where Chromecast comes in. For $35, you can order one of these from Amazon and have easy access to your entire Plex library on your TV (and much more including Netflix, Hulu Plus, etc). The catch is you'll need to 'cast' to it either from your PC, or mobile device. The easiest option is probably a mobile device/tablet.

The Plex app for my iPhone pictured above is, unfortunately, not free. But it's worth the $5! Once your Chromecast is plugged into the TV, and connected to your home network, you'll be able to launch Plex on your mobile device, tap the 'Cast' button, and voila! Your Plex library is now available to your TV.

If you found this post helpful, let me know in the comments!
Share:

Friday, August 1, 2014

Accessing Horizon Workspace Gateway-va URL fails with HTTP 404 Error

Symptoms

  • HTTP 404 Error accessing gateway

  • Service-va logs show something similar to

    com.vmware.horizon.analytics.exception.HorizonException: Setting up Message Broker connection failed: Connection refused

  • Running df -h on the service-va shows /db as full


Cause

 

The internal Postgres Database is full and must be expanded. This article does not apply to Workspace implementations that have an external database configured.

 

 

Resolution

 

To resolve this issue, add a new, large VMDK to the service-va and copy the contents from the old disk to the new one. This process works on service-va VMs with and without internet access.
 



  1. Take a snapshot of the service-va

  2. Power off the Workspace vApp

  3. Add a VMDK to the service-va

    3a. Right click the service-va and choose Edit Settings > Add > Hard Disk and choose Create new virtual disk
    3b. Ensure the new disk is at least 30GB in size

  4. Power on the service-va VM only and login as root

  5. Change to run level 1

    init 1

    5a. Verify you are in Run Level 1 by typing who -r

  6. Determine the name of the new disk (e.g., /dev/sdxx)

    fdisk -l

  7. Format the new disk with default parameters

    fdisk /dev/sdxx
    n (for new partition)
    p (for primary partition)
    Press Enter to accept Partition Number Default
    w (to write changes)

  8. Unmount /db (first take note of the device name, e.g., /dev/sdb1)

    umount /db

  9. Copy the contents of /db (in this example, /dev/sdb1) to the new partition

    dd if=/dev/sdb1 of=/dev/sdxx bs=1024

    NOTE: This copy operation may take a long time

  10. Resize the filesystem using resize2fs

    e2fsck -f /dev/sdxx
    resize2fs /dev/sdxx

  11. Mount /dev/sdb1 to /db

    mount /dev/sdb1 /db

  12. Update /etc/fstab to reflect the new partition mounted at /db

  13. Run this command to shutdown the service-va 

    shutdown -h now

  14. Power on the Workspace vApp.

    NOTE: be sure to commit the snapshot previously taken after verifying the environment is stable



Share:

Wednesday, May 21, 2014

Working with Horizon Workspace Virtual Users and zmprov

One nifty feature of Horizon Workspace is the ability to share files and folders with external users. An "external user" could mean one of two things:

  1. A directory server user not synced to Horizon Workspace

  2. Someone outside of the enterprise


An invited user is then created as a virtual user in the Workspace instance. You can find more information about virtual users in the Horizon Workspace Administrator's Guide under User and Group Types: http://hrzn.ws/1nqI0ZS


When a virtual user is created, they are assigned to a hidden Class of Service (COS) called defaultExternal. This class of service comes with its own parameters, notably, all virtual users are defaulted to a file upload size of 2GB. You may notice the following error when a virtual user tries to upload a file larger than 2GB:


exceeds single file maximum upload size 2147483648 bytes


Additionally, the virtual user will share the quota of the internal user that shared the file with them. So if the inviter has an unlimited quota, files the invitee uploads won't have a negative impact. Conversely, if the inviter has a 10GB limit, any file the invitee uploads will go toward that internal user's 10GB quota.


So how can we increase the virtual user's file upload size limit?

Though the defaultExternal COS is hidden in the Administration Console, you can still configure its attributes via the data-va command line.
 

To change the upload file size limit for virtual users:


  1. Login to the data-va as root

  2. Change to the zimbra user:

    sudo su - zimbra

  3. Switch to the virtual user tenant and modify the upload attribute to the desired file size limit, in bytes:
    $ zmprov
    prov> st __virtual__
    prov> mc defaultExternal hzndataFileUploadMaxSize filesize-in-bytes
    prov> mc defaultExternal hzndataFileUploadMaxSizePerFile filesize-in-bytes
    prov> quit











    Increasing virtual user file upload limit to 3GB


  4. Restart the service

    zmcontrol restart



Note: to clear the Tenant specifier back to default, use the unsetTenant command:

$ zmprov

prov> ut

To view all COS, you can use 'gac.' Notice my example below doesn't show defaultExternal because I do not have any virtual users:

Additionally you can run "zmprov gac -v" which will show all the configured attributes for each COS. The process outlined above can be used to edit any COS manually. Keep in mind a COS you've created in the Administrator Console GUI will be in the default tentant, not the __virtual__ tenant.

Happy modding!
Share:

Thursday, May 15, 2014

Logging into Horizon Workspace fails: We were unable to authenticate you

This error can be pesky as it is a bit misleading. The full error will read something similar to
We were unable to authenticate you. Please check your credentials and try again.

Furthermore, you may notice whenever you load the Workspace login page a notice at the top that reads
Identity provider's url scheme mismatches with that of the request. This could happen when the request is received on https and the Identity provider's is running on http.

This behavior is usually caused by our IdP trying to use port 443 but SSL authentication is disabled. To resolve this issue:

  1. Login to the connector-va web page

  2. Click on Identity Providers

  3. Verify the IdP hostname is correct and using port 443

  4. Check the box to Use SSL for end-user authentication

  5. Click Save




 

 

Give that user's login another go and you should be on your way.
Share:

Monday, April 21, 2014

Horizon Workspace 1.8.1 and Heartbleed patch

This day and age marks a great new release bound to get techies everywhere a mouth watering treat (no not that one). VMware released a patch for Horizon Workspace bringing the software to version 1.8.1!

Among numerous enhancements and fixes, this patch also includes an update to OpenSSL 1.0.1g which resolves the widespread vulnerability known as the Heartbleed Bug. You can check out the list of fixes in the Release Notes


Alongside this patch, you can apply a Heartbleed-only patch to your vApp if desired. If you're running Horizon Workspace 1.0, you must upgrade to at least version 1.5 to apply the Heartbleed fix manually. Likewise you can apply the Heartbleed fix to Workspace 1.8.0, but if you're taking the time to patch it, you might as well update to 1.8.1. See more info about that patch here: kb.vmware.com/kb/2076551


Applying the Heartbleed-Only fix (updating OpenSSL)


Applying the Heartbleed-only patch from the above KB, you should copy the RPM to somewhere on the Gateway-va (/tmp for example). I like to use WinSCP for copying files to and from my appliances. Then run the RPM and you will see it stop nginx and apply the patch:




You can always check the status of nginx afterward by running /etc/rc.d/nginx status

 

Per the KB, after running the OpenSSL fix you'll want to regenerate your SSL Certs. The steps are slightly different if you terminate SSL at the gateway-va vs a Load Balancer, so be sure to refer to the article.

 

You can find more details on the Heartbleed vulnerability here: www.vmware.com/security/advisories/VMSA-2014-0004.html

 

 

Updating Workspace 1.8.0 to 1.8.1
Be sure to check out the Release Notes


1. Take a snapshot of each appliance and the external DB VM
2. Login to the Configurator as root
3. Run /usr/local/horizon/lib/menu/updatemgr.hzn check and ensure you see the 1.8.1 update, then run /usr/local/horizon/lib/menu/updatemgr.hzn update
4.  Reboot the vApp.
NOTE: If you didn't apply the Heartbleed-specific patch above prior to updating to 1.8.1, then you must generate new SSL Certs and apply them to your gateway-va. See the post-installation steps outlined in kb.vmware.com/kb/2076551

<Screenshots coming soon>


Don't forget to also upgrade your Workspace Clients to 1.8.1!

If you have further queries or concerns about how Heartbleed could affect your Horizon View environment, take a gander at kb.vmware.com/kb/2076796  along with the VMware Security Advisories page.
Share:

Friday, April 18, 2014

Horizon Workspace 1.8.1 Client Update & Heartbleed bug

Last night VMware quietly released a patched Windows and OSX Client for Horizon Workspace 1.5 and 1.8 bringing the client to version 1.8.1. This client release includes an updated OpenSSL 1.0.1g. Alongside the release is a KB with the remediation steps for the Client regarding the pesky CVE-2014-0160 vulnerability.

You can continue to track the VMware advisory for this vulnerability here: http://www.vmware.com/security/advisories/VMSA-2014-0004.html

Get the downloads from the VMware Product Page.
Share:

Wednesday, April 9, 2014

Horizon 6 Announced



If you weren't able to attend the live webcast of the Horizon 6 announcement this morning, keep an eye on Twitter's @vmwarehorizon account for a link to watch it later.

Horizon 6 is the latest big news from VMware and is all the buzz for EUC land. There are a number of new features and capabilities that make this a very exciting release. Check out VMware's CTO announcement of it here: http://cto.vmware.com/introducing-horizon-6/?sf24825866=1

Sumit Dhawan, VP and GM of Desktop Products at VMware, frontlined the event and claimed Horizon 6 as an "Innovation Packed Release."

Horizon 6 will come in 3 flavors of licensing:

  1. View Standard - Simple, powerful VDI with great user experience
  2. Horizon Advanced - Cost-effective delivery of desktops and apps through a unified workspace
  3. Horizon Enterprise - Desktops and apps delivered with cloud automation and management
You can find more info in the Horizon 6 FAQ
Share: