Prevent Sleeping

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Chico008
Posts: 7
Joined: 29. Jan 2010, 23:17
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Prevent Sleeping

Post by Chico008 »

Hi

I'm using a Guest for my work for security reason, connected to my company

My Computer, on nomal times, goes to sleep when i'm not using it
but, when it goes to sleep, my Vm disconnect and crash sometimes

Is there a way to tell Virtual box to prevent sleeping when a guest is running ? i don't want to change my power setting everytime i'm using my guest or not

Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Prevent Sleeping

Post by mpack »

Why does your computer go to sleep? Get your IT people to disable that feature. Turning off the monitor is fine, going to the lock display is fine. Just don't go to sleep.

If you revealed the VirtualBox version then perhaps more specific advice could be offered. For example, VirtualBox 6.1.16 changelog has mention of a "audio related crash following host sleep" bugfix.
multiOS
Volunteer
Posts: 1227
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux, BSD
Location: United Kingdom

Re: Prevent Sleeping

Post by multiOS »

@Chico008

Not "in VirtualBox" but you can use the power settings in the Guest VM to disable its 'sleep mode' and any other irrelevant hardware power settings that the Host already manages. However, if the Host Machine goes to sleep and, in doing so, shuts down any vital hardware 'connections' or cuts off resources that the Guest needs to be continuously available to remain working that isn't going to be a solution to the issue, as mpack is 'hinting'.
Chico008
Posts: 7
Joined: 29. Jan 2010, 23:17
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Re: Prevent Sleeping

Post by Chico008 »

i'm using this version Version 6.1.16 r140961 (Qt5.6.2)

the host is a personnal computer
guest is not running full time, only during my work time

on some apps, you can find a option tu prevent computer to sleep while the app is working
isn't there a similar thing in virtual box ?

Guest is already prevent to sleep, but the host, mine, not, because i want it to sleep when i'm not using it and not working
but when i work, with the guest on, i'd like my host not to sleep

can't make a task with specific time because my work time can differ from day to day
multiOS
Volunteer
Posts: 1227
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux, BSD
Location: United Kingdom

Re: Prevent Sleeping

Post by multiOS »

My simplistic answer is to alter the power setting in your PCs Operating System to prevent it from 'sleeping'; and use a normal shutdown of the VM and PC when you've finished working. VirtualBox can't do it for you, but you could potentially create a Script/Batch File to run the whole shutdown process if you're into that sort of thing.

Edit: Or, if you don't want to change the Host OS settings you could try: https://www.softwareok.com/?seite=Microsoft/DontSleep
Post Reply