[HDoaLC] Power Management

[HDoaLC] Power Management

  • Comments 5

One of the biggest challenges I have hit with using a Hyper-V virtual machine on my laptop as my desktop environment has been power management.  I was expecting this, as Hyper-V has been designed for servers and not for laptops.

The first issue I have encountered is battery life.  When running Windows 7 natively on my laptop – I can get about 2.5 hours on my battery.  When running Windows Server 2008 R2 + Hyper-V + Windows 7 in a virtual machine I can get about 1 hour and 10 minutes.

Ouch.

For the most part I have taken to carrying my power supply around with me (thankfully most Microsoft conference rooms have ample power outlets).

The next issue is related to the first.  Normally when Windows runs low on power it puts your laptop to sleep.  Unfortunately Hyper-V disables the ability to sleep.  As such I had to make some changes to the default power policy.  The first change was to configure Windows to shutdown when power got low instead of sleeping.  The second change was to raise the critical power warning from 7% to 12% – as my laptop needs to have enough time to shut down correctly.

One last issue that I have yet to find a solution for is the fact that when I am running the laptop in full screen mode, I do not get to see what the battery charge level is on my laptop – which means that it is always a surprise when the system shuts down from low power.  I have poked around and found that there are WMI interfaces that I could query over the network from the virtual machine that would allow me to see this information – but I have not had the time to actually try and put something together here.

Cheers,
Ben

Leave a Comment
  • Please add 7 and 4 and type the answer here:
  • Post
  • I feel your pain :) I ran Server2008 + HyperV + Main workstation in a VM for a while when HyperV was initially released. The benifits were good, but the power problems soon forced me to abandon it.

    What me (and most of my company) is looking for is bare metal environment much like HyperV Server2008 or server core that has a basic UI for managing and viewing VMs.

    We want all the resources and power being given directly to the guests - if we are running a workstation VM then the parent partition is of little use to us and therefor all it needs to have is a UI to view/manage VMs.

    I raised this back in the HyperV TAP programme, but sadly nothing came of it. This could effectively be MS's client virtualisation solution to rival VMWareWorkstation - but would surely be more efficient. You guys need *something* because VirtualPC just doesn't cut it considering no x64 and no snapshot support.

    Lack of an appropriate client solution is surely harming the server side uptake of HyperV - I know it definately is in my company and I know others with the same issue. The fact that VMWare can move VMs from the client to the server with no conversions or such is a big win for them.

  • Perhaps you should take a look at the VMware solution for this problem. Virtual PC could certainly benefit from it and I don't see any hard in including it in Hyper-V as well. It presents the power information it gathers from the host to the guests. If my laptop is on battery, the Windows guest sees the battery level and shows the percent charge remaining in the systray. If I plug my laptop in, then it shows it is connected to AC power in the systray. AFAIK, this information is passed through the ACPI interface as part of the emulated hardware and doesn't rely on the VMware Tools that run in the guest. For the server role of Hyper-V, passing along power information form the UPS on the host may also be of benefit to the guests. just make sure its all options that can be turned off for those who don't want the guest to know about host power (VMware has this option in the VM options). Personally, I tell the Windows guest to show the info but not to act on it as I rathre suspend the VM if needed than have Windows try to go to sleep or shut itself down, both if which take far longer than suspending and resuming the VM from within VMware.

    BTW, I use VMware mainly because I use a Mac and VMware fusion is the best option there. It is nice to be able to move my VMs between there and Linux servers. I liked Virtual PC back in the Connectix days. I briefly had VPC 5.1 running on an OS/2 host as well as VPC 5 rtunning on W2K. I used it on my PowerMac G5 for years, that is after waiting a year for Microsoft to update it to work on that processot as development had slowed to a crawl after their acquisition. Now I mainly read your blog for the interesting bits regarding running old games in VMs and am bored by all the posts on manipulating the VMs using propritery scripting languages.

    Joe, take a look at wht Citrix is doing with Xen for the desktop. From the demo I saw, its even thinner than Windows Core Server + Hyper-V. The guets run fill screen with proper hardware graphics acceleratiion. Switching between the VMs is akin to using several boxes on a KVM rather than several VMs on a single box.

  • Hi "VMWare user" :)

    I think we misunderstand eachother, Citrix Xen Desktop and VMWare View are VDI solutions. We want to use our local  machines as the virtualisation hosts for "workstation" and "development" VMs. There is a lot of resource on 50 developer boxes each with quad core and 8GB ram. It is also a much simpler infrastructure. We want to see a bare metal HyperVisor that uses minimal resources itself and allows the VMs to use as much as possible. The only UI it needs is the ability to manage, view and use the VMs.

    A centralised VDI solution might be good for a virtualised desktop solution in larger houses, but what I'm looking for is the ability to allocate my resources to whatever I need at the time. If that involves shutting down my "workstation" VM to give extra resource to my "customer demo VM stack" then that is something that I want to be able to do :)

  • Ben,

    I've run into the same issue -- I run Server 08 x64 on my Dell "mobile workstation" laptop (16GB RAM/Quad/RAID). This machine functions as my "main" machine but it's very hard to use without power management -- I also find that multimedia playback on the parent is pointless. So I'm curious on what your take will be as to using Windows 7 virtual PC for this role of mobile test lab/demo.

    Mark

  • Joe,

    So, miscommunication abound. We are on the same page more than you think. I too am a developer with a high end machine that has spare resources to utilize and need to have a myriad of test environments. Also, I can not rely on merely viewing VMs on a server as I need to remain portable and independent. I work in a decentralized company that is spread across many countries and travel frequently.

    When I said Citrix Xen for the desktop, I did not mean Citrix XenDesktop as I was not aware of that product, just XenServer and their general server-centric offerings. Rather, I was refering to their project to bring the Xen hypervisor to the desktop arena. There is a brief demo viewable at http://www.youtube.com/watch?v=fgMUKaXuAzU which shows two Windows sessions on a laptop, neither acting as a host to the other. There is another much cooler demo at http://www.youtube.com/watch?v=kxoWxjThzo0 which shows Mac OS X and Windows running side-by-side on a laptop, again with neither hosting the other as they are both 'guets' to the hyperisor itself. The second one is an excerpt from an hoour long presentation and there was at least another minute related to the topic that was cut, but I don't have the original video handy at the moment.

    Suffice to say, this is what I want and I believe you would be pleased  with it as well. If they can get this to market in a stable ashion, I may soon be posting under a different pseudonym.

Page 1 of 1 (5 items)