Hi,
First post here.
If X dies unexpectedly, why does the VM die with it? Technically, it can still keep running. This is major loss because it forces fsck/chkdsk on next boot of the guest.
I am using the binary distribution of virtualbox-1.6.2.
Virtualbox VM gets aborted if the X dies
-
stefan.becker
- Volunteer
- Posts: 7639
- Joined: 7. Jun 2007, 21:53
The window which has the VM running in it, will close because X that was serving that window died unexpectedly. The VM inside that window aborts and needs a restart.
The VM itself should not be windows application. only the display of the VM should be. May be they are tied together for a reason, but I don't understand that part.
The VM itself should not be windows application. only the display of the VM should be. May be they are tied together for a reason, but I don't understand that part.
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
devsk, have a look the Forum Posting Guide for help in framing Qs. Also use postreply to reply to a post and quote to pick up a specific quote to replay against. There's no point in quoting the entire post. It just makes it difficult for others to follow.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
I believe devsk is asking is for the the VirtualBox window in X to not be in the same process as the actual VM thats running, to simply be a front end (kinda like the way stefan mentioned).
I think a better solution to the problem would probably be to have VirtualBox attempt to save the guests' state if it loses its connection to the X server. Assuming the X server doesn't explode too badly, this should be possible.
I think a better solution to the problem would probably be to have VirtualBox attempt to save the guests' state if it loses its connection to the X server. Assuming the X server doesn't explode too badly, this should be possible.
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Well, the problem is is that X is the 'parent' of the VB process. If the 'parent' dies, so does it's 'children', else they become 'zombies'. Just like what Stefan said, the starting process is tied to the X process. You can run VB from a command line by switching to a virtual terminal (TTY) so it runs outside X, then connect to the VM using RDP, VNC or any other remote control software.
For the explanation of 'parents', 'children' and 'zombies', please see:
http://en.wikipedia.org/wiki/Zombie_process
http://en.wikipedia.org/wiki/Parent_process
http://en.wikipedia.org/wiki/Child_process
For the explanation of 'parents', 'children' and 'zombies', please see:
http://en.wikipedia.org/wiki/Zombie_process
http://en.wikipedia.org/wiki/Parent_process
http://en.wikipedia.org/wiki/Child_process
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
you are kidding right? A parent is the process which does 'fork()' to spawn a child process. X doesn't do a spawn of VB processes. Its the shell running under xterm/konsole/g-t that does it. And the rest of the processes are spawned (whether as detached daemons e.g svc process, or as direct children) by that process.Well, the problem is is that X is the 'parent' of the VB process.
In this case VB processes are more of a client to the X server. And clients can detect server death. VB code can detect that its connection with X has terminated and it needs to save the VM state before dying. There are examples of many processes which exit cleanly after their connection with X abruptly dies. Of course, if the code has hard coded throwing of a dialog saying "saving state", that's going to fall flat as well.
See, I am not that noob....
Starting VM from CLI outside of X and then doing RDP into it, is a good workaround but not the solution.
Another option is that VB can do what vmware-server does. Decouple the console and the VM completely.
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
OK, where stdout is going? Or did you do a
Look, something is pretty wrong with your system if X is crashing. This isn't a sort of high demand request. If you don't want this to crater your VM then run as I suggest above and connect to it with RDP. That way you can still shut it down cleanly through VBoxManage.
- nohup VBoxHeadless -s yourVM -p port 1>someRDPlog 2>&1 &
- "VB code can detect that its connection with X has terminated and it needs to save the VM state before dying"
Look, something is pretty wrong with your system if X is crashing. This isn't a sort of high demand request. If you don't want this to crater your VM then run as I suggest above and connect to it with RDP. That way you can still shut it down cleanly through VBoxManage.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.