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:

Follow by Email