VMware Communities
ahmd9
Enthusiast
Enthusiast

Why doesn't VM wake up from a sleep mode at a predefined time?

I was wondering why does my Windows 7 OS installed on a VM on VMware workstation 8 not wake up from a sleep mode when I set up a schedule in the Task Scheduler to do that?

PS. Note that my actual Windows 7 does so without a problem.

Tags (2)
11 Replies
AWo
Immortal
Immortal

What have you scheduled where? Is VMware Workstation running at that time? In which state is the virtual guest?

Please describe your setup in more detail.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
ahmd9
Enthusiast
Enthusiast

Thanks for the reply.

>What have you scheduled where?

I used Windows Task Scheduler to wake up after 10 minutes from the current time. I then put VM into sleep mode by using Start -> Sleep.

>Is VMware Workstation running at that time?

Yes.

>In which state is the virtual guest?

I'm not sure how to answer this one. The guest OS screen is black and I cannot interact with it. (Exactly the same as when it enters sleep mode.)

Reply
0 Kudos
AWo
Immortal
Immortal

How does the task look like (batch file, post it)?

Is the Windows schedule service running?

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
ahmd9
Enthusiast
Enthusiast

Here you go, made some screenshots:

1. Set up the task in the VM for 12:31:37 pm as shown here:

http://i150.photobucket.com/albums/s99/dc2000_bucket/scrshot_setup.png

Also check that the task scheduler service is running (see screenshot above).

2. Put VM to sleep @ 12:23 pm:

http://i150.photobucket.com/albums/s99/dc2000_bucket/scrshot_sleep.png

3. Then I wait for the VM to wake up but nothing happens. As you see at 12:31:51 the VM is still sleeping:

http://i150.photobucket.com/albums/s99/dc2000_bucket/scrshot_host.jpg

The task export follows:

<?xml version="1.0" encoding="UTF-16"?>
  <RegistrationInfo>
    <Date>2012-07-17T12:18:05.2328344</Date>
    <Author>WIN-4LRGSB72JGR\DC</Author>
  </RegistrationInfo>
  <Triggers>
    <TimeTrigger>
      <StartBoundary>2012-07-17T12:31:37</StartBoundary>
      <Enabled>true</Enabled>
    </TimeTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>WIN-4LRGSB72JGR\DC</UserId>
      <LogonType>InteractiveToken</LogonType>
      <RunLevel>LeastPrivilege</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
    <WakeToRun>true</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>notepad</Command>
    </Exec>
  </Actions>
</Task>

Reply
0 Kudos
AWo
Immortal
Immortal

You set up the task within the VM and put it to sleep? How should it come alive if it is paused? When it is paused nothing is running in the guest.

As far as I see only one screenshot is from the host (if I compare the task bar in your screen shots), the second one showing the VMware Workstation application. You shoudl set up the task in the host.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
ahmd9
Enthusiast
Enthusiast

Yes, of course I put the VM into sleep. That's what I'm testing. So you're saying that, unlike the actual OS, the one installed in the VM will not wake up from a sleep mode on a set wake timer because the VM does not support it, right?

Reply
0 Kudos
AWo
Immortal
Immortal

BTW, did you check the small box, telling the scheduler to wake up the Windows 7 guest in your task setup?

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
ahmd9
Enthusiast
Enthusiast

Andreas Woithon wrote:

BTW, did you check the small box, telling the scheduler to wake up the Windows 7 guest in your task setup?

AWo

I'm assuming that you're referring to the Task Scheduler checkbox, that is running in the VM, right? Then yes, it's in the export file I posted above:

<WakeToRun>true</WakeToRun>

I tried the exact same configuration on a real Windows 7 desktop and it worked just fine -- it only doesn't work in a VM.

Otherwise I need to know about such checkbox in the VMWare workstation settings...

PS. AWo, I'm sorry, but are you in any way associated with the dev team of this VM? Because it seems like I'm now explaining you how to wake a Windows machine from a sleep mode on a preset timer... and that is not the point of my original question.

Reply
0 Kudos
AWo
Immortal
Immortal

ahmd9 schrieb:

PS. AWo, I'm sorry, but are you in any way associated with the dev team of this VM?

No, I'm not.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
AWo
Immortal
Immortal

Run "powercfg -energy", that gives you an detailed html report about your power saving issues. It also shows the enabled sleep states (S1-S4). Check which sleep level your guest supports. If it is S2 or higher I don't think you can wake the guest up from within the guest, because the (virtual) CPU is off power then. So a wakeup process from within the guest should not work.

BTW, check also if you have this setting enabled:

W7_Sleep_1.jpg

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
ahmd9
Enthusiast
Enthusiast

Thanks. The "allow wake timers" option is enabled but supported sleep states produced this:

S1 Sleep Supported true
S2 Sleep Supported false
S3 Sleep Supported false
S4 Sleep Supported true

This setting, I believe comes directly from hardware (from the Windows standpoint) so that means that the VM does not support wake timers. Oh, well...

Reply
0 Kudos