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.

[GUIDE] Simple script to start VMs (MacOS App)

Featured Replies

Hi there, 

 

one thing that bothers me, is the way to start my virtual machine. 

I only have a gaming vm that's not running 24/7 and only need to be fired up temporary. 

 

Current way is to start your browser, open the URL, log in and start your vm. 

Yes - this is a solution - but not smart :)

 

So I build this simple script to start my vm with just a simple click :)

I don't use windows or linux but I be pretty sure that this can be easy adopted

 

For users of MacOs its pretty simple to realize due to the script editor.

Requirement: You need to enable ssh-key authentication as described here

 

Start the script editor and copy the following into the editor

try
	do shell script "/usr/bin/ssh [email protected] virsh start Windows_10q35_5_own_vBIOS"
	if result contains "Domain Windows_10q35_5_own_vBIOS started" then
		display notification "VM started successfully" with title "Gaming VM"
	else
		display notification "VM couldn't started" with title "Gaming VM"
	end if
on error
	display notification "Script Error" with title "Gaming VM"
end try

 

Only a few things must to be changed based on your preferences

- the IP-Adress of your unraid server - in my script the 192.168.2.1

- the name of your virtual machine - in my script the Windows_10q35_5_own_vBIOS

 

Other things can be changed due to your personal needs.

That concerns all parameters in " " regarding the display notification.

 

Save the script as an app and change the app icon to your wishes :)

 

After that you can enable MacOS notifications to get the most out of the script. (see screenshot)

Ultimate lazy? Maybe you already own "QuickLinks" or other similar apps. With this you can fire up your vm with a simple shortcut ;-)

 

P.S Most common errors are

- Domain is already active --> That means, that the virtual machine is already started

- Domain can't be found --> That indicates, that you got a typo where you set the name of your vm

 

I'm not a developer - all things above based on my research with google - but I'll check if I can add an error specific notification in the future.
In the current script you're only able to see the specific error within the script editor app. 

 

I hope some of you found that little helper useful. Have a nice weekend. 

example_notification.png

Edited by Maddeen

Archived

This topic is now archived and is closed to further replies.

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.