Virtual machine pauses when clicking on Close [X] button

This is for discussing general topics about how to use VirtualBox.
Locked
dexter86
Posts: 11
Joined: 17. Jul 2014, 11:35

Virtual machine pauses when clicking on Close [X] button

Post by dexter86 »

I don't know if this is by design or it's a bug nobody noticed/cared, but when you click [X] to "close" Virtual machine, that Virtual Machine is in [Paused} state. Why do I even care, you ask? Some background story: I have virtual machine (Ubuntu Server 14) on remote physical server (Ubuntu Server 12) that I was testing to be a gateway. I connected from my home PC (Win 8.1) through RDP to my work PC (Win 8.1 Pro) there. My work PC is using that virtual machine as gateway. Physical server has VNC installed so I can do some things using GUI from my work PC. That virtual machine was started as "Headless". So, while I was connected and doing some stuff i clicked on Close [X] button to hide that machine (to select "Continue running in the background" and then OK button). And right after clicking on [X] I lost connection to my work PC. As I had other way to connect to my work PC (other physical gateway -> rdp to win server -> rdp to work pc) I connected I saw that virtual machine was in Paused state with Close dialog box displayed. I think VirtualBox shouldn't pause machine when Close dialog box is displayed. Here's an example from my home PC Image
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Virtual machine pauses when clicking on Close [X] button

Post by scottgus1 »

Pausing the guest after the close box has been clicked seems to have been the way in Virtualbox for years. Why? I don't know. Maybe it's just the way they did it, or maybe they wanted a way to pause a guest quickly. Or maybe it's a side-effect that cropped in and no one has questioned it. Folks on the forum will not be able to say definitively why the developers made that programming decision, unless a developer decides to jump in.

You could try asking the developers on the mailing list, or post an enhancement request to not pause when clicking Close on the Bugtracker, and politely ask to be informed of why they'd like to keep the present function if they choose not to apply the enhancement.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Virtual machine pauses when clicking on Close [X] button

Post by michaln »

It's not a side effect, it's quite intentional. If the VM is powered off, it doesn't matter whether it's paused first or not. When ACPI shutdown is performed, it probably doesn't matter either. If the state is saved then yes, it matters a lot, and the VM must be paused as the dialog is brought up to give the user any control over timing.

"Continue running in the background" does not really fit with the previously exclusive "terminate VM one way or another" logic of the dialog.
dexter86
Posts: 11
Joined: 17. Jul 2014, 11:35

Re: Virtual machine pauses when clicking on Close [X] button

Post by dexter86 »

michaln wrote:"Continue running in the background" does not really fit with the previously exclusive "terminate VM one way or another" logic of the dialog.
So I think it should be changed so that VM is not paused when Close dialog box is displayed, it should only pause when saving state function is launched.
Locked