fniephaus / fniephaus/alfred-vmcontrol

Suspend/Unsuspend All VMs

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
45
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hello,

Thanks for the workflow, added the following to my version of it, could be useful to others. Original script from Ben Harper.
![2018-03-29_14-39-59](https://user-images.githubusercontent.com/11188548/38068905-4fb72f52-335f-11e8-9514-9f6bca78435a.png)

Suspend script:
`/usr/local/bin/prlctl list -a --no-header --output name | while read line; do
VMName=$line
VMState=$(/usr/local/bin/prlctl list --no-header -a -o status "$VMName");

if [[ $VMState == *running* ]]
then
/usr/local/bin/prlctl pause "$VMName"
echo
fi
done`

Unsuspend script:
`/usr/local/bin/prlctl list -a --no-header --output name | while read line ; do # Pipe Parallels List of VM's to loop
VMName=$line # Get Name of VM
VMState=$(/usr/local/bin/prlctl list --no-header -a -o status "$VMName"); #Better Way - no piping text
echo
echo Found - $VMName, State = $VMState
echo

if [[ $VMState == *paused* ]] # If VM Paused
then
echo $VMName was running, pausing it
/usr/local/bin/prlctl resume "$VMName"
echo $VMName, State = $(/usr/local/bin/prlctl list --no-header -a -o status "$VMName");
echo
fi
done`

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue provides shell scripts using Parallels prlctl to inspect all virtual machines and pause or resume them. Start by reading the existing Alfred VM-control workflow and its command entry points, then determine where these actions belong. Done means the workflow can suspend running VMs and resume paused VMs, with both states handled as shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.