Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Reset and Retart a VM every hour #8

Open
AnthonyVO opened this issue Dec 31, 2018 · 1 comment
Open

How to Reset and Retart a VM every hour #8

AnthonyVO opened this issue Dec 31, 2018 · 1 comment

Comments

@AnthonyVO
Copy link

I realize my request is a bit odd but let me explain. I use a VM to host a demo environment that needs to reset every hour.

I would love to use something like this service because the Windows 10 Host often restarts unexpectedly due to OS updates.

Currently I have a batch file that is a scheduled task which runs hourly. The batch file;

  1. Shuts-down the VM
  2. Restores the Previous State
  3. Restarts the VM

Would it still be possible to do this with a VM that was managed by the VBoxVmService

Batch File below

@path=%PATH%;c:\Program Files\Oracle\VirtualBox
@set VMSERVER=Windows 2016 Demo Server
vboxmanage controlvm "%VMSERVER%" poweroff
@timeout /t 3
vboxmanage snapshot "%VMSERVER%" restorecurrent
@timeout /t 3
vboxmanage startvm "%VMSERVER%"

@onlyfang
Copy link
Owner

onlyfang commented Jan 1, 2019

VBoxVmService and vboxmanage might not be able to work together, but you are welcome to try. Also you might want to check the wiki page https://github.com/onlyfang/VBoxVmService/wiki/Runing-VirtualBox-GUI-together-with-VBoxVmService.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants