Jump to content

User script to shutdown VM


Recommended Posts

Hi,

 

I have a VM that I want to boot, and then shutdown on it's own. I got the boot part working, and got it to shutdown with the Windows task scheduler, but it doesn't always shutdown. So I want to shutdown the VM via userscripts. 

 

Here is how I start the VM:

image.png.2e18249e6b8d17219c64ba23ec7fd764.png

 

Easy enough. 

I found online that I could change it to this to get it to shutdown:

image.png.61cea05fe4f1d873d4e5cb3b641c545c.png

 

Now for the problem. The VM does not always shutdown on the first try. Sometimes I need to manually run the shutdown command again. 

I would like to have the shutdown command run every 5 minutes until it notices that the VM is shutdown. Does anyone know how to do that?

 

I am not familiar with these commands, so I don't know how to make it do that. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...