Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

User script to shutdown VM

Featured Replies

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. 

Not a direct answer, but Windows is really bad at shutdown on command because of mandatory updates. Hibernate is a much more reliable solution, make sure you have the VM client drivers installed.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.