Compare commits

..

No commits in common. "master" and "4.9.5" have entirely different histories.

38 changed files with 855 additions and 1153 deletions

2
.github/FUNDING.yml vendored
View File

@ -1,3 +1,3 @@
# These are supported funding model platforms
github: [flexiondotorg, philclifford, lj3954]
github: flexiondotorg

View File

@ -1,51 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: 'bug: description of the bug you encountered'
labels: ''
assignees: ''
---
**I confirm this bug has not already been reported**
- [ ] I have searched the issues and this bug has not been reported previously
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behaviour:
1. Run `quickemu` with arguments '...'
2. See error
**Expected behaviour**
A clear and concise description of what you expected to happen.
**Quickemu output**
Run `quickemu` or `quickemu` and include the output of the failure below:
<details>
<summary>Quickemu output</summary>
```text
quickemu/quickget output here
```
</details>
**System information**
Run `quickreport` and include the output here; if you can't run `quickreport`,
please provide the output of the following:
<details>
<summary>Quickreport output</summary>
```text
quickreport output here
```
</details>
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@ -1,23 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'feat: describe the feature you are requesting'
labels: ''
assignees: ''
---
**I confirm this feature has not been previously requested**
- [ ] I have searched the issues and this feature has not previously been requested
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

58
.github/issue_template.md vendored Normal file
View File

@ -0,0 +1,58 @@
<!--
Please fill out the following template to the best of your ability.
If you're not sure about something, feel free to ask for help in Discord or the Discussions.
The more information you provide, the easier it will be to help you.
Issues that completely ignore this template will be closed.
-->
# Expected behavior
Describe your expected behavior.
## Actual behavior
Describe the actual behavior.
# Steps to reproduce the behavior
Outline the steps to reproduce the issue you've encountered.
# Additional context
## Quickemu output
Run `quickemu` or `quickemu` and include the output of the failure below:
<details>
<summary>Quickemu output</summary>
```text
quickemu/quickget output here
```
</details>
## System Information
**Run `quickreport` and include the output here**; if you can't run `quickreport`,
please provide the output of the following:
```bash
clear && \
echo -e "Ver:\t$(quickemu --version)" && \
echo -e "Distro:\t$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)" && \
echo -e "Kernel:\t$(uname -s -r -m)" && \
echo -e "Memory:\t$(free --si -h | awk '/Mem:/{print $2}')" && \
lspci | grep -i vga | cut -d':' -f3 && echo && \
curl --version && echo && \
qemu-system-"$(uname -m)" -version | head -1 && \
qemu-system-"$(uname -m)" -cpu help && echo && \
lscpu | tee quickreport.txt
```
<details>
<summary>Quickreport output</summary>
```text
quickreport output here
```
</details>

View File

@ -1,26 +0,0 @@
# Description
Please include a summary of the changes along with any relevant motivation and context.
<!-- Close any related issues. Delete if not relevant -->
- Closes #
- Fixes #
- Resolves #
## Type of change
<!-- Delete any that are not relevant -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Packaging (updates the packaging)
- [ ] Documentation (updates the documentation)
# Checklist:
- [ ] I have performed a self-review of my code
- [ ] I have tested my code in common scenarios and confirmed there are no regressions
- [ ] I have added comments to my code, particularly in hard-to-understand sections
- [ ] I have made corresponding changes to the documentation (*remove if no documentation changes were required*)

View File

@ -1,21 +0,0 @@
name: Flake ❄️ Checker ✅
on:
push:
branches:
- master
schedule:
- cron: '42 0 * * 6'
workflow_dispatch:
jobs:
flake-checker:
name: Flake Checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v19
- uses: DeterminateSystems/magic-nix-cache-action@v9
- uses: DeterminateSystems/flake-checker-action@v12

View File

@ -1,20 +0,0 @@
name: Flake ❄️ Lock 🔒️ Updater ✨
on:
schedule:
- cron: '37 13 14,28 * *'
workflow_dispatch:
jobs:
lock-updater:
name: Flake Lock Updater
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v19
- uses: DeterminateSystems/magic-nix-cache-action@v9
- uses: DeterminateSystems/update-flake-lock@v27
with:
pr-title: "chore: update flake.lock"

View File

@ -15,7 +15,7 @@ jobs:
name: Validate pull request title
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v6
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View File

@ -10,7 +10,7 @@ jobs:
name: Shellcheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:

View File

@ -16,7 +16,7 @@ jobs:
name: "Check versions ⚖️"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Compare App and Git versions 🟰"
@ -37,7 +37,7 @@ jobs:
name: "Draft Release 📥️"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Create release ${{ github.ref }} as a draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -49,7 +49,7 @@ jobs:
name: "Build Release 👨‍🔧"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Build and Upload .deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -67,7 +67,7 @@ jobs:
name: "Publish Release 📤️"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Publish release ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -85,7 +85,7 @@ jobs:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v5"
- uses: "actions/checkout@v4"
with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- uses: "DeterminateSystems/nix-installer-action@main"
@ -102,7 +102,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
uses: actions/checkout@v5
uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Import gpg key 🔑"

View File

@ -1,82 +0,0 @@
name: Test build quickemu 🚧
on:
pull_request:
branches:
- master
paths:
- quickemu
- quickget
- debian/**
- flake.nix
- package.nix
push:
branches:
- master
paths:
- quickemu
- quickget
- debian/**
- flake.nix
- package.nix
workflow_dispatch:
# TODO: arm64 runner
# https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/
jobs:
test-deb-build:
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
uses: actions/checkout@v5
- name: "Build & Test .deb 🍥"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get -y update
sudo apt-get -y install debhelper devscripts
REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
rm debian/changelog
dch --package quickemu --newversion="${REL_VER}-1" --distribution=unstable "New upstream release." --create
dpkg-buildpackage --build=binary --no-check-builddeps --compression=gzip
sudo apt-get -y install ../quickemu_${REL_VER}-1_all.deb
quickemu --help
quickget --help
test-nix-build:
runs-on: ubuntu-22.04
permissions:
id-token: "write"
contents: "read"
steps:
- name: "Checkout 🥡"
uses: "actions/checkout@v5"
- name: "Install Nix ❄️"
uses: "DeterminateSystems/nix-installer-action@v19"
- name: "Enable Magic Nix Cache 🪄"
uses: "DeterminateSystems/magic-nix-cache-action@v9"
- name: "Build & Test .nix ❄️"
run: |
nix build .#quickemu
tree ./result
./result/bin/quickemu --help
./result/bin/quickget --help
./result/bin/quickreport
# Text a VM if the Nix Installer successfully enabled KVM
if [ $DETERMINATE_NIX_KVM -eq 1 ]; then
./result/bin/quickget alpine v3.20
./result/bin/quickemu --vm alpine-v3.20.conf --display none
sleep 5
if pgrep -F ./alpine-v3.20/alpine-v3.20.pid; then
echo "Test VM is running"
else
echo "Test VM is not running"
exit 1
fi
# Test a few more quickemu commands to clean up
./result/bin/quickemu --vm alpine-v3.20.conf --kill
./result/bin/quickemu --vm alpine-v3.20.conf --delete-disk
./result/bin/quickemu --vm alpine-v3.20.conf --delete-vm
fi

View File

@ -3,22 +3,22 @@ name: "Test quickget 🧪"
on:
workflow_dispatch:
push:
branches:
- master
paths:
- quickget
branches: '**'
paths: [ quickget ]
pull_request:
branches:
- '**'
paths:
- quickget
branches: '**'
paths: [ quickget ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quickget-tests:
name: "Run quickget tests 👟"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: "Install dependencies 📦️"
run: |
sudo apt-get -y update

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "build-docs"]
path = build-docs
url = https://github.com/philclifford/quickemu-docs.git
url = git@github.com:philclifford/quickemu-docs.git

View File

@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behaviour that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behaviour include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behaviour and will take appropriate and fair corrective action in
response to any behaviour that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported to the community leaders responsible for enforcement at
#quickemu channel on Discord.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behaviour deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behaviour was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behaviour. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behaviour.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behaviour, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@ -1,11 +0,0 @@
# Contributing
We welcome contributions to Quickemu.
- Help other Quickemu users by answering questions in the [Quickemu Discussions](https://github.com/quickemu-project/quickemu/discussions) 🛟
- Improve the documentation in [this README](https://github.com/quickemu-project/quickemu/edit/master/README.md) and the [Quickemu Wiki](https://github.com/quickemu-project/quickemu/wiki) 📖
- File bug reports and feature requests in the [Quickemu Issues](https://github.com/quickemu-project/quickemu/issues) 📁
- Submit [Quickemu Pull requests](https://github.com/quickemu-project/quickemu/pulls) to fix bugs 🐞 or add new features ✨
- Follow our [guide to adding a new OS to quickget](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features#adding-a-new-os-to-quickget)
- Commit messages must [conform to the Conventional Commits specification](https://www.conventionalcommits.org/).
- [Sponsor the project](https://github.com/sponsors/flexiondotorg) 💖

View File

@ -1,47 +0,0 @@
class Quickemu < Formula
desc "Quickly create and run optimised Windows, macOS and Linux virtual machines"
homepage "https://github.com/quickemu-project/quickemu"
livecheck do
url :stable
end
stable do
latest_release = JSON.parse(Utils.safe_popen_read("curl", "-s", "https://api.github.com/repos/quickemu-project/quickemu/releases/latest"))
version latest_release["tag_name"]
url "https://api.github.com/repos/quickemu-project/quickemu/tarball/#{latest_release["tag_name"]}"
end
head "https://github.com/quickemu-project/quickemu.git"
license "MIT"
depends_on "bash"
depends_on "cdrtools"
depends_on "coreutils"
depends_on "jq"
depends_on "python3"
depends_on "qemu"
depends_on "samba"
depends_on "socat"
depends_on "swtpm"
depends_on "usbutils"
depends_on "zsync"
def install
bin.install "quickemu"
bin.install "quickget"
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test quickemu`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system bin/"program", "do", "something"`.
system "false"
end
end

View File

@ -40,7 +40,7 @@ required to run the virtual machines.
- Host support for **Linux and macOS**
- **macOS** Sonoma, Ventura, Monterey, Big Sur, Catalina & Mojave
- **Windows** 10 and 11 including TPM 2.0
- **Windows Server** 2022 2019 2016
- **Windows Server** 2022 2019 2016 2012-r2
- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu
flavours](https://ubuntu.com/download/flavours)**
- **Nearly 1000 operating system editions are supported!**
@ -63,7 +63,7 @@ required to run the virtual machines.
## As featured on [Linux Matters](https://linuxmatters.sh) podcast!
The presenters of Linux Matters 🐧🎙️ are the creators of each of the principal Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30). <!-- and in [Episode 32 - Quick, quicker, quickest](https://linuxmatters.sh/32) [Martin](https://github.com/flexiondotorg) unveils macOS host support for [**Quickemu**](https://github.com/quickemu-project/quickemu), [Mark](https://github.com/marxjohnson) explains the origins of the [**Quickgui**](https://github.com/quickemu-project/quickgui) desktop app and upcoming improvements, and [Alan](https://github.com/popey) debuts [**Quicktest**](https://github.com/quickemu-project/quicktest); a framework for automatically testing operating systems via Quickemu -->
The presenters of Linux Matters 🐧🎙️ are the creators of each of the principle Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30). <!-- and in [Episode 32 - Quick, quicker, quickest](https://linuxmatters.sh/32) [Martin](https://github.com/flexiondotorg) unveils macOS host support for [**Quickemu**](https://github.com/quickemu-project/quickemu), [Mark](https://github.com/marxjohnson) explains the origins of the [**Quickgui**](https://github.com/quickemu-project/quickgui) desktop app and upcoming improvements, and [Alan](https://github.com/popey) debuts [**Quicktest**](https://github.com/quickemu-project/quicktest); a framework for automatically testing operating systems via Quickemu -->
<div align="center">
<a href="https://linuxmatters.sh" target="_blank"><img src="https://github.com/wimpysworld/nix-config/raw/main/.github/screenshots/linuxmatters.png" alt="Linux Matters Podcast"/></a>
@ -109,3 +109,15 @@ The wiki describes how to get up and running with Quickemu and also covers more
- [**Advanced quickget features**](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features) 🤓
- [**Alternative frontends**](https://github.com/quickemu-project/quickemu/wiki/07-Alternative-frontends) 🧑‍💻
- [**References**](https://github.com/quickemu-project/quickemu/wiki/08-References) 📚️
# Contributing
We welcome contributions to Quickemu.
- Help other Quickemu users by answering questions in the [Quickemu Discussions](https://github.com/quickemu-project/quickemu/discussions) 🛟
- Improve the documentation in [this README](https://github.com/quickemu-project/quickemu/edit/master/README.md) and the [Quickemu Wiki](https://github.com/quickemu-project/quickemu/wiki) 📖
- File bug reports and feature requests in the [Quickemu Issues](https://github.com/quickemu-project/quickemu/issues) 📁
- Submit [Quickemu Pull requests](https://github.com/quickemu-project/quickemu/pulls) to fix bugs 🐞 or add new features ✨
- Follow our [guide to adding a new OS to quickget](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features#adding-a-new-os-to-quickget)
- Commit messages must [conform to the Conventional Commits specification](https://www.conventionalcommits.org/).
- [Sponsor the project](https://github.com/sponsors/flexiondotorg) 💖

View File

@ -1,18 +0,0 @@
# Security Policy
## Supported Versions
Here are the versions of Quickemu currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 4.9.x | :white_check_mark: |
| < 4.8 | :x: |
## Reporting a Vulnerability
If you discover a vulnerability in Quickemu then [file an issue](https://github.com/quickemu-project/quickemu/issues/new) and click *Report a vulnerability*.
- Quickemu is a spare-time hobby project.
- We do not have SLAs for responding to security issues.
- It is a best-efforts basis.

201
debian/changelog vendored
View File

@ -1,5 +1,204 @@
quickemu (4.9.6-1) unstable; urgency=medium
quickemu (4.9.1-1) unstable; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 10 Nov 2023 14:49:08 +0000
quickemu (4.8-1~mantic1.0) mantic; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.8
-- Martin Wimpress <code@wimpress.io> Wed, 14 Jun 2023 12:40:56 +0100
quickemu (4.7-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.7
-- Martin Wimpress <code@wimpress.io> Wed, 26 Apr 2023 12:00:35 +0100
quickemu (4.6-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.6
-- Martin Wimpress <code@wimpress.io> Sat, 04 Feb 2023 00:32:47 +0000
quickemu (4.5-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.5
-- Martin Wimpress <code@wimpress.io> Sun, 11 Dec 2022 20:54:52 +0000
quickemu (4.4-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.4
-- Martin Wimpress <code@wimpress.io> Fri, 21 Oct 2022 08:52:12 +0100
quickemu (4.3-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.3
-- Martin Wimpress <code@wimpress.io> Thu, 22 Sep 2022 09:22:00 +0100
quickemu (4.2-1~focal1.0) focal; urgency=medium
* New upstream release.
+ https://github.com/quickemu-project/quickemu/releases/tag/4.2
-- Martin Wimpress <code@wimpress.io> Wed, 21 Sep 2022 23:34:24 +0100
quickemu (4.1-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Sat, 20 Aug 2022 00:03:33 +0100
quickemu (4.0-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Mon, 01 Aug 2022 11:24:48 +0100
quickemu (3.16-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 29 Jul 2022 11:50:32 +0100
quickemu (3.15-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 22 Apr 2022 09:55:13 +0100
quickemu (3.14-1~focal1.0) focal; urgency=medium
* New Upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 11 Mar 2022 16:20:05 +0000
quickemu (3.13-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Thu, 24 Feb 2022 23:00:05 +0000
quickemu (3.12-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Tue, 22 Feb 2022 12:13:16 +0000
quickemu (3.11-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <martin.wimpress@ubuntu.com> Wed, 08 Dec 2021 11:01:04 +0000
quickemu (2.3.4-1~jammy1.0) jammy; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Mon, 06 Dec 2021 11:53:50 +0000
quickemu (2.3.3-1~jammy1.0) jammy; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 03 Dec 2021 11:38:10 +0000
quickemu (2.3.2-1~jammy1.0) jammy; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Sun, 14 Nov 2021 10:25:06 +0000
quickemu (2.3.1-1~jammy1.0) jammy; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Mon, 08 Nov 2021 00:54:38 +0000
quickemu (2.3.0-1~focal1.0) focal; urgency=medium
* New upstream release
-- Martin Wimpress <code@wimpress.io> Fri, 29 Oct 2021 10:03:58 +0100
quickemu (2.2.9-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Thu, 28 Oct 2021 22:46:37 +0100
quickemu (2.2.8-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Thu, 28 Oct 2021 16:13:20 +0100
quickemu (2.2.7-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Wed, 27 Oct 2021 12:57:59 +0100
quickemu (2.2.6-1~jammy1.0) jammy; urgency=medium
* New upstream release
-- Martin Wimpress <code@wimpress.io> Thu, 21 Oct 2021 10:57:35 +0100
quickemu (2.2.5-1~jammy1.0) jammy; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Sat, 16 Oct 2021 11:35:41 +0100
quickemu (2.2.4-1~impish1.0) impish; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 15 Oct 2021 12:50:05 +0100
quickemu (2.2.3-1~impish1.0) impish; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 08 Oct 2021 15:06:50 +0100
quickemu (2.2.2-1~impish1.0) impish; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Fri, 08 Oct 2021 02:39:00 +0100
quickemu (2.2.1-1~impish1.0) impish; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Thu, 07 Oct 2021 16:23:33 +0100
quickemu (2.2.0-1~impish1.0) impish; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Wed, 06 Oct 2021 11:08:33 +0100
quickemu (2.1.0-1~focal1.0) focal; urgency=medium
* New upstream release.
-- Martin Wimpress <code@wimpress.io> Tue, 05 Oct 2021 17:12:48 +0100
quickemu (1.0.0-1~focal1.2) focal; urgency=medium
* Initial release.
-- Martin Wimpress <code@wimpress.io> Mon, 06 Sep 2021 23:11:44 +0100

1
debian/control vendored
View File

@ -22,7 +22,6 @@ Depends:
procps,
python3-minimal,
qemu-system (>= 6.0),
base-files (<< 13~) | qemu-system-modules-spice,
socat,
spice-client-gtk,
swtpm,

4
debian/copyright vendored
View File

@ -4,7 +4,7 @@ Upstream-Contact: Martin Wimpress <code@wimpress.io>
Source: https://github.com/quickemu-project/quickemu
Files: *
Copyright: 2020-2024 Martin Wimpress <code@wimpress.io>
Copyright: 2020-2021 Martin Wimpress <code@wimpress.io>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -26,7 +26,7 @@ License: MIT
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2021 - 2024 Martin Wimpress <code@wimpress.io>
Copyright: 2021 Martin Wimpress <code@wimpress.io>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

1
debian/install vendored
View File

@ -2,3 +2,4 @@ chunkcheck usr/bin
quickemu usr/bin
quickget usr/bin
quickreport usr/bin
windowskey usr/bin

5
debian/watch vendored Normal file
View File

@ -0,0 +1,5 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%quickemu-$1.tar.gz%" \
https://github.com/wimpysworld/quickemu/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz

View File

@ -1,50 +1,64 @@
{ lib,
{
lib,
mkShell,
pkgs,
stdenv,
cdrtools,
curl,
gawk,
git,
glxinfo,
gnugrep,
gnused,
jq,
ncurses,
nixpkgs-fmt,
pciutils,
procps,
python3,
qemu,
socat,
spice-gtk,
swtpm,
unzip,
usbutils,
util-linux,
xdg-user-dirs,
xrandr,
zsync,
OVMF,
OVMFFull,
}:
mkShell {
packages = with pkgs; ([
strictDeps = true;
nativeBuildInputs = [
cdrtools
curl
gawk
git
gnugrep
gnused
jq
pciutils
ncurses
nixpkgs-fmt
procps
pciutils
python3
qemu_full
samba
qemu
socat
spice-gtk
swtpm
unzip
util-linux
xorg.xrandr
xrandr
] ++ lib.optionals stdenv.isLinux [
glxinfo
swtpm
usbutils
xdg-user-dirs
zsync
OVMF
OVMFFull
] ++ lib.optionals stdenv.isLinux [
glxinfo
usbutils
xdg-user-dirs
]);
inputsFrom = with pkgs; [
git
];
shellHook = ''
echo "**********************************************************************"
echo "* 'direnv reload' to update '.direnv/bin/quickemu' for testing *"
echo "**********************************************************************"
sed \
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMFFull.firmware}","${pkgs.OVMFFull.variables}" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMF.firmware}","${pkgs.OVMF.variables}" |' \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's,\$(command -v smbd),${pkgs.samba}/bin/smbd,' \
quickemu > $PWD/.direnv/bin/quickemu
chmod +x $PWD/.direnv/bin/quickemu
'';
buildInputs = [];
}

View File

@ -9,18 +9,16 @@ datadir := $(datarootdir)
mandir := $(datarootdir)/man
bindir := $(PREFIX)/bin
all: quickget.1 quickemu.1 quickemu_conf.5
all: quickget.1 quickemu.1 quickemu_conf.1
clean:
rm *.1 *.5
rm *.1
install_docs: all
install -d $(DESTDIR)$(mandir)/man1
install -d $(DESTDIR)$(mandir)/man5
install -m 644 quickget.1 $(DESTDIR)$(mandir)/man1
install -m 644 quickemu.1 $(DESTDIR)$(mandir)/man1
install -m 644 quickemu_conf.5 $(DESTDIR)$(mandir)/man5
rm -f $(DESTDIR)$(mandir)/man1/quickemu_conf.1
install -m 644 quickemu_conf.1 $(DESTDIR)$(mandir)/man1
# install -m 644 quickgui.1 $(DESTDIR)$(mandir)/man1
@ -36,7 +34,7 @@ install: install_bins install_docs
uninstall::
rm -f $(DESTDIR)$(mandir)/man1/quickget.1
rm -f $(DESTDIR)$(mandir)/man1/quickemu.1
rm -f $(DESTDIR)$(mandir)/man5/quickemu_conf.5
rm -f $(DESTDIR)$(mandir)/man1/quickemu_conf.1
rm -f $(DESTDIR)$(bindir)/quickget
rm -f $(DESTDIR)$(bindir)/quickemu
rm -f $(DESTDIR)$(bindir)/quickreport

View File

@ -1,7 +1,11 @@
PANDOC ?= pandoc
PANDOC_OPTIONS = -f gfm+definition_lists
.SUFFIXES: .1.md .1 .5.md .5
MANSECTION ?= 1
.1.md.1 .5.md.5:
$(PANDOC) --standalone $(PANDOC_OPTIONS) --to man -o $@ $<
PANDOC_OPTIONS=-f gfm+definition_lists --standalone
MANPAGE.md = $(PANDOC) --standalone $(PANDOC_OPTIONS) --to man
%.$(MANSECTION): %.$(MANSECTION).md
$(MANPAGE.md) $< -o $@

View File

@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.6.1
.\" Automatically generated by Pandoc 3.2
.\"
.TH "QUICKEMU" "1" "December 30, 2024" "quickemu" "Quickemu User Manual"
.TH "QUICKEMU" "1" "June 24, 2024" "quickemu" "Quickemu User Manual"
.SH NAME
quickemu \- A quick VM builder and manager
.SH SYNOPSIS
@ -190,7 +190,7 @@ Host support for \f[B]Linux and macOS\f[R]
.IP \[bu] 2
\f[B]Windows\f[R] 10 and 11 including TPM 2.0
.IP \[bu] 2
\f[B]Windows Server\f[R] 2022 2019 2016
\f[B]Windows Server\f[R] 2022 2019 2016 2012\-r2
.IP \[bu] 2
\c
.UR https://ubuntu.com/desktop
@ -334,7 +334,6 @@ usbutils
.UR https://github.com/karelzak/util-linux
util\-linux
.UE \c
; including \f[CR]uuidgen\f[R]
.IP \[bu] 2
\c
.UR https://www.gnu.org/software/sed/
@ -402,7 +401,7 @@ sudo apt\-get install bash coreutils curl genisoimage grep jq mesa\-utils ovmf p
.SS Install requirements on Fedora hosts
.IP
.EX
sudo dnf install bash coreutils curl edk2\-tools genisoimage grep jq mesa\-demos pciutils procps python3 qemu sed socat spice\-gtk\-tools swtpm unzip usbutils util\-linux uuidgen\-runtime xdg\-user\-dirs xrandr zsync
sudo dnf install bash coreutils curl edk2\-tools genisoimage grep jq mesa\-demos pciutils procps python3 qemu sed socat spice\-gtk\-tools swtpm unzip usbutils util\-linux xdg\-user\-dirs xrandr zsync
.EE
.SS Install requirements on Gentoo
Please note that you may have to use \f[CR]sys\-firmware/edk2\-ovmf\f[R]
@ -489,6 +488,21 @@ Philipp Kiemle
Quickemu icons
.UE \c
\f[R] 🎨
.SS qqX
There is also a multi option desktop integrated text interface, the
\f[B]quickemu quickget X terminal project\f[R], or \f[B]qqX\f[R], with
lots of unique tools and utilities to help you make light work of
installations, snapshots and disk management
.IP \[bu] 2
\f[B]\c
.UR https://github.com/TuxVinyards/qqX
qqX
.UE \c
\f[R] is independently curated by \c
.UR https://github.com/TuxVinyards
Alex Genovese
.UE \c
\ (see the github pages)
.SS Creating Linux guests 🐧
.SS Ubuntu
\f[CR]quickget\f[R] will automatically download an Ubuntu release and
@ -568,12 +582,11 @@ You can also use \f[CR]quickget\f[R] with advanced options :
.IP
.EX
\-\-download <os> <release> [edition] : Download image; no VM configuration
\-\-create\-config <os> [path/url] [flags] : Create VM config for an OS image
\-\-create\-config <os> [path/url] : Create VM config for a OS image
\-\-open\-homepage <os> : Open homepage for the OS
\-\-show [os] : Show OS information
\-\-version : Show version
\-\-help : Show this help message
\-\-disable\-unattended : Force quickget not to set up an unattended installation
\-\-url [os] [release] [edition] : Show image URL(s)
\-\-check [os] [release] [edition] : Check image URL(s)
\-\-list : List all supported systems
@ -691,8 +704,6 @@ wiki
.IP \[bu] 2
\f[CR]lmde\f[R] (Linux Mint Debian Edition)
.IP \[bu] 2
\f[CR]maboxlinux\f[R] (Mabox Linux)
.IP \[bu] 2
\f[CR]mageia\f[R] (Mageia)
.IP \[bu] 2
\f[CR]manjaro\f[R] (Manjaro)
@ -727,8 +738,6 @@ wiki
.IP \[bu] 2
\f[CR]primtux\f[R] (PrimTux)
.IP \[bu] 2
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
.IP \[bu] 2
\f[CR]pureos\f[R] (PureOS)
.IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS)
@ -1329,6 +1338,6 @@ Full sources at: \c
.UR https://github.com/quickemu-project/quickemu
.UE \c
.PP
quickemu_conf(5), quickget(1), quickgui(1)
quickemu_conf(1), quickget(1), quickgui(1)
.SH AUTHORS
Martin Wimpress.

View File

@ -1,6 +1,6 @@
---
author: Martin Wimpress
date: December 30, 2024
date: June 24, 2024
footer: quickemu
header: Quickemu User Manual
section: 1
@ -175,7 +175,7 @@ Haiku, KolibriOS, OpenIndiana, ReactOS, and more.
- Host support for **Linux and macOS**
- **macOS** Sonoma, Ventura, Monterey, Big Sur, Catalina & Mojave
- **Windows** 10 and 11 including TPM 2.0
- **Windows Server** 2022 2019 2016
- **Windows Server** 2022 2019 2016 2012-r2
- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu
flavours](https://ubuntu.com/download/flavours)**
- **Nearly 1000 operating system editions are supported!**
@ -229,8 +229,7 @@ requirements manually:
- [python3](https://www.python.org/)
- [mkisofs](http://cdrtools.sourceforge.net/private/cdrecord.html)
- [usbutils](https://github.com/gregkh/usbutils)
- [util-linux](https://github.com/karelzak/util-linux); including
`uuidgen`
- [util-linux](https://github.com/karelzak/util-linux)
- [sed](https://www.gnu.org/software/sed/)
- [socat](http://www.dest-unreach.org/socat/)
- [spicy](https://gitlab.freedesktop.org/spice/spice-gtk)
@ -261,7 +260,7 @@ sudo apt-get install bash coreutils curl genisoimage grep jq mesa-utils ovmf pci
#### Install requirements on Fedora hosts
``` shell
sudo dnf install bash coreutils curl edk2-tools genisoimage grep jq mesa-demos pciutils procps python3 qemu sed socat spice-gtk-tools swtpm unzip usbutils util-linux uuidgen-runtime xdg-user-dirs xrandr zsync
sudo dnf install bash coreutils curl edk2-tools genisoimage grep jq mesa-demos pciutils procps python3 qemu sed socat spice-gtk-tools swtpm unzip usbutils util-linux xdg-user-dirs xrandr zsync
```
### Install requirements on Gentoo
@ -333,6 +332,24 @@ Many thanks to [Luke Wesley-Holley](https://github.com/Lukewh) and
[Philipp Kiemle](https://github.com/daPhipz) for creating the
**[Quickemu icons](https://github.com/Lukewh/quickemu-icons)** 🎨
### qqX
There is also a multi option desktop integrated text interface, the
**quickemu quickget X terminal project**, or **qqX**, with lots of
unique tools and utilities to help you make light work of installations,
snapshots and disk management
- **[qqX](https://github.com/TuxVinyards/qqX)** is independently curated
by [Alex Genovese](https://github.com/TuxVinyards) (see the github
pages)
<figure>
<img
src="https://github.com/TuxVinyards/qqX/assets/3956806/18e5c495-8072-49a5-8b9c-e1302549efcf"
alt="qqX-vmm" />
<figcaption aria-hidden="true">qqX-vmm</figcaption>
</figure>
## Creating Linux guests 🐧
### Ubuntu
@ -394,12 +411,11 @@ You can also use `quickget` with advanced options :
``` text
--download <os> <release> [edition] : Download image; no VM configuration
--create-config <os> [path/url] [flags] : Create VM config for an OS image
--create-config <os> [path/url] : Create VM config for a OS image
--open-homepage <os> : Open homepage for the OS
--show [os] : Show OS information
--version : Show version
--help : Show this help message
--disable-unattended : Force quickget not to set up an unattended installation
--url [os] [release] [edition] : Show image URL(s)
--check [os] [release] [edition] : Check image URL(s)
--list : List all supported systems
@ -473,7 +489,6 @@ Further information is available from the project
- `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition)
- `maboxlinux` (Mabox Linux)
- `mageia` (Mageia)
- `manjaro` (Manjaro)
- `mxlinux` (MX Linux)
@ -491,7 +506,6 @@ Further information is available from the project
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
- `primtux` (PrimTux)
- `proxmox-ve` (Proxmox VE)
- `pureos` (PureOS)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
@ -851,4 +865,4 @@ Submit bug reports online at:
Full sources at: <https://github.com/quickemu-project/quickemu>
quickemu_conf(5), quickget(1), quickgui(1)
quickemu_conf(1), quickget(1), quickgui(1)

View File

@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.6.1
.\" Automatically generated by Pandoc 3.2
.\"
.TH "QUICKEMU_CONF" "5" "December 30, 2024" "quickemu_conf" "Quickemu Configuration Manual"
.TH "QUICKEMU_CONF" "1" "June 24, 2024" "quickemu_conf" "Quickemu Configuration Manual"
.SH NAME
quickemu_conf \- Options and parameters in the quickemu <vm>.conf
.SH DESCRIPTION

View File

@ -1,9 +1,9 @@
---
author: Martin Wimpress
date: December 30, 2024
date: June 24, 2024
footer: quickemu_conf
header: Quickemu Configuration Manual
section: 5
section: 1
title: QUICKEMU_CONF
---

View File

@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.6.1
.\" Automatically generated by Pandoc 3.2
.\"
.TH "QUICKGET" "1" "December 30, 2024" "quickget" "Quickget User Manual"
.TH "QUICKGET" "1" "June 24, 2024" "quickget" "Quickget User Manual"
.SH NAME
quickget \- download and prepare materials for building a quickemu VM
.SH SYNOPSIS
@ -129,12 +129,11 @@ You can also use \f[CR]quickget\f[R] with advanced options :
.IP
.EX
\-\-download <os> <release> [edition] : Download image; no VM configuration
\-\-create\-config <os> [path/url] [flags] : Create VM config for an OS image
\-\-create\-config <os> [path/url] : Create VM config for a OS image
\-\-open\-homepage <os> : Open homepage for the OS
\-\-show [os] : Show OS information
\-\-version : Show version
\-\-help : Show this help message
\-\-disable\-unattended : Force quickget not to set up an unattended installation
\-\-url [os] [release] [edition] : Show image URL(s)
\-\-check [os] [release] [edition] : Check image URL(s)
\-\-list : List all supported systems
@ -252,8 +251,6 @@ wiki
.IP \[bu] 2
\f[CR]lmde\f[R] (Linux Mint Debian Edition)
.IP \[bu] 2
\f[CR]maboxlinux\f[R] (Mabox Linux)
.IP \[bu] 2
\f[CR]mageia\f[R] (Mageia)
.IP \[bu] 2
\f[CR]manjaro\f[R] (Manjaro)
@ -288,8 +285,6 @@ wiki
.IP \[bu] 2
\f[CR]primtux\f[R] (PrimTux)
.IP \[bu] 2
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
.IP \[bu] 2
\f[CR]pureos\f[R] (PureOS)
.IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS)
@ -705,6 +700,6 @@ Full sources at: \c
.UR https://github.com/quickemu-project/quickemu
.UE \c
.PP
quickemu(1), quickemu_conf(5), quickgui(1)
quickemu(1), quickemu_conf(1), quickgui(1)
.SH AUTHORS
Martin Wimpress.

View File

@ -1,6 +1,6 @@
---
author: Martin Wimpress
date: December 30, 2024
date: June 24, 2024
footer: quickget
header: Quickget User Manual
section: 1
@ -124,12 +124,11 @@ You can also use `quickget` with advanced options :
``` text
--download <os> <release> [edition] : Download image; no VM configuration
--create-config <os> [path/url] [flags] : Create VM config for an OS image
--create-config <os> [path/url] : Create VM config for a OS image
--open-homepage <os> : Open homepage for the OS
--show [os] : Show OS information
--version : Show version
--help : Show this help message
--disable-unattended : Force quickget not to set up an unattended installation
--url [os] [release] [edition] : Show image URL(s)
--check [os] [release] [edition] : Check image URL(s)
--list : List all supported systems
@ -203,7 +202,6 @@ Further information is available from the project
- `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition)
- `maboxlinux` (Mabox Linux)
- `mageia` (Mageia)
- `manjaro` (Manjaro)
- `mxlinux` (MX Linux)
@ -221,7 +219,6 @@ Further information is available from the project
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
- `primtux` (PrimTux)
- `proxmox-ve` (Proxmox VE)
- `pureos` (PureOS)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
@ -487,4 +484,4 @@ Submit bug reports online at:
Full sources at: <https://github.com/quickemu-project/quickemu>
quickemu(1), quickemu_conf(5), quickgui(1)
quickemu(1), quickemu_conf(1), quickgui(1)

View File

@ -2,12 +2,12 @@
"nodes": {
"flake-schemas": {
"locked": {
"lastModified": 1721999734,
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
"revCount": 75,
"lastModified": 1697467827,
"narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=",
"rev": "764932025c817d4e500a8d2a4d8c565563923d29",
"revCount": 29,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz"
},
"original": {
"type": "tarball",
@ -16,16 +16,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1756217674,
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"revCount": 808864,
"lastModified": 1716509168,
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"revCount": 630835,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808864%2Brev-4e7667a90c167f7a81d906e5a75cba4ad8bee620/0198eaa3-105a-74fa-a9b2-0a930acea8de/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.630835%2Brev-bfb7a882678e518398ce9a31a881538679f6f092/018fafb0-ec0d-7254-8082-b09ecc86e5fc/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"root": {

View File

@ -2,7 +2,7 @@
description = "Quickemu flake";
inputs = {
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
};
outputs = {
@ -10,33 +10,28 @@
flake-schemas,
nixpkgs,
}: let
# Define supported systems and a helper function for generating system-specific outputs
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
system = system;
pkgs = import nixpkgs { inherit system; };
});
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: function nixpkgs.legacyPackages.${system});
in {
# Define schemas for the flake's outputs
# Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas;
# Define overlays for each supported system
overlays = {
default = final: prev: {
quickemu = final.callPackage ./package.nix { };
};
overlays.default = final: prev: {
quickemu = final.callPackage ./package.nix {};
};
# Define packages for each supported system
packages = forEachSupportedSystem ({pkgs, system, ...}: rec {
quickemu = pkgs.callPackage ./package.nix { };
packages = forAllSystems (pkgs: rec {
quickemu = pkgs.callPackage ./package.nix {};
default = quickemu;
});
# Define devShells for each supported system
devShells = forEachSupportedSystem ({pkgs, system, ...}: {
default = pkgs.callPackage ./devshell.nix { };
devShells = forAllSystems (pkgs: {
default = pkgs.callPackage ./devshell.nix {};
});
};
}

View File

@ -11,11 +11,11 @@
, gnugrep
, gnused
, jq
, ncurses
, pciutils
, procps
, python3
, qemu_full
, samba
, qemu
, socat
, spice-gtk
, swtpm
@ -27,7 +27,6 @@
, zsync
, OVMF
, OVMFFull
, quickemu
}:
let
runtimePaths = [
@ -37,19 +36,17 @@ let
gnugrep
gnused
jq
ncurses
pciutils
procps
python3
qemu_full
samba
qemu
socat
swtpm
unzip
util-linux
xrandr
zsync
OVMF
OVMFFull
] ++ lib.optionals stdenv.isLinux [
glxinfo
usbutils
@ -62,9 +59,11 @@ let
.*
'' (builtins.readFile ./quickemu);
in
stdenv.mkDerivation rec {
pname = "quickemu";
version = builtins.concatStringsSep "" versionMatches;
src = lib.cleanSource ./.;
postPatch = ''
@ -72,7 +71,7 @@ stdenv.mkDerivation rec {
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's,\$(command -v smbd),${samba}/bin/smbd,' \
-e 's/Icon=.*qemu.svg/Icon=qemu/' \
quickemu
'';
@ -81,12 +80,12 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.5
install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport
installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.1
install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport windowskey
# spice-gtk needs to be put in suffix so that when virtualisation.spiceUSBRedirection
# is enabled, the wrapped spice-client-glib-usb-acl-helper is used
for f in chunkcheck quickget quickemu quickreport; do
for f in chunkcheck quickget quickemu quickreport windowskey; do
wrapProgram $out/bin/$f \
--prefix PATH : "${lib.makeBinPath runtimePaths}" \
--suffix PATH : "${lib.makeBinPath [ spice-gtk ]}"
@ -95,13 +94,10 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru.tests = testers.testVersion { package = quickemu; };
meta = {
meta = with lib; {
description = "Quickly create and run optimised Windows, macOS and Linux virtual machines";
homepage = "https://github.com/quickemu-project/quickemu";
mainProgram = "quickemu";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fedx-sudo flexiondotorg ];
license = licenses.mit;
maintainers = with maintainers; [ fedx-sudo flexiondotorg ];
};
}

229
quickemu
View File

@ -10,7 +10,7 @@ function ignore_msrs_always() {
# Make sure the host has /etc/modprobe.d
if [ -d /etc/modprobe.d ]; then
# Skip if ignore_msrs is already enabled, assumes initramfs has been rebuilt
if ! grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then
if grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then
echo "options kvm ignore_msrs=Y" | sudo tee /etc/modprobe.d/kvm-quickemu.conf
sudo update-initramfs -k all -u
fi
@ -39,7 +39,7 @@ function ignore_msrs_alert() {
}
function delete_shortcut() {
local SHORTCUT_DIR="${HOME}/.local/share/applications"
local SHORTCUT_DIR="${HOME}/.local/share/applications/"
if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then
rm "${SHORTCUT_DIR}/${VMNAME}.desktop"
echo " - Deleted ${SHORTCUT_DIR}/${VMNAME}.desktop"
@ -52,7 +52,9 @@ function delete_disk() {
rm "${disk_img}" >/dev/null 2>&1
# Remove any EFI vars, but not for macOS
rm "${VMDIR}"/OVMF_VARS*.fd >/dev/null 2>&1
rm "${VMPATH}/${VMDIR}"/OVMF_VARS*.fd >/dev/null 2>&1
rm "${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1
rm "${VMPATH}/${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1
echo " - Deleted ${disk_img}"
delete_shortcut
else
@ -323,10 +325,6 @@ function configure_cpu() {
HOST_CPU_SOCKETS=$(get_cpu_info 'Socket')
HOST_CPU_VENDOR=$(get_cpu_info 'Vendor')
if [ "${HOST_CPU_SOCKETS}" = "-" ]; then
HOST_CPU_SOCKETS=1
fi
CPU_MODEL="host"
QEMU_ACCEL="tcg"
# Configure appropriately for the host platform
@ -395,16 +393,6 @@ function configure_cpu() {
fi
fi
# SMM is also required for Linux guests when Secure Boot is enabled
if [ "${secureboot}" == "on" ]; then
if [ "${guest_os}" == "linux" ]; then
# SMM is not available on QEMU for macOS via Homebrew
if [ "${OS_KERNEL}" == "Linux" ]; then
SMM="on"
fi
fi
fi
case ${guest_os} in
batocera|freedos|haiku|solaris) MACHINE_TYPE="pc";;
kolibrios|reactos)
@ -424,7 +412,7 @@ function configure_cpu() {
# A CPU with fma is required for Metal support
# A CPU with invtsc is required for macOS to boot
case ${macos_release} in
ventura|sonoma|sequoia)
ventura|sonoma)
# A CPU with AVX2 support is required for >= macOS Ventura
if check_cpu_flag sse4_2 && check_cpu_flag avx2; then
if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
@ -575,7 +563,7 @@ function configure_ram() {
RAM_HOST=$(($(sysctl -n hw.memsize) / (1048576*1024)))
else
# Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output.
RAM_HOST=$(free --giga | tr ' ' '\n' | grep -m 1 "[0-9]" )
RAM_HOST=$(free --giga -h | tr ' ' '\n' | grep -m 1 "[0-9]" | cut -d'G' -f 1)
fi
if [ "${RAM_HOST}" -ge 128 ]; then
@ -614,12 +602,6 @@ function configure_ram() {
fi
}
function is_firmware_qcow2() {
# Check for the magic bytes that indicate the firmware is in qcow2 format,
# otherwise default to assuming firmware files are in raw format
[ "$(head -c 4 "$1")" = "QFI"$'\xfb' ] && echo "true" || echo "false"
}
function configure_bios() {
# Always Boot macOS using EFI
if [ "${guest_os}" == "macos" ]; then
@ -679,15 +661,13 @@ function configure_bios() {
if [ -n "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then
case ${secureboot} in
on) # shellcheck disable=SC2054,SC2140
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.ms.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.secboot.fd" \
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.fd" \
"${SHARE_PATH}/OVMF/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/OVMF/x64/OVMF_VARS.fd" \
"${SHARE_PATH}/edk2-ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/OVMF_VARS.fd" \
"${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-vars.bin" \
"${SHARE_PATH}/qemu/edk2-x86_64-secure-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \
"${SHARE_PATH}/edk2/x64/OVMF_CODE.secboot.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","${SHARE_PATH}/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2"
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd"
);;
*) # shellcheck disable=SC2054,SC2140
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \
@ -697,9 +677,7 @@ function configure_bios() {
"${SHARE_PATH}/edk2-ovmf/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/OVMF_VARS.fd" \
"${SHARE_PATH}/qemu/ovmf-x86_64-4m-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-4m-vars.bin" \
"${SHARE_PATH}/qemu/edk2-x86_64-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \
"${SHARE_PATH}/edk2/x64/OVMF_CODE.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE_4M.qcow2","${SHARE_PATH}/edk2/ovmf/OVMF_VARS_4M.qcow2"
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd"
);;
esac
# Attempt each EFI_CODE file one by one, selecting the corresponding code and vars
@ -730,14 +708,6 @@ function configure_bios() {
echo " - EFI: ERROR! EFI_EXTRA_VARS file ${EFI_EXTRA_VARS} does not exist."
exit 1
fi
# Write destination vars file with correct extension
# based on source format of the EFI_EXTRA_VARS file
QCOW2VARS=$(is_firmware_qcow2 "${EFI_EXTRA_VARS}")
if [ "${QCOW2VARS}" = "true" ]; then
EFI_VARS="${VMDIR}/OVMF_VARS.qcow2"
else
EFI_VARS="${VMDIR}/OVMF_VARS.fd"
fi
efi_vars "${EFI_EXTRA_VARS}" "${EFI_VARS}"
fi
@ -756,7 +726,7 @@ function configure_bios() {
EFI_CODE=$(realpath "${EFI_CODE}")
echo "${EFI_CODE}"
fi
BOOT_STATUS="EFI (${guest_os^}), OVMF (${EFI_CODE}), EFI Vars (${EFI_VARS}), SecureBoot (${secureboot})."
BOOT_STATUS="EFI (${guest_os^}), OVMF (${EFI_CODE}), SecureBoot (${secureboot})."
else
BOOT_STATUS="Legacy BIOS (${guest_os^})"
boot="legacy"
@ -768,7 +738,7 @@ function configure_bios() {
function configure_os_quirks() {
if [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "kolibrios" ]; then
if [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "kolibrios" ]; then
NET_DEVICE="rtl8139"
fi
@ -777,10 +747,8 @@ function configure_os_quirks() {
fi
case ${guest_os} in
windows-server) NET_DEVICE="e1000";;
*bsd|linux*|windows) NET_DEVICE="virtio-net";;
freedos) sound_card="sb16"
NET_DEVICE="pcnet";;
*bsd|linux*|windows*) NET_DEVICE="virtio-net";;
freedos) sound_card="sb16";;
*solaris) usb_controller="xhci"
sound_card="ac97";;
reactos) NET_DEVICE="e1000"
@ -793,7 +761,7 @@ function configure_os_quirks() {
# * VirtIO Memory Balloning is supported since Big Sur (https://pmhahn.github.io/virtio-balloon/)
# * VirtIO RNG is supported since Big Sur, but exposed to all guests by default.
case ${macos_release} in
big-sur|monterey|ventura|sonoma|sequoia)
big-sur|monterey|ventura|sonoma)
BALLOON="-device virtio-balloon"
MAC_DISK_DEV="virtio-blk-pci"
NET_DEVICE="virtio-net"
@ -819,7 +787,6 @@ function configure_os_quirks() {
}
function configure_storage() {
local create_options=""
echo " - Disk: ${disk_img} (${disk_size})"
if [ ! -f "${disk_img}" ]; then
# If there is no disk image, create a new image.
@ -830,14 +797,8 @@ function configure_storage() {
exit 1;;
esac
case ${disk_format} in
qcow2) create_options="lazy_refcounts=on,preallocation=${preallocation},nocow=on";;
raw) create_options="preallocation=${preallocation}";;
*) true;;
esac
# https://blog.programster.org/qcow2-performance
if ! ${QEMU_IMG} create -q -f "${disk_format}" -o "${create_options=}" "${disk_img}" "${disk_size}"; then
if ! ${QEMU_IMG} create -q -f "${disk_format}" -o lazy_refcounts=on,preallocation="${preallocation}" "${disk_img}" "${disk_size}"; then
echo "ERROR! Failed to create ${disk_img} using ${disk_format} format."
exit 1
fi
@ -907,23 +868,12 @@ function configure_storage() {
}
function configure_display() {
# Determine which audio driver use between Pulseaudio or ALSA
local AUDIO_DRIVER="pa"
if pidof pipewire >/dev/null 2>&1; then
# QEMU's pipewire audio backend was added in version 8.1
if [ "${QEMU_VER_SHORT}" -ge 81 ]; then
AUDIO_DRIVER="pipewire"
fi
elif ! pidof pulseaudio >/dev/null 2>&1; then
AUDIO_DRIVER="alsa"
fi
# Setup the appropriate audio device based on the display output
# https://www.kraxel.org/blog/2020/01/qemu-sound-audiodev/
case ${display} in
cocoa) AUDIO_DEV="coreaudio,id=audio0";;
none|spice|spice-app) AUDIO_DEV="spice,id=audio0";;
*) AUDIO_DEV="${AUDIO_DRIVER},id=audio0";;
*) AUDIO_DEV="pa,id=audio0";;
esac
# Determine a sane resolution for Linux guests.
@ -1130,9 +1080,7 @@ function configure_file_sharing() {
fi
# SMB
# We need to search in NixOS compatible paths as well as the standard location
# since /usr/sbin/smbd may not be in the PATH.
if [ -x "$(command -v smbd)" ] || [ -x "/usr/sbin/smbd" ]; then
if [ -x "$(command -v smbd)" ]; then
NET+=",smb=${PUBLIC}"
echo " - smbd: On guest: smb://10.0.2.4/qemu"
fi
@ -1214,8 +1162,6 @@ function vm_boot() {
# Set the hostname of the VM
NET="user,hostname=${VMNAME}"
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
configure_cpu
configure_ram
configure_bios
@ -1228,6 +1174,8 @@ function vm_boot() {
configure_usb
configure_tpm
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
# Changing process name is not supported on macOS
if [ "${OS_KERNEL}" == "Linux" ]; then
# shellcheck disable=SC2054,SC2206,SC2140
@ -1237,16 +1185,9 @@ function vm_boot() {
args+=(-machine ${MACHINE_TYPE},smm=${SMM},vmport=off,accel=${QEMU_ACCEL} ${GUEST_TWEAKS}
${CPU} ${SMP}
-m ${RAM_VM} ${BALLOON}
-rtc base=localtime,clock=host,driftfix=slew
-pidfile "${VMDIR}/${VMNAME}.pid")
if [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ] || [ "${guest_os}" == "reactos" ] || [ "${guest_os}" == "freedos" ]; then
# shellcheck disable=SC2054
args+=(-rtc base=localtime,clock=host,driftfix=slew)
else
# shellcheck disable=SC2054
args+=(-rtc base=utc,clock=host)
fi
# shellcheck disable=SC2206
args+=(${VIDEO} -display ${DISPLAY_RENDER})
# Only enable SPICE is using SPICE display
@ -1391,14 +1332,10 @@ function vm_boot() {
# Add the disks
# - https://turlucode.com/qemu-disk-io-performance-comparison-native-or-threads-windows-10-version/
if [[ "${boot}" == *"efi"* ]]; then
QCOW2CODE=$(is_firmware_qcow2 "${EFI_CODE}")
QCOW2VARS=$(is_firmware_qcow2 "${EFI_VARS}")
if [ "${QCOW2CODE}" = "true" ]; then EFI_CODE_FORMAT="qcow2"; else EFI_CODE_FORMAT="raw"; fi
if [ "${QCOW2VARS}" = "true" ]; then EFI_VARS_FORMAT="qcow2"; else EFI_VARS_FORMAT="raw"; fi
# shellcheck disable=SC2054
args+=(-global driver=cfi.pflash01,property=secure,value=on
-drive if=pflash,format="${EFI_CODE_FORMAT}",unit=0,file="${EFI_CODE}",readonly=on
-drive if=pflash,format="${EFI_VARS_FORMAT}",unit=1,file="${EFI_VARS}")
-drive if=pflash,format=raw,unit=0,file="${EFI_CODE}",readonly=on
-drive if=pflash,format=raw,unit=1,file="${EFI_VARS}")
fi
if [ -n "${iso}" ] && [ "${guest_os}" == "freedos" ]; then
@ -1520,11 +1457,8 @@ function vm_boot() {
elif [ "${monitor}" == "socket" ]; then
# shellcheck disable=SC2054,SC2206
args+=(-monitor unix:${SOCKET_MONITOR},server,nowait)
if command -v socat &>/dev/null; then
echo " - Monitor: On host: socat -,echo=0,icanon=0 unix-connect:${SOCKET_MONITOR}"
elif command -v nc &>/dev/null; then
echo " - Monitor: On host: nc -U \"${SOCKET_MONITOR}\""
fi
echo " - Monitor: On host: nc -U \"${SOCKET_MONITOR}\""
echo " or : socat -,echo=0,icanon=0 unix-connect:${SOCKET_MONITOR}"
else
echo "ERROR! \"${monitor}\" is an unknown monitor option."
exit 1
@ -1548,11 +1482,8 @@ function vm_boot() {
elif [ "${serial}" == "socket" ]; then
# shellcheck disable=SC2054,SC2206
args+=(-serial unix:${SOCKET_SERIAL},server,nowait)
if command -v socat &>/dev/null; then
echo " - Serial: On host: socat -,echo=0,icanon=0 unix-connect:${SOCKET_SERIAL}"
elif command -v nc &>/dev/null; then
echo " - Serial: On host: nc -U \"${SOCKET_SERIAL}\""
fi
echo " - Serial: On host: nc -U \"${SOCKET_SERIAL}\""
echo " or : socat -,echo=0,icanon=0 unix-connect:${SOCKET_SERIAL}"
else
echo "ERROR! \"${serial}\" is an unknown serial option."
exit 1
@ -1575,7 +1506,7 @@ function vm_boot() {
echo "${QEMU}" "${SHELL_ARGS}" "2>/dev/null" >> "${VMDIR}/${VMNAME}.sh"
sed -i -e 's/ -/ \\\n -/g' "${VMDIR}/${VMNAME}.sh"
${QEMU} "${args[@]}" &> "${VMDIR}/${VMNAME}.log" &
VM_PID=$!
local VM_PID=$!
sleep 0.25
if kill -0 "${VM_PID}" 2>/dev/null; then
echo " - Process: Started ${VM} as ${VMNAME} (${VM_PID})"
@ -1636,10 +1567,10 @@ function shortcut_create {
Version=1.0
Type=Application
Terminal=false
Exec=$(basename "${0}") --vm ${VM} ${SHORTCUT_OPTIONS}
Exec=${0} --vm ${VM}
Path=${VMPATH}
Name=${VMNAME}
Icon=qemu
Icon=/usr/share/icons/hicolor/scalable/apps/qemu.svg
EOF
echo " - ${filename} created."
}
@ -1696,6 +1627,7 @@ function usage() {
echo " --sound-duplex <type> : Set sound card duplex. @Options: 'hda-micro' (default: speaker/mic), 'hda-duplex' (line-in/line-out), 'hda-output' (output-only)"
echo " --extra_args <arguments> : Pass additional arguments to qemu"
echo " --version : Print version"
exit 1
}
function display_param_check() {
@ -1823,7 +1755,6 @@ function fileshare_param_check() {
if [ ! -d "${PUBLIC}" ]; then
echo " - WARNING! Public directory: '${PUBLIC}' doesn't exist!"
PUBLIC=""
else
PUBLIC_TAG="Public-${USER,,}"
PUBLIC_PERMS=$(${STAT} -c "%A" "${PUBLIC}")
@ -1936,7 +1867,6 @@ MONITOR_CMD=""
PUBLIC=""
PUBLIC_PERMS=""
PUBLIC_TAG=""
SHORTCUT_OPTIONS=""
SNAPSHOT_ACTION=""
SNAPSHOT_TAG=""
SOCKET_MONITOR=""
@ -1951,7 +1881,7 @@ VMPATH=""
# shellcheck disable=SC2155
readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8))
readonly VERSION="4.9.8"
readonly VERSION="4.9.5"
# TODO: Make this run the native architecture binary
ARCH_VM="x86_64"
@ -1975,8 +1905,7 @@ if [ "${OS_KERNEL}" == "Darwin" ]; then
fi
QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}')
# strip patch version and remove dots. 6.0.0 => 60 / 10.0.0 => 100
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG%.*}" | sed 's/\.//g')
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG//./}" | cut -c1-2)
if [ "${QEMU_VER_SHORT}" -lt 60 ]; then
echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}."
exit 1
@ -1985,16 +1914,13 @@ fi
# Take command line arguments
if [ $# -lt 1 ]; then
usage
exit 1
else
while [ $# -gt 0 ]; do
case "${1}" in
-access|--access)
SHORTCUT_OPTIONS+="--access ${2} "
ACCESS="${2}"
shift 2;;
-braille|--braille)
SHORTCUT_OPTIONS+="--braille "
BRAILLE="on"
shift;;
-delete|--delete|-delete-disk|--delete-disk)
@ -2004,12 +1930,10 @@ else
ACTIONS+=(delete_vm)
shift;;
-display|--display)
SHORTCUT_OPTIONS+="--display ${2} "
display="${2}"
display_param_check
shift 2;;
-fullscreen|--fullscreen|-full-screen|--full-screen)
SHORTCUT_OPTIONS+="--fullscreen "
FULLSCREEN="--full-screen"
shift;;
-ignore-msrs-always|--ignore-msrs-always)
@ -2019,7 +1943,6 @@ else
ACTIONS+=(kill_vm)
shift;;
-offline|--offline)
SHORTCUT_OPTIONS+="--offline "
network="none"
shift;;
-snapshot|--snapshot)
@ -2048,95 +1971,73 @@ else
VM="${2}"
shift 2;;
-viewer|--viewer)
SHORTCUT_OPTIONS+="--viewer ${2} "
viewer="${2}"
shift 2;;
-width|--width)
SHORTCUT_OPTIONS+="--width ${2} "
width="${2}"
shift 2;;
-height|--height)
SHORTCUT_OPTIONS+="--height ${2} "
height="${2}"
shift 2;;
-ssh-port|--ssh-port)
SHORTCUT_OPTIONS+="--ssh-port ${2} "
ssh_port="${2}"
shift 2;;
-spice-port|--spice-port)
SHORTCUT_OPTIONS+="--spice-port ${2} "
spice_port="${2}"
shift 2;;
-public-dir|--public-dir)
SHORTCUT_OPTIONS+="--public-dir ${2} "
PUBLIC="${2}"
shift 2;;
-monitor|--monitor)
SHORTCUT_OPTIONS+="--monitor ${2} "
monitor="${2}"
shift 2;;
-monitor-cmd|--monitor-cmd)
SHORTCUT_OPTIONS+="--monitor-cmd ${2} "
MONITOR_CMD="${2}"
shift 2;;
-monitor-telnet-host|--monitor-telnet-host)
SHORTCUT_OPTIONS+="--monitor-telnet-host ${2} "
monitor_telnet_host="${2}"
shift 2;;
-monitor-telnet-port|--monitor-telnet-port)
SHORTCUT_OPTIONS+="--monitor-telnet-port ${2} "
monitor_telnet_port="${2}"
shift 2;;
-serial|--serial)
SHORTCUT_OPTIONS+="--serial ${2} "
serial="${2}"
shift 2;;
-serial-telnet-host|--serial-telnet-host)
SHORTCUT_OPTIONS+="--serial-telnet-host ${2} "
serial_telnet_host="${2}"
shift 2;;
-serial-telnet-port|--serial-telnet-port)
SHORTCUT_OPTIONS+="--serial-telnet-port ${2} "
serial_telnet_port="${2}"
shift 2;;
-keyboard|--keyboard)
SHORTCUT_OPTIONS+="--keyboard ${2} "
keyboard="${2}"
shift 2;;
-keyboard_layout|--keyboard_layout)
SHORTCUT_OPTIONS+="--keyboard_layout ${2} "
keyboard_layout="${2}"
shift 2;;
-mouse|--mouse)
SHORTCUT_OPTIONS+="--mouse ${2} "
mouse="${2}"
shift 2;;
-usb-controller|--usb-controller)
SHORTCUT_OPTIONS+="--usb-controller ${2} "
usb_controller="${2}"
shift 2;;
-extra_args|--extra_args)
SHORTCUT_OPTIONS+="--extra_args ${2} "
extra_args+="${2}"
shift 2;;
-sound-card|--sound-card)
SHORTCUT_OPTIONS+="--sound-card ${2} "
sound_card="${2}"
shift 2;;
-sound-duplex|--sound-duplex)
SHORTCUT_OPTIONS+="--sound-duplex ${2} "
sound_duplex="${2}"
shift 2;;
-version|--version)
echo "${VERSION}"
exit;;
-h|--h|-help|--help)
usage
exit 0;;
usage;;
*)
echo "ERROR! \"${1}\" is not a supported parameter."
usage
exit 1;;
usage;;
esac
done
fi
@ -2156,23 +2057,6 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
disk_img="${VMDIR}/disk.${disk_format}"
fi
# Fixes running VMs when PWD is not relative to the VM directory
# https://github.com/quickemu-project/quickemu/pull/875
if [ ! -f "${disk_img}" ]; then
pushd "${VMPATH}" >/dev/null || exit
fi
# Check if VM is already running
VM_PID=""
if [ -r "${VMDIR}/${VMNAME}.pid" ]; then
VM_PID=$(head -n 1 "${VMDIR}/${VMNAME}.pid")
if ! kill -0 "${VM_PID}" > /dev/null 2>&1; then
#VM is not running, cleaning up.
VM_PID=""
rm -f "${VMDIR}/${VMNAME}.pid"
fi
fi
# Iterate over any actions and exit.
if [ ${#ACTIONS[@]} -ge 1 ]; then
for ACTION in "${ACTIONS[@]}"; do
@ -2201,14 +2085,12 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
exit;;
*)
echo "ERROR! \"${SNAPSHOT_ACTION}\" is not a supported snapshot action."
usage
exit 1;;
usage;;
esac
fi
else
echo "ERROR! Virtual machine configuration not found."
usage
exit 1
fi
display_param_check
@ -2218,17 +2100,36 @@ tpm_param_check
viewer_param_check
fileshare_param_check
if [ -z "${VM_PID}" ]; then
vm_boot
start_viewer
# If the VM being started is an uninstalled Windows VM then auto-skip the press-any key prompt.
if [ -n "${iso}" ] && [[ "${guest_os}" == "windows"* ]]; then
# shellcheck disable=SC2034
for LOOP in {1..5}; do
sleep 1
monitor_send_cmd "sendkey ret"
done
# Check if vm is already run
VM_PID=""
if [ -r "${VMDIR}/${VMNAME}.pid" ]; then
VM_PID=$(head -n 1 "${VMDIR}/${VMNAME}.pid")
if ! kill -0 "${VM_PID}" > /dev/null 2>&1; then
# VM is not running, cleaning up.
VM_PID=""
rm -f "${VMDIR}/${VMNAME}.pid"
fi
fi
if [ -z "${VM_PID}" ]; then
#TODO: double quote the args array to prevent word splitting and this can be removed
# Fix failing to start VM with spaces in the path
# https://github.com/quickemu-project/quickemu/pull/875
if [ ! -f "${disk_img}" ]; then
pushd "${VMPATH}" || exit
fi
vm_boot
# If the VM being started is an uninstalled Windows VM then auto-skip the press-any key prompt.
if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ]; then
sleep 3.5
monitor_send_cmd "sendkey ret"
fi
if [ -n "${iso}" ] && [ "${guest_os}" == "windows-server" ]; then
sleep 7
monitor_send_cmd "sendkey ret"
fi
start_viewer
else
echo "${VMNAME}"
echo " - Process: Already running ${VM} as ${VMNAME} (${VM_PID})"

667
quickget

File diff suppressed because it is too large Load Diff

85
windowskey Executable file
View File

@ -0,0 +1,85 @@
#!/usr/bin/env python3
import html.parser
import os
import sys
import urllib.request
"""
Download Windows product keys from MicroSoft
"""
key_page_url = "https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys"
def usage():
script = os.path.basename(sys.argv[0])
message = f"""Usage: {script} [windows-version]
To specify the version of Windows you'd like, pass a string that matches the
name of the operating system you'd like to download. Case doesn't matter, so
you can use "windows 10" or "Windows 10".
e.g.
{script} "Windows 10"
{script} "enterprise"
"""
print(message, file=sys.stderr)
sys.exit(0)
def download_page(url):
response = urllib.request.urlopen(url)
return response.read().decode("utf-8")
class WindowsKeyPageParser(html.parser.HTMLParser):
def __init__(self, *, convert_charrefs=True):
super().__init__(convert_charrefs=True)
self.product_keys = {}
self.parsing_os = False
def handle_starttag(self, tag, attrs):
self.parsing_os = tag == "td"
def handle_endtag(self, tag):
self.parsing_os = False
def handle_data(self, data):
if self.parsing_os:
self.stash_table_cell(data)
def stash_table_cell(self, data):
if "Windows" in data:
self.current_os = data
else:
product_key = data
self.product_keys[self.current_os] = product_key
def find_keys_for_all_versions(markup):
parser = WindowsKeyPageParser()
parser.feed(markup)
return parser.product_keys
if __name__ == "__main__":
try:
arg = sys.argv[1]
except IndexError:
windows_version = ""
else:
if arg in ["-h", "--help"]:
usage()
windows_version = arg
markup = download_page(key_page_url)
product_keys = find_keys_for_all_versions(markup)
for os_name, product_key in product_keys.items():
if windows_version.lower() in os_name.lower():
print(f"{os_name}: {product_key}")