Physical On Button for VMs



Recommended Posts

I would like to have a VM assigned to my power on button on my unRAID box, or have a USB mini keyboard attached that at a press of a button would start the assigned VM.

 

On pressing the power button to my machine a VM with the button assigned would start, the power button for the duration of the VMs life will be assigned to this VM.

 

or an externally accessible API, that I could program some commands to from another device, iPhone,Webpage etc. with easier control than having to fiddly page through the unRAID web interface.

Link to comment

 

 

I would like to have a VM assigned to my power on button on my unRAID box, or have a USB mini keyboard attached that at a press of a button would start the assigned VM.

 

On pressing the power button to my machine a VM with the button assigned would start, the power button for the duration of the VMs life will be assigned to this VM.

 

or an externally accessible API, that I could program some commands to from another device, iPhone,Webpage etc. with easier control than having to fiddly page through the unRAID web interface.

 

There's a Libvirt WOL plugin to 'wake' VM's. You just send a wake on lan packet on your network with the mac of the VM and it will start the VM. The VM has to be stopped or hibernated. It can't wake a sleeping or paused VM. So you can use a WOL app to wake a VM.

Link to comment

So would a USB keyboard assigned to a VM pass keystrokes to unRAID if the VM is stopped?

 

This would be ideal as the VM keyboard could be used to start it up.

 

I LOVED the keyboard power button on old Macs but Apple stopped implementing due to safety concerns, I believe.

Link to comment

So would a USB keyboard assigned to a VM pass keystrokes to unRAID if the VM is stopped?

 

This would be ideal as the VM keyboard could be used to start it up.

 

I LOVED the keyboard power button on old Macs but Apple stopped implementing due to safety concerns, I believe.

I'm not sure if there's a hotkey program for slackware without a desktop. There's usually options for linux with desktops. I'm also not sure if you'd have to stop and start the hotkey app as you start and stop the VM.

Link to comment
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...

I have made a feature request for an unraid API.unRAID API.

It is not a perfect fix for this but could provide a work around solution by:

  • using an arduino physical button executing an API command.
  • using you home automation system to execute the command
  • simple webpage to control vm

 

I just thought of another option while writing this post that may work without the API is:

Button --> Arduino --> USB/onboard serial --> unraid script to watch and execute the vm control command.

 

A very quick search has brought up the following post that might help. Link.

They have used Perl in this example which is part of the Nerd Tools.

 

This would be a relatively simple arduino project and may do it myself when I build my next unraid/htpc machine.

 

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.