Delaying a MacBook Pro’s deep sleep

I bought a new mid-2012 non-Retina MacBook Pro late last year, immediately prior to the line being discontinued (I still think the second-generation MacBook Pros were the best series).  After about a week, I found an annoying thing with it:  When I turned on the computer after coming back from work, it seemed like it almost always required a cold startup after sleeping, where the optical drive initialized and did its buzz, and took a lengthy 10-15 seconds to wake up from sleep.  Also, the computer would wake up (and the optical drive buzzed) even if the MagSafe charger was disconnected.

I contemplated bringing it into the Apple store, as this behaviour was not exhibited in my mid-2009 model and the optical drive buzzing was plain annoying; I thought there was something wrong with my Mac specifically.

However, from a bit of searching it turned out that this was a “feature” of the Mac since OS X Mountain Lion for 2012 Macs and newer: Continue reading “Delaying a MacBook Pro’s deep sleep”

Basic ‘ZFS on Linux’ setup on CentOS 7

Here is a quick guide to getting a plain ZFS partition working on a Linux machine using the “ZFS on Linux” project.  I was playing around on a CentOS 7 virtual machine trying to set it up as a replication target for my home FreeNAS box as a backup.  If you are unfamiliar with ZFS, it is a filesystem for a storage environment, having features such as data integrity protection and snapshots; I came across it as it is used in FreeNAS.

Here is the procedure I used:

Continue reading “Basic ‘ZFS on Linux’ setup on CentOS 7”

VMware ESXi Scratch Space

If you installed VMware ESXi on a USB stick like I did, the “scratch space” (used for storing logs and debug information) is stored on a RAM disk.  This takes up 512MB of memory that could otherwise be provisioned to virtual machines.  In addition, it does not persist across reboots, which explains why I was never able to find any logs after a crash. Also I was seeing random “No space left on device” errors when I was trying to run the munin monitoring script for ESXi.

The solution to this is to simply create a folder on a disk, and configure ESXi to use it.

  1. Login to the console or SSH to the host.
  2. Go into one of your datastores in /vmfs/volumes/
  3. Create a directory for the scratch space.
  4. Login to the vSphere Client.
  5. In the Host device, go to the Configuration tab, then find the Software category on the left menu and click Advanced Settings
  6. In the Configuration parameters window, find ScratchConfig on the left.
  7. For the “ScratchConfig.ConfiguredScratchLocation” box, enter the path to the folder you created in step 3.
    ESXi Advanced Settings Window
  8. Reboot the host.

It’s as simple as that!


Wi-Fi everywhere!

Over the past year, more and more ShawOpen Wi-Fi hotspots have been popping up everywhere around Metro Vancouver.

This is incredibly useful for Shaw customers (like me) because it’s so easy to find reliable Wi-Fi access anywhere we go.  If you’re a Shaw internet customer, you get to save several devices so that they can automatically connect to the network without having to login through the portal.

Telus is starting to form their own network as well, under the names #TELUS and #TELUSDirect.  The one advantage they have is that for Telus customers, #TELUSDirect is a secured Wi-Fi network, whereas ShawOpen is an open unsecured network.

I’m hoping that Shaw will consider providing a secure network for customers, but until then we’ll have to use our own VPN services to secure the Wi-Fi connection.

“Error: Boot loader didn’t return any data” when booting up Xen guest

Error: Boot loader didn't return any data

I have come across this error two or three times before, and each time I spend hours trying to figure out how to get my virtual machine to boot.  This blog post is just to document a fix so that I can refer back to it, and hopefully it will help people out if they’re experiencing the issue as well.

Continue reading ““Error: Boot loader didn’t return any data” when booting up Xen guest”