Using Guest Properties to Wait on VM Events
The properties /VirtualBox/HostInfo/VBoxVer,
/VirtualBox/HostInfo/VBoxVerExt or
/VirtualBox/HostInfo/VBoxRev can be waited on
to detect that the VM state was restored from saved state or
snapshot:
$ VBoxControl guestproperty wait /VirtualBox/HostInfo/VBoxVer
Similarly the
/VirtualBox/HostInfo/ResumeCounter can be
used to detect that a VM was resumed from the paused state or
saved state.