Docker/VM profiles or startup/shutdown scripts


Recommended Posts

Does this currently exist in any form or has someone created a script to do this?

 

Here is my scenario, there may other scenarios for this as well:

 

I want to start up my Windows gaming VM. To maximize performance I also want to stop some non-essential VMs and dockers or switch to different docker configs to free up cores and GPU (i.e. Emby/Plex/Jellyfin).

 

Right now this takes multiple steps. I would love to have a script (or even better a button on my dashboard) to carry out these tasks when I was to start my Gaming VM and when I want to stop it and return to my normal server configuration.

 

Thoughts? Suggestions?

Link to comment

There are many ways to accomplish this, none already written though, because each situation is a little different.

 

One way is to run commands directly from windows to control the server using putty. The plink program installed with putty can send commands like this...

 

c:\progra~1\putty\plink -pw <rootpw> root@<server IP> docker pause <container name>

 

You can use virsh start / shutdown <VM name> commands to control VM's, and docker start / stop / pause / unpause <container name> commands to control containers.

 

You can also do the same commands in a user script file, which could be triggered by plink or whatever. You can get fancy and do conditional statements that act when a vm shows up in the virsh list as running.

 

The world is your oyster.

 

Link to comment

Thanks for pointing me in the right direction with the ssh route. This will work quiet well and it appears that there is an Android app called "SSH Button" that would allow me to easily send commands from my phone without having to fire up a terminal which simplifies things even more.

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.