Skip to content

Start your Hyper-V VM with a remotely sent GET request to your host-pc.

License

Notifications You must be signed in to change notification settings

AlexInABox/wol-hyper-v

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues GNU 3.0 License


Logo

wol-hyper-v

wake on host
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

wol-hyper-v is a node.js application starting a hyper-v VM on the host machine when receiving a http-get request. This request must include at least one key named 'action', with the value of either 'start' or 'stop'.
Optionally the GET request can also include a key named 'vmname' with the value corrsiponding to the actual name of the Hyper-V VM on the host machine.

Example:

On the host machine there is a Hyper-V VM setup named 'testvm1'.

Therefore the GET request to start this VM should contain the following key's:

'action' = 'start'
'vmname' = 'testvm1'

(back to top)

Built With

  • Express

(back to top)

Getting Started

Funny project. Easy to use!

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

(your output should look something like this if and only if you have those tools installed. if not, consider installing them! duh)

Installation

  1. Clone the repo

    git clone https://github.com/alexinabox/wol-hyper-v
  2. Install NPM packages

    npm install
  3. Edit the config.js file! (dont copy the following as a whole since comments dont work in json syntax)

    {
        "vmName": "testvm",     <-- the name of your vm in hyper-v
        "hostName": "testhost", <-- the name of your host machine
        "port": 5986,           <-- your server will run on this port
        "verbose": true         <-- set this to true incase of any errors
    }
  4. open the desired port on your firewall (optional)

  5. start the server (or turn this application into a windows backround service!):

    node index.js
  6. profit

(back to top)

Daemonize

The daemonization of this application ensures that it always runs in the background and also starts itself on boot!

Create the windows backround service:

cd misc/
node createWinSvc.js

Remove the windows backround service:

cd misc/
node removeWinSvc.js

(back to top)

Usage

I suggest using this application in combination with my iPhone shortcut.
This shortcut allows you to start and stop your VM with a single tap on your iPhone.

Link to the shortcut:
https://www.icloud.com/shortcuts/440b9c5e3fcc47239df3b2268937008e

For more examples, please refer to the non existent Documentation

(back to top)

Roadmap

  • lorem ipsum

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Bla Bla Bla learning bla bla bla open-source bla bla bla greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request (write something neat so i know whats goin on)

(back to top)

License

Distributed under the GNU General Public License v3.0 License. See LICENSE.txt for more information.

(back to top)

Contact

AlexInABox - @wilder_Alex__ - main@alexinabox.de

Project Link: https://github.com/alexinabox/wol-hyper-v

Website: https://alexinabox.de

(back to top)

Acknowledgments

(back to top)

Releases

No releases published

Packages

No packages published