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.

Switching Between VMs easily with elgato stream deck

Featured Replies

Hello Everyone!

 

🌌 Ever since I stumbled upon SpaceInvader's video about VM switching, I've been absolutely captivated! Imagine this: I have two VMs – Ubuntu and Windows – both rigged with GPU passthrough, seamlessly toggling back and forth. It's like having the best of both worlds at my fingertips!

 

🚀 But here's the catch: SpaceInvader's method uses "sleep," and honestly, I'm not a fan. What if Windows decides to take a snooze for an update? There goes my seamless switch, right? Ubuntu would just be hanging there, waiting. So, I put on my thinking cap and crafted a nifty bash script paired with a webhook. And guess what? You can link it with your Elgato Stream Deck! Now you can flip between Windows, Linux, macOS, or any OS of your choice with just a tap.

 

🔥 Here's the cherry on top: My script comes with a variable array. You get to tell it which VMs to juggle and which ones are off-limits for shutdown. No more accidental power-offs for your always-on VMs like HomeAssistant!

🎉 Let's dive into the setup. It's easy-peasy!


You can check out the Demo:

 

1. Grab the Goods: Head over to GitHub and download the necessary files. Remember to park them in `/mnt/user/<your chosen folder>`. Why, you ask? Because Unraid likes to tidy up after a restart, and we don't want our files to vanish!

2. Python Power-Up: Snag Python from the Unraid community app.

3. User Script Magic: Install the User Scripts plugin next.

4. Scripting Time: Create a new script in User Scripts and paste this baby in:

 

    pip install flask
    sleep 10
    python3 /mnt/user/webhooks/webhook.py


Pro Tip: Adjust the `sleep` duration as needed, but don't rush Python – it needs time to embrace Flask. And keep that `pip install flask` line; Unraid likes to forget Flask exists after a restart.

 

5. Background Buzz: Set this script to run in the background.

6. The Grand Finale:
    Craft a .bat file with this line:

 

curl -X POST -H "Content-Type: application/json" -d '{"vm_name":"<VM_NAME>"}' http://<SERVER_IP>:5006/webhook



Swap `<VM_NAME>` with your desired VM. This is where the script really struts its stuff, checking the array list to see which VMs can take a break before firing up your chosen one.

And that's all, folks! You're now a maestro of VM switching, orchestrating a symphony of seamless transitions. Happy switching! 🌟

(Note: Don't forget to replace placeholders like `<VM_NAME>` and `<SERVER_IP>` with your actual VM names and server IP address.)

Edited by GeekFreak

  • 4 months later...

@GeekFreak, just for clarity is the stream deck itself connected to the unraid server and passed through to the vm and on switch would be passed through to the vm switching to?

  • Author

Yes, for the initial setup, you will have to boot the first VM and pass through the Stream Deck. Then, turn off that VM and open the VM you want to switch to, pass the Stream Deck through, and that's it. However, make sure you don't uncheck the Stream Deck from either VM.

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.