January 29, 2013

Windows 2008 R2 on a Laptop

Purpose: This post explains the pros and cons of running a server operating system on a laptop.

A year ago, I was picking out a new business laptop and had a decision to make.  My employer had given me $700 as part of their BYOD program.  As a consultant, I wanted something that could run a lab full of VMs but at the same time be light and portable.  After searching the Ultranet for fifteen minutes, that dream died.  In the end, I chose performance, price, and battery life (Dell Latitude E6420) over portability (MacBook Pro).

The next big decision was hypervisor.  VMware Workstation had worked well in the past but I couldn't stop thinking about a story I heard about a vendor running Windows 2008 R2 on his laptop to avoid being seen running a competitors hypervisor.

There were a couple of things that made me like this route:
1) It was unusual, which in my mind makes it cool
2) It would give me lots of hands on with a server OS that I was frequently working with and a hypervisor that I hadn't touched

The last twelve months running a bulky server OS on my daily driver laptop were an overall positive experience and on more than one occasion came in handy for testing or reference. I learned a fair amount about Hyper-V which will likely pay off dividends now that Windows Server 2012 has been released and looks promising.  That being said, I won't be doing it again.  I ran into a fairly large issue (see "Windows 8 and C-States") that could have been resolved much sooner had I been running a more mainstream laptop OS.  As nice as running a small army of VMs on a laptop can be from time to time, it doesn't justify lugging around a 9 pound laptop.  I have access to several labs for that kind of troubleshooting.  My next laptop will be light and lean--MacBook Air'ish.

If you would like to buck the trend and go down this same path, here are some things you'll want to know.
  • Disable hibernation before enabling Hyper-V (see Aaron's post below)
  • Wireless network connectivity requires a feature called Wireless LAN Service
  • Changing LAN networks frequently causes headaches.  Disable the adapter and re-enabling it often fixes issues when the auto-repair failed.  There were times when it took a reboot to finally fixed it.
  • Bridge your network connections to give VMs Internet access to a wireless connection.  Highlight both networks, right-click, Create Bridge.
  • Disable your DNS suffix if you travel from network to network so it won't automatically append workdomain.local to every host name.  In the Advanced section of your TCP/IP properties, click on the DNS tab, under Append these DNS suffixes (in order), add a ".".  That will force your to enter a suffix every time but will less annoying than the wrong domain name.
  • The Windows Search service is disabled by default so nothing will be indexed (OneNote, Outlook...)

  • Microsoft Security Essentials (their free antivirus) works fine

  • OneNote can't start without the Desktop Experience feature enabled

  • Microsoft Media Player can't play DVDs because it does not come with a codec.  The easy workaround is to install VLC

SageLike Post ID: SL0003

Applies to:
Windows 2008 R2
Maybe others

stealthpuppy.com - Disable Hibernation before enabling Hyper-V on a laptop

January 7, 2013

Windows 8 and C-States

This post explains what to do when your Windows 8 with Hyper-V enabled laptop has power issues.

While working on a light  or heavy workload the laptop turns off.  I do not mean shuts down or blue screens but acts as if you just pulled out the battery  and power cord at the same time.  Basically, a turned off laptop where a running one once was. I have been battling this intermittent issue on my Dell Latitude E6420 laptop for the last year.   Sometimes it was twice in a day, sometimes it was once a week,  other weeks were totally clean.   Dell support believed it was an issue with the motherboard (twice).  At one point, I believed it was an issue running Windows 2008 R2 on a laptop  but that is a story for another post.   When the problem happened on a fresh Windows 8 install it got me thinking.

Windows 8 ran totally clean for a month before the power kill happened.  Right about the time I turned on Hyper-V, hmm...  A few Google searches later and I had the solution.   In the BIOS, Virtualization Technology needs to be turned on and VT for Direct IO will be needed for some functionality.
Turn off C-States.

Hyper-V does not play well with Intel's C-States.  C-States are low power modes for CPUs (see references below for more info).  This doesn't make much sense for a server in a data center, especially when it runs multiple VMs so turning them off is a good thing.  Turning them off will also give your server better performance.  In Hyper-V's defense, they aren't the only one to suffer issues from C-States.  XenServer has had well documented issues (CTX127395) as well.

Sidenote: I did not find official recommendations from Microsoft to turn it off because of issues but I did find one to turn it off for better performance.

SageLike Post ID: SL0002

Applies to:
Windows 2008 R2
Windows 8
Maybe others

hardwaresecrets.com - Everything You Need to Know About the CPU C-States Power Saving Modes
technet.com - Hyper-V and BIOS power plans (c-states)
KB974598 - You receive a "Stop 0x0000007E" error on the first restart after you enable Hyper-V on a Windows Server 2008 based computer
KB2000977 - Hyper-V: Performance decreases in VMs on Intel Xeon 5500 (Nehalem) systems
CTX127395 - Hosts Become Unresponsive with XenServer 5.6 on Nehalem and Westmere CPUs
CTX130464 - How to Check if Extra C-States are Enabled without Booting into the BIOS.
SL0002  - Windows 2008 R2 on a Laptop