crypticlabs
May 16th, 2011, 04:45 PM
Hello,
After booting/rebooting Ubuntu, I manually run an alias that starts a VirtualBox Windows virtual machine in headless mode. I then interact with this VM using RDP.
Often, I will poweroff or reboot Ubuntu and forget to properly shutdown the VM. I'm looking for a way to either:
a) hold of or prevent a shutdown/reboot and warn me that the VM is still running (perhaps by checking the process list for a pattern that matches this VM) so that I can properly shutdown the VM. I believe this occurs if there is an unsaved document of 'gedit' open.
b) run a shutdown script that will properly shutdown or pause the running VM.
I should be able to script both examples but I'm not sure where/when to place/run the scripts.
Thanks!
After booting/rebooting Ubuntu, I manually run an alias that starts a VirtualBox Windows virtual machine in headless mode. I then interact with this VM using RDP.
Often, I will poweroff or reboot Ubuntu and forget to properly shutdown the VM. I'm looking for a way to either:
a) hold of or prevent a shutdown/reboot and warn me that the VM is still running (perhaps by checking the process list for a pattern that matches this VM) so that I can properly shutdown the VM. I believe this occurs if there is an unsaved document of 'gedit' open.
b) run a shutdown script that will properly shutdown or pause the running VM.
I should be able to script both examples but I'm not sure where/when to place/run the scripts.
Thanks!