Physical On Button for VMs



8 posts in this topic Last Reply

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 post

 

 

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 post

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 post

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 post
  • 1 month later...
  • 2 weeks later...

I currently have the reset button on my case disconnected as it is largely useless (and dangerous with young fingers in the house) within UnRaid. It would be awesome if the reset button could somehow be retasked as a VM power button.

Link to post
  • 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 post

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.