Saturday, September 22, 2012

Sleeping Lions

I've had a Mac Pro for about 4 years now and have converted my house to an almost entirely Linux/Mac environment. The only exception is the Win VM that is needed for the Public library's audio books. Wheat I've noticed with OS X is that with each upgrade Apple likes to change little things for no reason what so ever. It's an odd practice and one that causes minor head aches each feline upgrade.

The example is the sleep mechanism in OS X. 10.5 was stable, 10.6 stable still, 10.7 annoying change, 10.8 random settings change.  Why, Apple, why!? At any rate, here's an older post I was going to publish in 2011 that went unfinished and unpublished, but was the reference I needed to fix a new 10.8 issue.

Begin 2011 post:

My main workstation is a Mac Pro 2008. Its the dual quad core intel with 14gb of ram. I run OS X and a Windows XP VM / CentOS 5.5 VM on it at all times. So, when Lion (OS X 10.7) came out the other day I was interested and picked it up via the App store download. I did the upgrade, all went fine. Well, that is except for sleeping.

I usually put the machine to sleep each evening when I retire to bed. It's worked that way since I bought the machine via the small business rep at the Apple store. I like it and am used to it. Well, this didn't work in OS X 10.7. The monitor would sleep, but not the machine itself. So, I did some googleing and eventually came across a post detailing using the pmset command to see what the power management settings were. It looked something like this:

Kim-mp:etc kim$ pmset -g
Active Profiles:
AC Power        -1*
Currently in use:
 hibernatemode    0
 disksleep    10
 womp        0
 networkoversleep    0
 sleep        0 (imposed by 628)
 powerbutton    1
 ttyskeepawake    1
 hibernatefile    /var/vm/sleepimage
 autorestart    0
 panicrestart    157680000
 displaysleep    60

Curious, that process ID#628 is stopping the sleep process from taking place. Ok, what's 628?

Kim-mp:~ kim$ ps -ef | grep 628
    0   628     1   0 10:44PM ??         1:56.59 /usr/sbin/smbd

Huh. Samba is holding up my shutdown? What the? Ok, what's up with Lion and Samba now? I've got a windows based NAS (I know, its headless though and my freenas hasn't gotten set up yet) and my Windows VM that share via SMB. Jeez.

So,  a little more googling lead to an Anandtech review of OS X Lion (here!) that gave good insight into what has happened and why. Ok, no more Samba on Lion for a while till the kinks are worked out. I read on Apple's community support forums the bugs should be gone by 10.7.3 (oh joy!). So, it's either AFP or NFS. Ok, really it's just NFS so my Linux machines would be served as well.

//End 2011 post


Well, I upgraded to Mountain Lion the other day and wouldn't you know it, sleep issue again. I would put the machine to sleep, go to work or bed and when I returned to the workstation, it would be on. My first thought was the dang cat was sitting on my KB again (he and I have been going through some lessons on things he can do and things he can't).  However, today I put the machine into sleep mode and the cat was in one of the bedrooms for the majority of the day. Ok, I need to dig deeper.

So, I looked up the 2011 post above and ran the pmset -g command again.
Kim-mp:tmp kim$ pmset -g
Active Profiles:
AC Power        -1*
Currently in use:
 hibernatemode        0
 womp                 1
 networkoversleep     0
 sleep                0
 powerbutton          1
 ttyskeepawake        1
 hibernatefile        /var/vm/sleepimage
 autorestart          0
 disksleep            10
 displaysleep         60
No process issues like before. So, I gave a look over the settings.  No more panicrestart. Interesting. Womp is set to 1, but in 2011 it was set to 0. A quick man reference showed that womp was WOL during sleep. Ahhh, set to 0. Everything else looked good.

Kim-mp:tmp kim$ sudo pmset womp 0

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Kim-mp:tmp kim$ pmset -g
Active Profiles:
AC Power        -1*
Currently in use:
 hibernatemode        0
 womp                 0
 networkoversleep     0
 sleep                0
 powerbutton          1
 ttyskeepawake        1
 hibernatefile        /var/vm/sleepimage
 autorestart          0
 disksleep            10
 displaysleep         60
Kim-mp:tmp kim$

All should be good now and hopefully Mountain Lion will finally stay asleep.

Update: It verks!

Saturday, September 8, 2012

VMware Certification Roadmap And A Quick Update

I've been at the new position for about a month now. I'm one of the Admins for a global Linux based network. There's no shortage of oddities to deal with around the globe. I'm enjoying it and it's really nice to be with like minded folks (nerds!). I've had to adjust to a larger environment moving from a 2 man team to a 6-7 man team in a rather large company. It's going to be fun.

I've started some classes as well. A second Network Security course which is very Windows centric. I suppose when you're trying to patch holes you go for the most breakable OS.  I plan to sit for the Security+ exam after this class and will hopefully end up with a voucher from the course. Of course this means I'll be giving some more money to Darril Gibson for his audio material and ebook covering the SY-301. This will finish up my security courses for a while until I start work on the CCNA:Security sometime in the next year or two.

My second class is the VMware vSphere: Install, Configure, and Manage V5. It's being offered at my local community college for a fraction of the normal 1-3K cost. It does however come with the caveat of being 16 weeks long. You do most of the labbing in a "Pod" which is a virtual setup of a small vSphere installation. It's a not huge difference from deploying Openstack locally and having a private cloud at your disposal. As I understand it though, the VCP5 exam (VMware Certified Professional) requires a good amount of studying in order to pass the exam. That said, it's not just the VCP anymore.

Thc VCP exam has been broken out into 4 different flavors (and I might be late to this game), VCP IaaS, VCP Cloud, and VCP desktop, and VCP datacenter virtualization. 

VMware's new certification roadmap:



and of course, links to all the exams:
http://mylearn.vmware.com/portals/certification/?ui=www