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.

Remotely wake VM?

Featured Replies

I only need my VM to be accessible 2 days a week so is there a simple way I could somehow trigger a power on of the VM?

 

I have nextcloud so I thought is there a way using a script that I could watch for the presence of a file or a change of a file to trigger?

Solved by Squid

  • Solution

Use this as a starting point

 

 

You'd of course have to modify the scripts with the appropriate commands to turn off the VM

  • Author

In case anyone ever asks, I got this working quite simply by doing the following:

 

#!/bin/bash

f=/path/to/file/on/nextcloud/instance

inotifywait -m -e modify "$f" --format "%e" | while read -r event; do
    if [ "$event" == "MODIFY" ]; then

        cat $f
        contents=$( cat $f )
        if [ $contents == "on" ]; then

                echo "Starting VM"
                virsh start "VM NAMe"

        elif [ $contents == "off" ]; then

                echo "Stopping VM"
                virsh shutdown "VM NAMe"

        fi

    fi
done

 

So basically create a text file on your nextcloud instance and then find the path to it via the terminal. If you then edit the file via the nextcloud web interface or mobile app and set the contents to "on" or "off" it will power the VM on or off accordingly.

Edited by allanp81

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.