Thursday, November 07, 2013

Managing Hosts File on OS X with Gas Mask

If you use Homebrew as your package manage on OS X then you really should consider adding Homebrew-cask.  A simple howto is available here.

One of the great things about Homebrew-cask is that you can look at all of the applications in the directory and see all the different applications that are out there that you may not have known about.

I came across a simple hosts file manager called Gas Mask.  If you're someone like me who works multiple projects and has to maintain a number hostnames so that they resolve to IP Address, then you may find this tool fairly useful.

It's fairly simple and there's already some good write-ups out there so I won't clog up the internet tubes with unnecessary redundancy.   If you have Homebrew and HomeBrew-Cask installed, it's super simple to get started.  Just run:

       brew cask install gas-mask

Then follow the instructions here to get started.

Wednesday, November 06, 2013

VirtualBox, Mavericks - Hanging on Shutdown

I upgraded VirtualBox to 4.3.0 to work as it apparently addresses the network issues that I was having with running earlier versions on OS X Mavericks.

However, a new nuisance popped up - one that forces me to do a hard shutdown when closing shutting down.  Thankfully, the interwebs are experiencing the same issue and people much smarter than me were able to figure it out.

In short, my problem was that I had some old libraries in /Library/Extensions/ so I removed the VBox*.kext libraries.  I also did a reinstall of VirtualBox just for good measure and so far so good.  Now I can shutdown my laptop cleanly and run networked VMs.    Yay!!!

Friday, November 01, 2013

The Case of the Disappearing HOSTS file

For a few months now, I've been having an odd issue on OS X where my /etc/hosts file keeps getting reset to some default.  It was a nuisance and I basically resorted to some scripts to update my hosts file and restore the correct settings.

Finally, spent some time investigating this and the mystery is now solved


Turns out that if you have installed the Cisco AnyConnect VPN, it creates an /etc/hosts.ac file and, on reboot, restores that file as the /etc/hosts file.

Simple fix is to modify the /etc/hosts.ac file instead.  So basically, I've traded one kludge fix for another one.


Thursday, September 12, 2013

Accessing KVM instances via Virt-Manager on OS X



Getting X11 to run on OS X via xQuartz is a fairly painless process.  You just have to download it from here and install it.

There is no virt-manager native equivalent for OS X so the best way is to run X over SSH and remotely access virt-manager.  However there are a couple of gotchas that I experienced as the remote linux server I was accessing needed a few more packages to make this work.


Enable Remote Access to Virt-Manager via an OS X Machine

Install xauth

When connecting to a remote server via ssh with the -X option, the following error is displayed:

    X11 forwarding request failed on channel 0

To resolve this install xauth:

    [root@host ~]# yum -y install xorg-x11-xauth

Install Fonts

Virt-Manager is a X application which is capable to manage RHEL's XEN, QEMU/KVM, LXC service. Similar to other X application, it could be launched remotely via X11 Forwarding.

However, it happens that garbage fonts will be shown if the host is not installed with appropriate font package. To fix this, package dejavu-lgc-sans-fonts have to be installed.

    [root@host ~]# yum -y install dejavu-lgc-sans-fonts

Saturday, September 07, 2013

VirtualBox and OS X Mavericks

If you're like me and  one of those that like to live on the bleeding edge, you've probably installed Mavericks already.

While I haven't played with too many of the new features, I did stumble across an issue with VirtualBox that is a bit of a nuisance.   The gist of it is in this ticket, but in general Mavericks fully stops using the legacy StartupItems piece of OS X.

StartupItems no longer exist in Mac OS 10.9 Mavericks. StartupItems was deprecated 8 years ago. Host-only adapters (and possibly other functionality) cannot be used in Mac OS 10.9.
Temporary work around: sudo /Library/StartupItems/VirtualBox/VirtualBox start (Must be run after each restart)
 This is important for VirtualBox as, among other things, this is how it starts its networking services that provides the ability for host-only adapters.  A bit of a nuisance and hopefully the issue gets resolved soon.


Monday, July 22, 2013

ownCloud Openshift Quickstart Updates

Thanks to @iandexter for the pull request to add cron job functionality to the ownCloud quickstart for OpenShift.  This change will leverage the cron cartridge for OpenShift to call the ownCloud cron job at the quarter hours.  In addition to adding in cron functionality, it's a good example of how to execute a particular task for a given minute interval.

The latest update is in the master branch here: owncloud-openshift-quickstart

Friday, July 19, 2013

Installing Ansible on OS X via Homebrew

I use Homebrew to manage the package installation on OS X.  I've recently started looking more into ansible  but its not available via the standard brew repositories.

Ansible is available for install via MacPorts, but since its generally a bad idea to install both HomeBrew and MacPorts on the same machine, that wouldn't work for me.

Thankfully, I'm not alone in this and thanks to some Google queries targeted toward github, I found a brew recipe out there.

So to install ansible on OS X, here's the quickest way to get started:

- Install Homebrew
- Install python 2.7 (Currently 2.7.5 in Homebrew)

    brew install python  

- Install ansible

    brew install https://raw.github.com/mnot/homebrew-stuff/master/ansible.rb


And voila!  Thanks to  @mnot , I am able to get up and running on ansible