Close Virtual Machine Session
-
shane297
- Posts: 6
- Joined: 16. May 2009, 16:58
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: SBS 2008
Close Virtual Machine Session
I am running Vista 64bit Host with Windows SBS 2008 Guest. Is there a way to close the Virtual Machine session and keep the guest OS running without having to shut it down? To explain further, I first open the Virtual Box GUI, then start the Virtual Machine. The guest session window opens and starts the guest OS. At this point I can close the VirtualBox GUI and the guest session window continues to run. I would also like to close this guest session window but keep the guest OS running in the background.
If this is not possible, can the guest session window be launched without having to open the Virtual Box GUI? Is there an independent executable for this? If so, then I can launch this as a background service.
If this is not possible, can the guest session window be launched without having to open the Virtual Box GUI? Is there an independent executable for this? If so, then I can launch this as a background service.
-
baf
- Volunteer
- Posts: 829
- Joined: 27. Sep 2008, 06:18
- Primary OS: Mac OS X Leopard
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: linux,xp,win7
- Location: Luleå or Skellefteå, Sweden
Re: Close Virtual Machine Session
No a Gui session can not be closed without stopping/saving the guest
But look for VBoxHeadless and VBoxManage startvm in the manual and forum.
Then you could connect with vrdp to the guest.
But look for VBoxHeadless and VBoxManage startvm in the manual and forum.
Then you could connect with vrdp to the guest.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
My way: "You live as long as you learn".
-
shane297
- Posts: 6
- Joined: 16. May 2009, 16:58
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: SBS 2008
Re: Close Virtual Machine Session
I am able to launch the VM using the vboxheadless command. However, this has opened a cmd window with the "listening on port 3389" status. Is there a way to launch vboxheadless without running this window?
Re: Close Virtual Machine Session
Yes if you are willing to hack vboxheadless, open the exe in a hexeditor, jump to 248(decimal), you will see a line like:
50 45 00 00 4C 01 04 00 35 B8 0E 3D 00 00 00 00
Jump 5 lines down, you will see someting like this:
00 50 00 00 00 10 00 00 4E B9 00 00 03 00 00 00
Where the value is 03 change it into 02 (forth from the right).
Doing this you have changed vboxheadless into a console-less app, it will NOT show anything anymore, so keep a copy if you want to see anything.
From a script you then run "start "VMNAME" /min VBoxheadless -startvm VMNAME -v config"
Insert standard disclaimer
50 45 00 00 4C 01 04 00 35 B8 0E 3D 00 00 00 00
Jump 5 lines down, you will see someting like this:
00 50 00 00 00 10 00 00 4E B9 00 00 03 00 00 00
Where the value is 03 change it into 02 (forth from the right).
Doing this you have changed vboxheadless into a console-less app, it will NOT show anything anymore, so keep a copy if you want to see anything.
From a script you then run "start "VMNAME" /min VBoxheadless -startvm VMNAME -v config"
Insert standard disclaimer
[This space is intentionally left blank]
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
-
Hans Eberhardt
- Posts: 76
- Joined: 22. Mar 2008, 01:49
- Primary OS: MS Windows XP
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: MS Windows XP
- Location: Feuchtwangen, Germany
VBoxTotallyHeadless
Really good hack.
Please tell us, for which Versions this does apply.
Thanks,
Hans
Please tell us, for which Versions this does apply.
Thanks,
Hans
Re: Close Virtual Machine Session
Applies to any executable which has the same header at the same offset.
[This space is intentionally left blank]
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
-
shane297
- Posts: 6
- Joined: 16. May 2009, 16:58
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: SBS 2008
Re: Close Virtual Machine Session
I am not finding either of these lines or anything similiar in the vboxheader.exe file.
50 45 00 00 4C 01 04 00 35 B8 0E 3D 00 00 00 00
00 50 00 00 00 10 00 00 4E B9 00 00 03 00 00 00
I downloaded "free hexeditor neo" from http://www.hhdsoftware.com/Products/hom ... -free.html. I am using VirtualBox 2.2.2 for Windows.
50 45 00 00 4C 01 04 00 35 B8 0E 3D 00 00 00 00
00 50 00 00 00 10 00 00 4E B9 00 00 03 00 00 00
I downloaded "free hexeditor neo" from http://www.hhdsoftware.com/Products/hom ... -free.html. I am using VirtualBox 2.2.2 for Windows.
-
baf
- Volunteer
- Posts: 829
- Joined: 27. Sep 2008, 06:18
- Primary OS: Mac OS X Leopard
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: linux,xp,win7
- Location: Luleå or Skellefteå, Sweden
Re: Close Virtual Machine Session
Untested:
try redirecting output to nul.
Something like.
VboxHeadless -s machine >nul 2>&1
Should send everything down the drain...
try redirecting output to nul.
Something like.
VboxHeadless -s machine >nul 2>&1
Should send everything down the drain...
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
My way: "You live as long as you learn".
-
shane297
- Posts: 6
- Joined: 16. May 2009, 16:58
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: SBS 2008
Re: Close Virtual Machine Session
@baf - When I run this, it takes the cursor to the next line but still requires the window session to remain open.
Re: Close Virtual Machine Session
Note the 03 value as last marked, values in between may vary between vbox versions. And make sure insert mode is off
[This space is intentionally left blank]
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
If you can read this, you can read the VirtualBox Manual, the Forum FAQ, and the QuickClick FAQ
-=[ Search this forum with Keywords, VirtualBox solutions at you're fingertips]=-
-
shane297
- Posts: 6
- Joined: 16. May 2009, 16:58
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: SBS 2008
Re: Close Virtual Machine Session
Ok. I found it now. That works great. This is a good alternative to srvany or srvstart. Thanks a lot.