[vbox-dev] good way of detecting guest vm reboot?

Huihong Luo huisinro at yahoo.com
Thu Jul 22 22:57:59 GMT 2010


Thanks for the info.
 
It's the Frontend GUI layer, seems the guest additions state change is the way to go?

--- On Thu, 7/22/10, Knut St. Osmundsen <knut.osmundsen at oracle.com> wrote:


From: Knut St. Osmundsen <knut.osmundsen at oracle.com>
Subject: Re: [vbox-dev] good way of detecting guest vm reboot?
To: vbox-dev at virtualbox.org
Date: Thursday, July 22, 2010, 3:29 PM


Huihong Luo wrote:
> need to do some cleanup after a guest reboot, e.g., to close all taskbar
> buttons and system tray icons from that vm.
>  
> One way is to detect the additions state from the vm, any other better
> way to detect a reboot?

Depends on where in the code you are.  If you program the main API, the
additions state change event is the best way to detect it I think.  On a
deeper level there are several ways to get a callback when the VM is
reset.  PDM Device & Drivers have pfnReset callback which gets worked
when the VM is reset or reboot.  On the VM level there one can register
a callback via VMR3AtStateRegister that gets called on every state
change and it would then be possible to take action when leaving any of
the VMSTATE_RESETTING* states.

Hope this was of some help.


-- 

Kind regards / Mit freundlichen Gruessen / Vennlig hilsen,
  bird

--

ORACLE Deutschland B.V. & Co. KG  Knut St. Osmundsen
Werkstrasse 24                    Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany          mailto:bird at sun.com

Hauptverwaltung: Riesstr. 25, D-80992 Muenchen
Registergericht: Amtsgericht Muenchen, HRA 95603

Komplementaerin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschaeftsfuehrer: J. Kunz, M. van de Molen, A. van der Ven


_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100722/83dca543/attachment.html>


More information about the vbox-dev mailing list