Compare commits

..

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

48 changed files with 6066 additions and 7630 deletions

1
.envrc
View File

@ -1 +0,0 @@
use flake

4
.github/FUNDING.yml vendored
View File

@ -1,3 +1,5 @@
# These are supported funding model platforms
github: [flexiondotorg, philclifford, lj3954]
github: flexiondotorg
patreon: wimpysworld
custom: https://wimpysworld.io/tip

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.

BIN
.github/apple.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,7 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

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

@ -0,0 +1,24 @@
#### Expected behaviour
Describe the your expected behaviour.
#### Actual behaviour
Describe the actual behaviour.
#### Steps to reproduce the behaviour
Outline the step to reproduce the issue you've encountered.
#### Quickemu output
Run `quickemu` or `quickget` and paste the output here.
#### Linux Distribution & Kernel
Run the following and paste the output.
```bash
lsb_release --all
uname -a
```

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*)

BIN
.github/screenshot.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

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

@ -1,27 +0,0 @@
name: "Lint Pull Request 🐙"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
main:
name: Validate pull request title
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# If the PR only contains a single commit, the action will validate that
# it matches the configured pattern.
validateSingleCommit: true
# Related to `validateSingleCommit` you can opt-in to validate that the PR
# title matches a single commit to avoid confusion.
validateSingleCommitMatchesPrTitle: true

View File

@ -1,18 +0,0 @@
name: "Lint Shellcheck 🐚"
on:
pull_request:
branches: '**'
workflow_dispatch:
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
format: gcc
severity: warning

19
.github/workflows/publish-ppa.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Publish PPA 📦️
on:
workflow_dispatch:
jobs:
publish-ppa:
name: Publish PPA
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: yuezk/publish-ppa-package@v1
with:
repository: 'ppa:flexiondotorg/quickemu'
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
pkgdir: '${{ github.workspace }}/quickemu/'

View File

@ -1,43 +1,15 @@
name: Publish Release 🏷
name: Build 🏗️ and Publish 📦
on:
push:
tags:
- "v?[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
inputs:
tag:
description: "The existing tag to publish"
type: "string"
required: true
tags: ['*']
jobs:
version-check:
name: "Check versions ⚖️"
create-release:
name: Create Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: "Compare App and Git versions 🟰"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
APP_VERSION=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
GIT_VERSION=$(git describe --tags | cut -d'-' -f1)
echo "App version: ${REL_VERSION}"
echo "Git version: ${GIT_VERSION}"
if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then
echo "ERROR! Version mismatch.";
exit 1
fi
draft-release:
needs: [version-check]
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 }}
@ -45,11 +17,11 @@ jobs:
gh release create "${{ github.ref }}" --draft --generate-notes
build-release:
needs: [draft-release]
name: "Build Release 👨‍🔧"
needs: [create-release]
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 }}
@ -57,17 +29,16 @@ jobs:
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
dch -v "${REL_VER}-1" --distribution=unstable "New upstream release."
dpkg-buildpackage --build=binary --no-check-builddeps --compression=gzip
gh release upload "${{ github.ref }}" "../quickemu_${REL_VER}-1_all.deb" --clobber
publish-release:
needs: [build-release]
name: "Publish Release 📤️"
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 }}
@ -76,54 +47,3 @@ jobs:
exit 1
fi
gh release edit "${{ github.ref }}" --draft=false
publish-flakehub:
needs: [version-check]
name: "Publish FlakeHub ❄️"
runs-on: "ubuntu-22.04"
permissions:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v5"
with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- uses: "DeterminateSystems/nix-installer-action@main"
- uses: "DeterminateSystems/magic-nix-cache-action@main"
- uses: "DeterminateSystems/flakehub-push@main"
with:
visibility: "public"
name: "quickemu-project/quickemu"
tag: "${{ inputs.tag }}"
publish-ppa:
needs: [version-check]
name: "Publish PPA 📦️"
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
uses: actions/checkout@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Import gpg key 🔑"
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
- name: "Install dependencies 💾"
run: |
sudo apt-get -y update
sudo apt-get -y install debhelper-compat distro-info dput devscripts
- name: "Upload to PPA ⤴️"
env:
DEBEMAIL: ${{ secrets.DEBEMAIL }}
DEBFULLNAME: ${{ secrets.DEBFULLNAME }}
run: |
REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
STAMP=$(date +%y%j.%H%M)
for CODENAME in $(distro-info --supported); do
rm debian/changelog
dch --package quickemu --newversion="${REL_VER}-1~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create
dpkg-buildpackage -d -S -sa
dput ppa:flexiondotorg/quickemu ../quickemu_${REL_VER}-1~${CODENAME}${STAMP}_source.changes
done

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

@ -1,52 +0,0 @@
name: "Test quickget 🧪"
on:
workflow_dispatch:
push:
branches:
- master
paths:
- quickget
pull_request:
branches:
- '**'
paths:
- quickget
jobs:
quickget-tests:
name: "Run quickget tests 👟"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: "Install dependencies 📦️"
run: |
sudo apt-get -y update
sudo apt-get -y install curl qemu-utils
- name: "List OS variants 📃"
run: |
mkdir -p results
./quickget --list | tail -n +2 | tee results/list.txt
- name: "Check OS downloads 💿️"
run: |
mkdir -p results
./quickget --check | tee results/check.txt
- name: "Display results 📊"
run: |
WINDOWS=$(grep -c "windows-" results/check.txt)
FAILED=$(grep -c ^FAIL results/check.txt)
SKIPPED=$(grep -c ^SKIP results/check.txt)
PASSED=$(grep -c ^PASS results/check.txt)
CHECKED=$((WINDOWS + FAILED + SKIPPED + PASSED))
echo -e "\nResults:"
echo -e "- CHECKED:\t${CHECKED}"
echo -e "- PASSED:\t${PASSED}"
echo -e "- SKIPPED:\t${SKIPPED}\t(of which ${WINDOWS} are Windows)"
echo -e "- FAILED:\t${FAILED}\n"
grep ^FAIL results/check.txt | tee results/failed.txt
VARIATIONS=$(wc -l results/list.txt | cut -d' ' -f 1)
DOWNLOADS=$(wc -l results/check.txt | cut -d' ' -f 1)
echo
echo "Compare OS variations with downloads:"
echo -e "- Variations:\t${VARIATIONS}"
echo -e "- Downloads:\t${DOWNLOADS}"

6
.gitignore vendored
View File

@ -2,15 +2,10 @@
*.conf
*.dmg
*.fd
*.fixed
*.img
*.iso
*.ISO
*.lock
!flake.lock
*.log
*.markdownlint.jsonc
*.markdownlint.yaml
*.msi
*.part
*.permall
@ -21,4 +16,3 @@
*.sock
*.xml
*.zs-old
.direnv/

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

985
README.md

File diff suppressed because it is too large Load Diff

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.

@ -1 +1 @@
Subproject commit 3125ddc21a91440cd6f1f70aa40081d760c10a4e
Subproject commit 15b126e5b583a02074da11c189c8bc9b9247c8a0

View File

@ -1,66 +0,0 @@
#!/usr/bin/env python3
from pathlib import Path
import struct
import hashlib
import argparse
v1_prod_pubkey = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF
# v2_prod_pubkey = 0xCB45C5E53217D4499FB80B2D96AA4F964EB551F1DA4EBFA4F5E23F87BFE82FC113590E536757F329D6EAD1F267771EE342F5A5E61514DD3D3383187E663929D577D94648F262EBA1157E152DB5273D10AE3A6A058CB9CD64D01267DAC82ED3B7BC1631D078C911414129CDAAA0FFB0A8E2A7ADD6F32FB09A7E98D259BFF6ED10808D1BDA58CAF7355DFF1A085A18B11657D2617447BF657140D599364E5AC8E626276AC03BC2417831D9E61B25154AFE9F2D8271E9CE22D2783803083A5A7A575774688721097DC5E4B32D118CF6317A7083BA15BA608430A8C8C6B7DA2D932D81F571603A9363AC0197AB670242D9C9180D97A10900F11FE3D9246CF14F0883
# v2_dev_pubkey = 0xB372CEC9E05E71FB3FAA08C34E3256FB312EA821638A243EF8A5DEA46FCDA33F00F88FC2933FB276D37B914F89BAD5B5D75771E342265B771995AE8F43B4DFF3F21A877FE777A8B419587C8718D36204FA1922A575AD5207D5D6B8C10F84DDCA661B731E7E7601D64D4A894F487FE1AA1DDC2A1697A3553B1DD85D5750DF2AA9D988E83C4C70BBBE4747219F9B92B199FECB16091896EBB441606DEC20F446249D5568BB51FC87BA7F85E6295FBE811B0A314408CD31921C360608A0FF7F87BD733560FE1C96E472834CAB6BE016C35727754273125089BE043FD3B26F0B2DE141E05990CE922F1702DA0A2F4E9F8760D0FA712DDB9928E0CDAC14501ED5E2C3
ChunkListHeader = struct.Struct('<4sIBBBxQQQ')
assert ChunkListHeader.size == 0x24
Chunk = struct.Struct('<I32s')
assert Chunk.size == 0x24
def parse_chunklist(path):
with open(path, 'rb') as f:
hash_ctx = hashlib.sha256()
data = f.read(ChunkListHeader.size)
hash_ctx.update(data)
magic, header_size, file_version, chunk_method, signature_method, chunk_count, chunk_offset, signature_offset = ChunkListHeader.unpack(data)
assert magic == b'CNKL'
assert header_size == ChunkListHeader.size
assert file_version == 1
assert chunk_method == 1
assert signature_method in [1, 2]
assert chunk_count > 0
assert chunk_offset == 0x24
assert signature_offset == chunk_offset + Chunk.size * chunk_count
for i in range(chunk_count):
data = f.read(Chunk.size)
hash_ctx.update(data)
chunk_size, chunk_sha256 = Chunk.unpack(data)
yield chunk_size, chunk_sha256
digest = hash_ctx.digest()
if signature_method == 1:
data = f.read(256)
assert len(data) == 256
signature = int.from_bytes(data, 'little')
plaintext = 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200000000000000000000000000000000000000000000000000000000000000000 | int.from_bytes(digest, 'big')
assert pow(signature, 0x10001, v1_prod_pubkey) == plaintext
elif signature_method == 2:
data = f.read(32)
assert data == digest
else:
raise NotImplementedError
assert f.read(1) == b''
def check_chunklist(path, chunklist_path):
with open(path, 'rb') as f:
for chunk_size, chunk_sha256 in parse_chunklist(chunklist_path):
chunk = f.read(chunk_size)
assert len(chunk) == chunk_size
assert hashlib.sha256(chunk).digest() == chunk_sha256
assert f.read(1) == b''
def main():
parser = argparse.ArgumentParser()
parser.add_argument('vmdir', type=Path)
args = parser.parse_args()
vmdir = args.vmdir
check_chunklist(vmdir / 'RecoveryImage.dmg', vmdir / 'RecoveryImage.chunklist')
if __name__ == "__main__":
main()

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

12
debian/control vendored
View File

@ -5,30 +5,26 @@ Maintainer: Martin Wimpress <code@wimpress.io>
Build-Depends:
debhelper-compat (= 12),
Standards-Version: 4.5.1
Homepage: https://github.com/quickemu-project/quickemu
Vcs-Browser: https://github.com/quickemu-project/quickemu
Vcs-Git: https://github.com/quickemu-project/quickemu.git
Homepage: https://github.com/wimpysworld/quickemu
Vcs-Browser: https://github.com/wimpysworld/quickemu
Vcs-Git: https://github.com/wimpysworld/quickemu.git
Rules-Requires-Root: no
Package: quickemu
Architecture: all
Depends:
coreutils,
curl,
genisoimage,
jq,
mesa-utils,
pciutils,
procps,
python3-minimal,
qemu-system (>= 6.0),
base-files (<< 13~) | qemu-system-modules-spice,
socat,
spice-client-gtk,
swtpm,
usbutils,
util-linux,
uuid-runtime,
wget,
x11-xserver-utils,
xdg-user-dirs,
zsync,

6
debian/copyright vendored
View File

@ -1,10 +1,10 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: quickemu
Upstream-Contact: Martin Wimpress <code@wimpress.io>
Source: https://github.com/quickemu-project/quickemu
Source: https://github.com/wimpysworld/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

4
debian/install vendored
View File

@ -1,4 +1,4 @@
chunkcheck usr/bin
macrecovery 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 +0,0 @@
{ lib,
mkShell,
pkgs,
stdenv,
}:
mkShell {
packages = with pkgs; ([
cdrtools
curl
gawk
gnugrep
gnused
jq
pciutils
procps
python3
qemu_full
samba
socat
spice-gtk
swtpm
unzip
util-linux
xorg.xrandr
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
'';
}

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
@ -28,20 +26,17 @@ install_bins:
install -d $(DESTDIR)$(bindir)
install -m 755 ../quickget $(DESTDIR)$(bindir)
install -m 755 ../quickemu $(DESTDIR)$(bindir)
install -m 755 ../quickreport $(DESTDIR)$(bindir)
install -m 755 ../chunkcheck $(DESTDIR)$(bindir)
install -m 755 ../macrecovery $(DESTDIR)$(bindir)
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
rm -f $(DESTDIR)$(bindir)/macrecovery
rm -f $(DESTDIR)$(bindir)/chunkcheck
.PHONY: all

View File

@ -1,7 +1,8 @@
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 $@ $<
MANPAGE.md = $(PANDOC) --standalone $(PANDOCFLAGS) --to man
%.$(MANSECTION): %.$(MANSECTION).md
$(MANPAGE.md) $< -o $@

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
.\" Automatically generated by Pandoc 3.6.1
.\" Automatically generated by Pandoc 3.1.8
.\"
.TH "QUICKEMU_CONF" "5" "December 30, 2024" "quickemu_conf" "Quickemu Configuration Manual"
.TH "QUICKEMU_CONF" "1" "October 24, 2023" "quickemu_conf" "Quickemu Configuration Manual"
.SH NAME
quickemu_conf \- Options and parameters in the quickemu <vm>.conf
quickemu_conf - Options and parameters in the quickemu <vm>.conf
.SH DESCRIPTION
\f[B]quickemu\f[R] will create and run highly optimised desktop virtual
machines for Linux, macOS and Windows.
@ -50,7 +50,7 @@ serial_telnet_host=\[dq]localhost\[dq]
usb_controller=\[dq]ehci\[dq]
# options: ps2, usb, virtio
keyboard=\[dq]usb\[dq]
keyboard_layout=\[dq]en\-us\[dq]
keyboard_layout=\[dq]en-us\[dq]
# options: ps2, usb, tablet, virtio
mouse=\[dq]tablet\[dq]
.EE
@ -58,16 +58,16 @@ mouse=\[dq]tablet\[dq]
.IP
.EX
guest_os=\[dq]linux\[dq]
disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq]
iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq]
disk_img=\[dq]debian-bullseye/disk.qcow2\[dq]
iso=\[dq]debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso\[dq]
.EE
.PP
The default macOS configuration looks like this:
.IP
.EX
guest_os=\[dq]macos\[dq]
img=\[dq]macos\-catalina/RecoveryImage.img\[dq]
disk_img=\[dq]macos\-catalina/disk.qcow2\[dq]
img=\[dq]macos-catalina/RecoveryImage.img\[dq]
disk_img=\[dq]macos-catalina/disk.qcow2\[dq]
macos_release=\[dq]catalina\[dq]
.EE
.IP \[bu] 2
@ -89,9 +89,9 @@ The default Windows 11 configuration looks like this:
.IP
.EX
guest_os=\[dq]windows\[dq]
disk_img=\[dq]windows\-11/disk.qcow2\[dq]
iso=\[dq]windows\-11/Win11_EnglishInternational_x64.iso\[dq]
fixed_iso=\[dq]windows\-11/virtio\-win.iso\[dq]
disk_img=\[dq]windows-11/disk.qcow2\[dq]
iso=\[dq]windows-11/Win11_EnglishInternational_x64.iso\[dq]
fixed_iso=\[dq]windows-11/virtio-win.iso\[dq]
tpm=\[dq]on\[dq]
secureboot=\[dq]on\[dq]
.EE
@ -104,13 +104,13 @@ drivers.
.IP \[bu] 2
\f[CR]tpm=\[dq]on\[dq]\f[R] instructs \f[CR]quickemu\f[R] to create a
software emulated TPM device using \f[CR]swtpm\f[R].
.SS BIOS and EFI
.SH BIOS and EFI
Since Quickemu 2.1.0 \f[CR]efi\f[R] is the default boot option.
If you want to override this behaviour then add the following line to
you VM configuration to enable legacy BIOS.
.IP \[bu] 2
\f[CR]boot=\[dq]legacy\[dq]\f[R] \- Enable Legacy BIOS boot
.SS Tuning CPU cores, RAM & disks
\f[CR]boot=\[dq]legacy\[dq]\f[R] - Enable Legacy BIOS boot
.SH Tuning CPU cores, RAM & disks
By default, Quickemu will calculate the number of CPUs cores and RAM to
allocate to a VM based on the specifications of your host computer.
You can override this default behaviour and tune the VM configuration to
@ -118,13 +118,13 @@ your liking.
.PP
Add additional lines to your virtual machine configuration:
.IP \[bu] 2
\f[CR]cpu_cores=\[dq]4\[dq]\f[R] \- Specify the number of CPU cores
\f[CR]cpu_cores=\[dq]4\[dq]\f[R] - Specify the number of CPU cores
allocated to the VM
.IP \[bu] 2
\f[CR]ram=\[dq]4G\[dq]\f[R] \- Specify the amount of RAM to allocate to
\f[CR]ram=\[dq]4G\[dq]\f[R] - Specify the amount of RAM to allocate to
the VM
.IP \[bu] 2
\f[CR]disk_size=\[dq]16G\[dq]\f[R] \- Specify the size of the virtual
\f[CR]disk_size=\[dq]16G\[dq]\f[R] - Specify the size of the virtual
disk allocated to the VM
.SS Disk preallocation
Preallocation mode (allowed values: \f[CR]off\f[R] (default),
@ -137,32 +137,29 @@ the system disk image by adding a line like this to your VM
configuration.
.IP \[bu] 2
\f[CR]preallocation=\[dq]metadata\[dq]\f[R]
.SS CD\-ROM disks
.SS CD-ROM disks
If you want to expose an ISO image from the host to guest add the
following line to the VM configuration:
.IP \[bu] 2
\f[CR]fixed_iso=\[dq]/path/to/image.iso\[dq]\f[R]
.SS Floppy disks
If you\[aq]re like \c
.UR https://popey.com
Alan Pope
.UE \c
\ you\[aq]ll probably want to mount a floppy disk image in the guest.
If you\[cq]re like Alan Pope (https://popey.com) you\[cq]ll probably
want to mount a floppy disk image in the guest.
To do so add the following line to the VM configuration:
.IP \[bu] 2
\f[CR]floppy=\[dq]/path/to/floppy.img\[dq]\f[R]
.SS File Sharing
.SH File Sharing
All File Sharing options will only expose \f[CR]\[ti]/Public\f[R] (or
localised variations) for the current user to the guest VMs.
.SS Samba 🐧 🍏 🪟
If \f[CR]smbd\f[R] is available on the host, Quickemu will automatically
enable the built\-in QEMU support for exposing a Samba share from the
enable the built-in QEMU support for exposing a Samba share from the
host to the guest.
.PP
You can install the minimal Samba components on Ubuntu using:
.IP
.EX
sudo apt install \-\-no\-install\-recommends samba
sudo apt install --no-install-recommends samba
.EE
.PP
If everything is set up correctly, the \f[CR]smbd\f[R] address will be
@ -170,21 +167,20 @@ printed when the virtual machine is started.
For example:
.IP
.EX
\- smbd: On guest: smb://10.0.2.4/qemu
- smbd: On guest: smb://10.0.2.4/qemu
.EE
.PP
If using a Windows guest, right\-click on \[dq]This PC\[dq], click
\[dq]Add a network location\[dq], and paste this address, removing
If using a Windows guest, right-click on \[lq]This PC\[rq], click
\[lq]Add a network location\[rq], and paste this address, removing
\f[CR]smb:\f[R] and replacing forward slashes with backslashes (in this
example \f[CR]\[rs]\[rs]10.0.2.4\[rs]qemu\f[R]).
.SS SPICE WebDAV 🐧 🪟
.IP \[bu] 2
TBD
.SS VirtIO\-9P 🐧 🍏
.SS VirtIO-9P 🐧 🍏
.IP \[bu] 2
TBD
.SS Networking
.SS Port forwarding
.SH Network port forwarding
Add an additional line to your virtual machine configuration.
For example:
.IP \[bu] 2
@ -195,12 +191,12 @@ In the example above:
Port 8123 on the host is forwarded to port 8123 on the guest.
.IP \[bu] 2
Port 8888 on the host is forwarded to port 80 on the guest.
.SS Disable networking
.SH Disable networking
To completely disable all network interfaces in a guest VM add this
additional line to your virtual machine configuration:
.IP \[bu] 2
\f[CR]network=\[dq]none\[dq]\f[R]
.SS Restricted networking
.SH Restricted networking
You can isolate the guest from the host (and broader network) using the
restrict option, which will restrict networking to just the guest and
any virtual devices.
@ -210,7 +206,7 @@ phoning home while still providing a network inside the guest.
Add this additional line to your virtual machine configuration:
.IP \[bu] 2
\f[CR]network=\[dq]restrict\[dq]\f[R]
.SS Bridged networking
.SH Bridged networking
Connect your virtual machine to a preconfigured network bridge.
Add an additional line to your virtual machine configuration:
.IP \[bu] 2
@ -220,76 +216,21 @@ If you want to have a persistent MAC address for your bridged network
interface in the guest VM you can add \f[CR]macaddr\f[R] to the virtual
machine configuration.
QEMU requires that the MAC address is in the range:
\f[B]52:54:00:AB:00:00 \- 52:54:00:AB:FF:FF\f[R]
\f[B]52:54:00:AB:00:00 - 52:54:00:AB:FF:FF\f[R]
.PP
So you can generate your own MAC addresses with:
.IP \[bu] 2
\f[CR]macaddr=\[dq]52:54:00:AB:51:AE\[dq]\f[R]
.SS USB redirection
Quickemu supports USB redirection via SPICE pass\-through and host
pass\-through.
Quickemu supports USB redirection via SPICE pass\-through and host
pass\-through.
.PP
\f[B]NOTE!\f[R] When a USB device is redirected from the host, it will
not be usable by host operating system until the guest redirection is
stopped.
Therefore, do not redirect the input devices, such as the keyboard and
mouse, as it will be difficult (or impossible) to revert the situation.
.SH USB redirection
Quickemu supports USB redirection via SPICE pass-through and host
pass-through.
.SS SPICE redirection (recommended)
Using SPICE for USB pass\-through is easiest as it doesn\[aq]t require
any elevated permission:
.PP
Both \f[CR]spicy\f[R] from \c
.UR https://www.spice-space.org/spice-gtk.html
spice\-gtk
.UE \c
\ (\f[I]Input \-> Select USB Devices for redirection\f[R]) and
\f[CR]remote\-viewer\f[R] from \c
.UR https://gitlab.com/virt-viewer/virt-viewer
virt\-viewer
.UE \c
\ (\f[I]File \-> USB device selection\f[R]) support this feature.
.IP \[bu] 2
Start Quickemu with \f[CR]\-\-display spice\f[R] and then
.IP \[bu] 2
Select \f[CR]Input\f[R] \-> \f[CR]Select USB Device for redirection\f[R]
from the menu to choose which device(s) you want to attach to the guest.
.IP \[bu] 2
**\f[CR]spicy\f[R] (default)
.RS 2
.IP \[bu] 2
**Select \f[CR]Input\f[R] \->
Using SPICE for USB pass-through is easiest as it doesn\[cq]t require
any elevated permission, start Quickemu with \f[CR]--display spice\f[R]
and then select \f[CR]Input\f[R] ->
\f[CR]Select USB Device for redirection\f[R] from the menu to choose
which device(s) you want to attach to the guest.
.RE
.IP \[bu] 2
**\f[CR]remote\-viewer\f[R]
.RS 2
.IP \[bu] 2
**Select \f[CR]File\f[R] \-> \f[CR]USB device selection\f[R] from the
menu to choose which device(s) you want to attach to the guest.
.RE
.PP
To ensure that this functionality works as expected, make sure that you
have installed the necessary SPICE Guest Tools on the virtual machine.
.SS Enabling SPICE redirection on NixOS
On NixOS, if you encounter this error:
.IP
.EX
Error setting facl: Operation not permitted
.EE
.PP
Try setting \c
.UR https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec
the following option
.UE \c
:
.IP
.EX
virtualisation.spiceUSBRedirection.enable = true;
.EE
.SS Host redirection (\f[B]NOT Recommended\f[R])
.SS Host redirection \f[B]NOT Recommended\f[R]
\f[B]USB host redirection is not recommended\f[R], it is provided purely
for backwards compatibility to older versions of Quickemu.
Using SPICE is preferred, see above.
@ -312,12 +253,12 @@ the appropriate commands to modify the USB device(s) access permissions,
like this:
.IP
.EX
\- USB: Host pass\-through requested:
\- Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes:
sudo chown \-v root:user /dev/bus/usb/001/005
- USB: Host pass-through requested:
- Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes:
sudo chown -v root:user /dev/bus/usb/001/005
ERROR! USB permission changes are required 👆
.EE
.SS TPM
.SH TPM
Since Quickemu 2.2.0 a software emulated TPM device can be added to
guest virtual machines.
Just add \f[CR]tpm=\[dq]on\[dq]\f[R] to your VM configuration.
@ -326,13 +267,10 @@ virtual machines.
.SH AUTHORS
Written by Martin Wimpress.
.SH BUGS
Submit bug reports online at: \c
.UR https://github.com/quickemu-project/quickemu/issues
.UE \c
Submit bug reports online at:
<https://github.com/quickemu-project/quickemu/issues>
.SH SEE ALSO
Full sources at: \c
.UR https://github.com/quickemu-project/quickemu
.UE \c
Full sources at: <https://github.com/quickemu-project/quickemu>
.PP
quickget(1), quickemu(1), quickgui(1)
.SH AUTHORS

View File

@ -1,9 +1,9 @@
---
author: Martin Wimpress
date: December 30, 2024
date: October 24, 2023
footer: quickemu_conf
header: Quickemu Configuration Manual
section: 5
section: 1
title: QUICKEMU_CONF
---
@ -23,7 +23,7 @@ installation ISO and QEMU disk for the installed VM
These are the options and defaults for the \<vm\>.conf file
``` shell
``` bash
# Lowercase variables are used in the VM config file only
boot="efi"
cpu_cores=""
@ -67,7 +67,7 @@ mouse="tablet"
# EXAMPLES
``` shell
``` bash
guest_os="linux"
disk_img="debian-bullseye/disk.qcow2"
iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
@ -75,24 +75,24 @@ iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
The default macOS configuration looks like this:
``` shell
``` bash
guest_os="macos"
img="macos-catalina/RecoveryImage.img"
disk_img="macos-catalina/disk.qcow2"
macos_release="catalina"
```
- `guest_os="macos"` instructs Quickemu to optimise for macOS.
- `macos_release="catalina"` instructs Quickemu to optimise for a
particular macOS release.
- For example VirtIO Network and Memory Ballooning are available in
Big Sur and newer, but not previous releases.
- And VirtIO Block Media (disks) are supported/stable in Catalina and
newer.
- `guest_os="macos"` instructs Quickemu to optimise for macOS.
- `macos_release="catalina"` instructs Quickemu to optimise for a
particular macOS release.
- For example VirtIO Network and Memory Ballooning are available
in Big Sur and newer, but not previous releases.
- And VirtIO Block Media (disks) are supported/stable in Catalina
and newer.
The default Windows 11 configuration looks like this:
``` shell
``` bash
guest_os="windows"
disk_img="windows-11/disk.qcow2"
iso="windows-11/Win11_EnglishInternational_x64.iso"
@ -101,20 +101,20 @@ tpm="on"
secureboot="on"
```
- `guest_os="windows"` instructs `quickemu` to optimise for Windows.
- `fixed_iso=` specifies the ISO image that provides VirtIO drivers.
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
- `guest_os="windows"` instructs `quickemu` to optimise for Windows.
- `fixed_iso=` specifies the ISO image that provides VirtIO drivers.
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
### BIOS and EFI
# BIOS and EFI
Since Quickemu 2.1.0 `efi` is the default boot option. If you want to
override this behaviour then add the following line to you VM
configuration to enable legacy BIOS.
- `boot="legacy"` - Enable Legacy BIOS boot
- `boot="legacy"` - Enable Legacy BIOS boot
### Tuning CPU cores, RAM & disks
# Tuning CPU cores, RAM & disks
By default, Quickemu will calculate the number of CPUs cores and RAM to
allocate to a VM based on the specifications of your host computer. You
@ -123,12 +123,13 @@ your liking.
Add additional lines to your virtual machine configuration:
- `cpu_cores="4"` - Specify the number of CPU cores allocated to the VM
- `ram="4G"` - Specify the amount of RAM to allocate to the VM
- `disk_size="16G"` - Specify the size of the virtual disk allocated to
the VM
- `cpu_cores="4"` - Specify the number of CPU cores allocated to the
VM
- `ram="4G"` - Specify the amount of RAM to allocate to the VM
- `disk_size="16G"` - Specify the size of the virtual disk allocated
to the VM
### Disk preallocation
## Disk preallocation
Preallocation mode (allowed values: `off` (default), `metadata`,
`falloc`, `full`). An image with preallocated metadata is initially
@ -138,29 +139,29 @@ Specify what disk preallocation should be used, if any, when creating
the system disk image by adding a line like this to your VM
configuration.
- `preallocation="metadata"`
- `preallocation="metadata"`
### CD-ROM disks
## CD-ROM disks
If you want to expose an ISO image from the host to guest add the
following line to the VM configuration:
- `fixed_iso="/path/to/image.iso"`
- `fixed_iso="/path/to/image.iso"`
### Floppy disks
## Floppy disks
If you're like [Alan Pope](https://popey.com) you'll probably want to
mount a floppy disk image in the guest. To do so add the following line
to the VM configuration:
- `floppy="/path/to/floppy.img"`
- `floppy="/path/to/floppy.img"`
### File Sharing
# File Sharing
All File Sharing options will only expose `~/Public` (or localised
variations) for the current user to the guest VMs.
#### Samba 🐧 🍏 🪟
## Samba 🐧 🍏 🪟
If `smbd` is available on the host, Quickemu will automatically enable
the built-in QEMU support for exposing a Samba share from the host to
@ -168,7 +169,7 @@ the guest.
You can install the minimal Samba components on Ubuntu using:
``` shell
``` bash
sudo apt install --no-install-recommends samba
```
@ -181,36 +182,34 @@ If using a Windows guest, right-click on "This PC", click "Add a network
location", and paste this address, removing `smb:` and replacing forward
slashes with backslashes (in this example `\\10.0.2.4\qemu`).
#### SPICE WebDAV 🐧 🪟
## SPICE WebDAV 🐧 🪟
- TBD
- TBD
#### VirtIO-9P 🐧 🍏
## VirtIO-9P 🐧 🍏
- TBD
- TBD
### Networking
#### Port forwarding
# Network port forwarding
Add an additional line to your virtual machine configuration. For
example:
- `port_forwards=("8123:8123" "8888:80")`
- `port_forwards=("8123:8123" "8888:80")`
In the example above:
- Port 8123 on the host is forwarded to port 8123 on the guest.
- Port 8888 on the host is forwarded to port 80 on the guest.
- Port 8123 on the host is forwarded to port 8123 on the guest.
- Port 8888 on the host is forwarded to port 80 on the guest.
#### Disable networking
# Disable networking
To completely disable all network interfaces in a guest VM add this
additional line to your virtual machine configuration:
- `network="none"`
- `network="none"`
#### Restricted networking
# Restricted networking
You can isolate the guest from the host (and broader network) using the
restrict option, which will restrict networking to just the guest and
@ -220,14 +219,14 @@ This can be used to prevent software running inside the guest from
phoning home while still providing a network inside the guest. Add this
additional line to your virtual machine configuration:
- `network="restrict"`
- `network="restrict"`
#### Bridged networking
# Bridged networking
Connect your virtual machine to a preconfigured network bridge. Add an
additional line to your virtual machine configuration:
- `network="br0"`
- `network="br0"`
If you want to have a persistent MAC address for your bridged network
interface in the guest VM you can add `macaddr` to the virtual machine
@ -236,57 +235,21 @@ configuration. QEMU requires that the MAC address is in the range:
So you can generate your own MAC addresses with:
- `macaddr="52:54:00:AB:51:AE"`
- `macaddr="52:54:00:AB:51:AE"`
### USB redirection
# USB redirection
Quickemu supports USB redirection via SPICE pass-through and host
pass-through. Quickemu supports USB redirection via SPICE pass-through
and host pass-through.
pass-through.
**NOTE!** When a USB device is redirected from the host, it will not be
usable by host operating system until the guest redirection is stopped.
Therefore, do not redirect the input devices, such as the keyboard and
mouse, as it will be difficult (or impossible) to revert the situation.
#### SPICE redirection (recommended)
## SPICE redirection (recommended)
Using SPICE for USB pass-through is easiest as it doesn't require any
elevated permission:
elevated permission, start Quickemu with `--display spice` and then
select `Input` -\> `Select USB Device for redirection` from the menu to
choose which device(s) you want to attach to the guest.
Both `spicy` from
[spice-gtk](https://www.spice-space.org/spice-gtk.html) (*Input -\>
Select USB Devices for redirection*) and `remote-viewer` from
[virt-viewer](https://gitlab.com/virt-viewer/virt-viewer) (*File -\> USB
device selection*) support this feature.
- Start Quickemu with `--display spice` and then
- Select `Input` -\> `Select USB Device for redirection` from the menu
to choose which device(s) you want to attach to the guest.
- \*\*`spicy` (default)
- \*\*Select `Input` -\> `Select USB Device for redirection` from the
menu to choose which device(s) you want to attach to the guest.
- \*\*`remote-viewer`
- \*\*Select `File` -\> `USB device selection` from the menu to choose
which device(s) you want to attach to the guest.
To ensure that this functionality works as expected, make sure that you
have installed the necessary SPICE Guest Tools on the virtual machine.
##### Enabling SPICE redirection on NixOS
On NixOS, if you encounter this error:
Error setting facl: Operation not permitted
Try setting [the following
option](https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec):
``` nix
virtualisation.spiceUSBRedirection.enable = true;
```
#### Host redirection (**NOT Recommended**)
## Host redirection **NOT Recommended**
**USB host redirection is not recommended**, it is provided purely for
backwards compatibility to older versions of Quickemu. Using SPICE is
@ -295,14 +258,14 @@ preferred, see above.
Add an additional line to your virtual machine configuration. For
example:
- `usb_devices=("046d:082d" "046d:085e")`
- `usb_devices=("046d:082d" "046d:085e")`
In the example above:
- The USB device with vendor_id 046d and product_id 082d will be exposed
to the guest.
- The USB device with vendor_id 046d and product_id 085e will be exposed
to the guest.
- The USB device with vendor_id 046d and product_id 082d will be
exposed to the guest.
- The USB device with vendor_id 046d and product_id 085e will be
exposed to the guest.
If the USB devices are not writable, `quickemu` will display the
appropriate commands to modify the USB device(s) access permissions,
@ -313,7 +276,7 @@ like this:
sudo chown -v root:user /dev/bus/usb/001/005
ERROR! USB permission changes are required 👆
### TPM
# TPM
Since Quickemu 2.2.0 a software emulated TPM device can be added to
guest virtual machines. Just add `tpm="on"` to your VM configuration.

View File

@ -1,8 +1,8 @@
.\" Automatically generated by Pandoc 3.6.1
.\" Automatically generated by Pandoc 3.1.8
.\"
.TH "QUICKGET" "1" "December 30, 2024" "quickget" "Quickget User Manual"
.TH "QUICKGET" "1" "October 24, 2023" "quickget" "Quickget User Manual"
.SH NAME
quickget \- download and prepare materials for building a quickemu VM
quickget - download and prepare materials for building a quickemu VM
.SH SYNOPSIS
\f[B]quickget\f[R] [\f[I]os\f[R]] [\f[I]release\f[R]]
[\f[I]edition\f[R]] | [\f[I]OPTION\f[R]]*
@ -11,95 +11,61 @@ quickget \- download and prepare materials for building a quickemu VM
configuration for \f[CR]quickemu\f[R] to use to build and run
.SH OPTIONS
.TP
\f[B]version | -version | \[en]version\f[R]
show version (from Quickemu)
.TP
\f[B]list | list_csv | list_json\f[R]
provide a csv list of all supported guest OSes, versions and variants.
.TP
\f[B][OS] [Release] [Edition]\f[R]
specify the OS and release (and optional edition) if insufficient input
is provided a list of missing options will be reported and the script
will exit.
Editions may not apply and will be defaulted if not provided.
.TP
\f[B]\-\-download\f[R] [edition]
Download image; no VM configuration
.TP
\f[B]\-\-create\-config\f[R] [path/url]
Create VM config for a OS image
.TP
\f[B]\-\-open\-homepage\f[R]
Open homepage for the OS
.TP
\f[B]\-\-show\f[R] [os]
Show OS information
.TP
\f[B]\-\-url\f[R] [os] [release] [edition]
Show image URL(s)
.TP
\f[B]\-\-check\f[R] [os] [release] [edition]
Check image URL(s)
.TP
\f[B]\-\-list\f[R]
List all supported systems
.TP
\f[B]\-\-list\-csv\f[R]
List everything in csv format
.TP
\f[B]\-\-list\-json\f[R]
List everything in json format
.TP
\f[B]\-\-version\f[R]
Show version
.TP
\f[B]\-\-help\f[R]
Show this help message
.SH NOTES
.SS Creating Linux guests 🐧
.SS Ubuntu
.SS Ubuntu Guest
\f[CR]quickget\f[R] will automatically download an Ubuntu release and
create the virtual machine configuration.
.IP
.EX
quickget ubuntu 22.04
quickemu \-\-vm ubuntu\-22.04.conf
quickemu --vm ubuntu-22.04.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
Post\-install:
Post-install:
.RS 2
.IP \[bu] 2
Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection
.RS 2
.IP \[bu] 2
\f[CR]sudo apt install spice\-vdagent\f[R]
\f[CR]sudo apt install spice-vdagent\f[R]
.RE
.IP \[bu] 2
Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
to enable file sharing.
.RS 2
.IP \[bu] 2
\f[CR]sudo apt install spice\-webdavd\f[R]
\f[CR]sudo apt install spice-webdavd\f[R]
.RE
.RE
.SS Ubuntu daily\-live images
\f[CR]quickget\f[R] can also download/refresh daily\-live images via
.SS Ubuntu devel (daily-live) images
\f[CR]quickget\f[R] can also download/refresh devel images via
\f[CR]zsync\f[R] for Ubuntu developers and testers.
.IP
.EX
quickget ubuntu daily\-live
quickemu \-\-vm ubuntu\-daily\-live.conf
quickget ubuntu devel
quickemu --vm ubuntu-devel.conf
.EE
.PP
You can run \f[CR]quickget ubuntu daily\-live\f[R] to refresh your daily
You can run \f[CR]quickget ubuntu devel\f[R] to refresh your daily
development image as often as you like, it will even automatically
switch to a new series.
.SS Ubuntu Flavours
All the official Ubuntu flavours are supported, just replace
\f[CR]ubuntu\f[R] with your preferred flavour.
.PP
The project \c
.UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines
wiki
.UE \c
\ may have further information.
.IP \[bu] 2
\f[CR]edubuntu\f[R] (Edubuntu)
.IP \[bu] 2
@ -107,66 +73,27 @@ wiki
.IP \[bu] 2
\f[CR]lubuntu\f[R] (Lubuntu)
.IP \[bu] 2
\f[CR]ubuntu\-budgie\f[R] (Ubuntu Budgie)
\f[CR]ubuntu-budgie\f[R] (Ubuntu Budgie)
.IP \[bu] 2
\f[CR]ubuntucinnamon\f[R] (Ubuntu Cinnamon)
.IP \[bu] 2
\f[CR]ubuntukylin\f[R] (Ubuntu Kylin)
.IP \[bu] 2
\f[CR]ubuntu\-mate\f[R] (Ubuntu MATE)
\f[CR]ubuntu-mate\f[R] (Ubuntu MATE)
.IP \[bu] 2
\f[CR]ubuntu\-server\f[R] (Ubuntu Server)
\f[CR]ubuntu-server\f[R] (Ubuntu Server)
.IP \[bu] 2
\f[CR]ubuntustudio\f[R] (Ubuntu Studio)
.IP \[bu] 2
\f[CR]ubuntu\f[R] (Ubuntu)
.IP \[bu] 2
\f[CR]ubuntu\-unity\f[R] (Ubuntu Unity)
\f[CR]ubuntu-unity\f[R] (Ubuntu Unity)
.IP \[bu] 2
\f[CR]xubuntu\f[R] (Xubuntu)
.PP
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
\-\-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
\-\-list\-csv : List everything in csv format
\-\-list\-json : List everything in json format
.EE
.PP
Here are some typical uses
.IP
.EX
# show an OS ISO download URL for {os} {release} [edition]
quickget \-\-url fedora 38 Silverblue
# test if an OS ISO is available for {os} {release} [edition]
quickget \-\-check nixos unstable plasma5
# open an OS distribution homepage in a browser
quickget \-\-open\-homepage ubuntu\-mate
# Only download image file into current directory, without creating VM
quickget \-\-download elementary 7.1
.EE
.PP
The \f[CR]\-\-url\f[R], \f[CR]\-\-check\f[R], and
\f[CR]\-\-download\f[R] options are fully functional for all operating
systems, including Windows and macOS.
.PP
Further information is available from the project \c
.UR https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features
wiki
.UE \c
.SS Other Operating Systems
\f[CR]quickget\f[R] also supports:
.IP \[bu] 2
\f[CR]alma\f[R] (AlmaLinux)
\f[CR]alma\f[R] (Alma Linux)
.IP \[bu] 2
\f[CR]alpine\f[R] (Alpine Linux)
.IP \[bu] 2
@ -180,29 +107,17 @@ wiki
.IP \[bu] 2
\f[CR]arcolinux\f[R] (Arco Linux)
.IP \[bu] 2
\f[CR]artixlinux\f[R] (Artix Linux)
.IP \[bu] 2
\f[CR]athenaos\f[R] (Athena OS)
.IP \[bu] 2
\f[CR]batocera\f[R] (Batocera)
.IP \[bu] 2
\f[CR]bazzite\f[R] (Bazzite)
.IP \[bu] 2
\f[CR]biglinux\f[R] (BigLinux)
.IP \[bu] 2
\f[CR]blendos\f[R] (BlendOS)
.IP \[bu] 2
\f[CR]bodhi\f[R] (Bodhi)
.IP \[bu] 2
\f[CR]bunsenlabs\f[R] (BunsenLabs)
\f[CR]bunsenlabs\f[R] (Bunsenlabs)
.IP \[bu] 2
\f[CR]cachyos\f[R] (CachyOS)
.IP \[bu] 2
\f[CR]centos\-stream\f[R] (CentOS Stream)
.IP \[bu] 2
\f[CR]chimeralinux\f[R] (Chimera Linux)
.IP \[bu] 2
\f[CR]crunchbang++\f[R] (Crunchbangplusplus)
\f[CR]centos-stream\f[R] (CentOS Stream)
.IP \[bu] 2
\f[CR]debian\f[R] (Debian)
.IP \[bu] 2
@ -212,8 +127,6 @@ wiki
.IP \[bu] 2
\f[CR]dragonflybsd\f[R] (DragonFlyBSD)
.IP \[bu] 2
\f[CR]easyos\f[R] (EasyOS)
.IP \[bu] 2
\f[CR]elementary\f[R] (elementary OS)
.IP \[bu] 2
\f[CR]endeavouros\f[R] (EndeavourOS)
@ -232,10 +145,6 @@ wiki
.IP \[bu] 2
\f[CR]ghostbsd\f[R] (GhostBSD)
.IP \[bu] 2
\f[CR]gnomeos\f[R] (GNOME OS)
.IP \[bu] 2
\f[CR]guix\f[R] (Guix)
.IP \[bu] 2
\f[CR]haiku\f[R] (Haiku)
.IP \[bu] 2
\f[CR]holoiso\f[R] (HoloISO)
@ -252,8 +161,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)
@ -264,12 +171,8 @@ wiki
.IP \[bu] 2
\f[CR]netbsd\f[R] (NetBSD)
.IP \[bu] 2
\f[CR]nitrux\f[R] (Nitrux)
.IP \[bu] 2
\f[CR]nixos\f[R] (NixOS)
.IP \[bu] 2
\f[CR]nwg\-shell\f[R] (nwg\-shell)
.IP \[bu] 2
\f[CR]openbsd\f[R] (OpenBSD)
.IP \[bu] 2
\f[CR]openindiana\f[R] (OpenIndiana)
@ -278,20 +181,12 @@ wiki
.IP \[bu] 2
\f[CR]oraclelinux\f[R] (Oracle Linux)
.IP \[bu] 2
\f[CR]parrotsec\f[R] (Parrot Security)
.IP \[bu] 2
\f[CR]peppermint\f[R] (PeppermintOS)
.IP \[bu] 2
\f[CR]popos\f[R] (Pop!_OS)
.IP \[bu] 2
\f[CR]porteus\f[R] (Porteus)
.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)
.IP \[bu] 2
\f[CR]rebornos\f[R] (RebornOS)
@ -302,29 +197,19 @@ wiki
.IP \[bu] 2
\f[CR]slackware\f[R] (Slackware)
.IP \[bu] 2
\f[CR]slax\f[R] (Slax)
.IP \[bu] 2
\f[CR]slint\f[R] (Slint)
.IP \[bu] 2
\f[CR]slitaz\f[R] (SliTaz)
.IP \[bu] 2
\f[CR]solus\f[R] (Solus)
.IP \[bu] 2
\f[CR]sparkylinux\f[R] (SparkyLinux)
.IP \[bu] 2
\f[CR]spirallinux\f[R] (SpiralLinux)
\f[CR]spiral\f[R] (Spiral)
.IP \[bu] 2
\f[CR]tails\f[R] (Tails)
.IP \[bu] 2
\f[CR]tinycore\f[R] (Tiny Core Linux)
.IP \[bu] 2
\f[CR]trisquel\f[R] (Trisquel\-)
\f[CR]trisquel\f[R] (Trisquel)
.IP \[bu] 2
\f[CR]truenas\-core\f[R] (TrueNAS Core)
\f[CR]truenas-core\f[R] (TrueNAS Core)
.IP \[bu] 2
\f[CR]truenas\-scale\f[R] (TrueNAS Scale)
.IP \[bu] 2
\f[CR]tuxedo\-os\f[R] (Tuxedo OS)
\f[CR]truenas-scale\f[R] (TrueNAS Scale)
.IP \[bu] 2
\f[CR]vanillaos\f[R] (Vanilla OS)
.IP \[bu] 2
@ -332,69 +217,52 @@ wiki
.IP \[bu] 2
\f[CR]vxlinux\f[R] (VX Linux)
.IP \[bu] 2
\f[CR]xerolinux\f[R] (XeroLinux)
.IP \[bu] 2
\f[CR]zorin\f[R] (Zorin OS)
.SS \c
.UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests
Custom Linux guests
.UE \c
.PP
Or you can download a Linux image and manually create a VM
configuration.
.IP \[bu] 2
Download a .iso image of a Linux distribution
.IP \[bu] 2
Create a VM configuration file; for example
\f[CR]debian\-bullseye.conf\f[R]
\f[CR]debian-bullseye.conf\f[R]
.IP
.EX
guest_os=\[dq]linux\[dq]
disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq]
iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq]
disk_img=\[dq]debian-bullseye/disk.qcow2\[dq]
iso=\[dq]debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso\[dq]
.EE
.IP \[bu] 2
Use \f[CR]quickemu\f[R] to start the virtual machine:
.IP
.EX
quickemu \-\-vm debian\-bullseye.conf
quickemu --vm debian-bullseye.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
Post\-install:
Post-install:
.RS 2
.IP \[bu] 2
Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection.
.IP \[bu] 2
Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
to enable file sharing.
.RE
.SS Supporting old Linux distros
If you want to run an old Linux , from 2016 or earlier, change the
\f[CR]guest_os\f[R] to \f[CR]linux_old\f[R].
This will enable the \f[CR]vmware\-svga\f[R] graphics driver which is
better supported on older distros.
.SS \c
.UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests
Creating macOS Guests
.UE \c
\ 🍏
\f[B]Installing macOS in a VM can be a bit finicky, if you encounter
problems, \c
.UR https://github.com/quickemu-project/quickemu/discussions
check the Discussions
.UE \c
\ for solutions or ask for help there\f[R] 🛟
.PP
.SS macOS Guest
\f[CR]quickget\f[R] automatically downloads a macOS recovery image and
creates a virtual machine configuration.
.IP
.EX
quickget macos big\-sur
quickemu \-\-vm macos\-big\-sur.conf
quickget macos catalina
quickemu --vm macos-catalina.conf
.EE
.PP
macOS \f[CR]mojave\f[R], \f[CR]catalina\f[R], \f[CR]big\-sur\f[R],
\f[CR]monterey\f[R], \f[CR]ventura\f[R] and \f[CR]sonoma\f[R] are
macOS \f[CR]high-sierra\f[R], \f[CR]mojave\f[R], \f[CR]catalina\f[R],
\f[CR]big-sur\f[R], \f[CR]monterey\f[R] and \f[CR]ventura\f[R] are
supported.
.IP \[bu] 2
Use cursor keys and enter key to select the \f[B]macOS Base System\f[R]
@ -411,9 +279,8 @@ click \f[B]Erase\f[R].
.IP \[bu] 2
Enter a \f[CR]Name:\f[R] for the disk
.IP \[bu] 2
If you are installing macOS Mojave or later (Catalina, Big Sur,
Monterey, Ventura and Sonoma), choose any of the APFS options as the
filesystem.
If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey
and Ventura), choose any of the APFS options as the filesystem.
MacOS Extended may not work.
.RE
.IP \[bu] 2
@ -441,10 +308,10 @@ disk you named
.RE
.IP \[bu] 2
Once you have finished installing macOS you will be presented with an
the out\-of\-the\-box first\-start wizard to configure various options
and set up your username and password
the out-of-the-box first-start wizard to configure various options and
set up your username and password
.IP \[bu] 2
OPTIONAL: After you have concluded the out\-of\-the\-box wizard, you may
OPTIONAL: After you have concluded the out-of-the-box wizard, you may
want to enable the TRIM feature that the computer industry created for
SSD disks.
This feature in our macOS installation will allow QuickEmu to compact
@ -463,21 +330,20 @@ on the hard disk when files are deleted:
sudo trimforce enable
.EE
.PP
You will be prompted to enter your account\[aq]s password to gain the
You will be prompted to enter your account\[cq]s password to gain the
privilege needed.
Once you\[aq]ve entered your password and pressed enter the command will
Once you\[cq]ve entered your password and pressed enter the command will
request confirmation in the form of two questions that require you to
type y (for a \[dq]yes\[dq] response) followed by enter to confirm.
.PP
type y (for a \[lq]yes\[rq] response) followed by enter to confirm.
If you press enter without first typing y the system will consider that
a negative response as though you said \[dq]no\[dq]:
a negative response as though you said \[lq]no\[rq]:
.IP
.EX
IMPORTANT NOTICE: This tool force\-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON\-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
Are you sure you with to proceed (y/N)?
.EE
.PP
And a second confirmation once you\[aq]ve confirmed the previous one:
And a second confirmation once you\[cq]ve confirmed the previous one:
.IP
.EX
Your system will immediately reboot when this is complete.
@ -491,15 +357,15 @@ The default macOS configuration looks like this:
.IP
.EX
guest_os=\[dq]macos\[dq]
img=\[dq]macos\- big\-sur/RecoveryImage.img\[dq]
disk_img=\[dq]macos\- big\-sur/disk.qcow2\[dq]
macos_release=\[dq] big\-sur\[dq]
img=\[dq]macos-catalina/RecoveryImage.img\[dq]
disk_img=\[dq]macos-catalina/disk.qcow2\[dq]
macos_release=\[dq]catalina\[dq]
.EE
.IP \[bu] 2
\f[CR]guest_os=\[dq]macos\[dq]\f[R] instructs Quickemu to optimise for
macOS.
.IP \[bu] 2
\f[CR]macos_release=\[dq] big\-sur\[dq]\f[R] instructs Quickemu to
\f[CR]macos_release=\[dq]catalina\[dq]\f[R] instructs Quickemu to
optimise for a particular macOS release.
.RS 2
.IP \[bu] 2
@ -509,60 +375,49 @@ Sur and newer, but not previous releases.
And VirtIO Block Media (disks) are supported/stable in Catalina and
newer.
.RE
.SH macOS compatibility
.SS macOS compatibility
There are some considerations when running macOS via Quickemu.
.IP \[bu] 2
Supported macOS releases:
.RS 2
.IP \[bu] 2
High Sierra
.IP \[bu] 2
Mojave
.IP \[bu] 2
Catalina
Catalina \f[B](Recommended)\f[R]
.IP \[bu] 2
Big Sur
.IP \[bu] 2
Monterey
.IP \[bu] 2
Ventura
.IP \[bu] 2
Sonoma
.RE
.IP \[bu] 2
\f[CR]quickemu\f[R] will automatically download the required \c
.UR https://github.com/acidanthera/OpenCorePkg
OpenCore
.UE \c
\ bootloader and OVMF firmware from \c
.UR https://github.com/kholia/OSX-KVM
OSX\-KVM
.UE \c
\&.
\f[CR]quickemu\f[R] will automatically download the required
OpenCore (https://github.com/acidanthera/OpenCorePkg) bootloader and
OVMF firmware from OSX-KVM (https://github.com/kholia/OSX-KVM).
.IP \[bu] 2
Optimised by default, but no GPU acceleration is available.
.RS 2
.IP \[bu] 2
Host CPU vendor is detected and guest CPU is optimised accordingly.
.IP \[bu] 2
\c
.UR https://www.kraxel.org/blog/2019/06/macos-qemu-guest/
VirtIO Block Media
.UE \c
\ is used for the system disk where supported.
VirtIO Block
Media (https://www.kraxel.org/blog/2019/06/macos-qemu-guest/) is used
for the system disk where supported.
.IP \[bu] 2
\c
.UR http://philjordan.eu/osx-virt/
VirtIO \f[CR]usb\-tablet\f[R]
.UE \c
\ is used for the mouse.
VirtIO \f[CR]usb-tablet\f[R] (http://philjordan.eu/osx-virt/) is used
for the mouse.
.IP \[bu] 2
VirtIO Network (\f[CR]virtio\-net\f[R]) is supported and enabled on
macOS Big Sur and newer, but earlier releases use \f[CR]vmxnet3\f[R].
VirtIO Network (\f[CR]virtio-net\f[R]) is supported and enabled on macOS
Big Sur and newer but previous releases use \f[CR]vmxnet3\f[R].
.IP \[bu] 2
VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and
newer but disabled for other support macOS releases.
.RE
.IP \[bu] 2
USB host and SPICE pass\-through is:
USB host and SPICE pass-through is:
.RS 2
.IP \[bu] 2
UHCI (USB 2.0) on macOS Catalina and earlier.
@ -570,47 +425,31 @@ UHCI (USB 2.0) on macOS Catalina and earlier.
XHCI (USB 3.0) on macOS Big Sur and newer.
.RE
.IP \[bu] 2
Display resolution can be changed via \f[CR]quickemu\f[R] using
\f[CR]\-\-width\f[R] and \f[CR]\-\-height\f[R] command line arguments.
Display resolution can only be changed via macOS System Preferences.
.IP \[bu] 2
\f[B]Full Duplex audio requires \c
.UR https://github.com/chris1111/VoodooHDA-OC
VoodooHDA OC
.UE \c
\ or pass\-through a USB audio\-device to the macOS guest VM\f[R].
.RS 2
\f[B]Full Duplex audio requires VoodooHDA
OC (https://github.com/chris1111/VoodooHDA-OC) or pass-through a USB
audio-device to the macOS guest VM\f[R].
.IP \[bu] 2
NOTE!
\c
.UR https://disable-gatekeeper.github.io/
Gatekeeper
.UE \c
\ and \c
.UR https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
System Integrity Protection (SIP)
.UE \c
\ need to be disabled to install VoodooHDA OC
.RE
Gatekeeper (https://disable-gatekeeper.github.io/) and System Integrity
Protection
(SIP) (https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection)
need to be disabled to install VoodooHDA OC
.IP \[bu] 2
File sharing between guest and host is available via \c
.UR https://wiki.qemu.org/Documentation/9psetup
virtio\-9p
.UE \c
\ and \c
.UR https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24
SPICE webdavd
.UE \c
\&.
File sharing between guest and host is available via
virtio-9p (https://wiki.qemu.org/Documentation/9psetup) and SPICE
webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24).
.IP \[bu] 2
Copy/paste via SPICE agent is \f[B]not available on macOS\f[R].
.SH macOS App Store
If you see \f[I]\[dq]Your device or computer could not be
verified\[dq]\f[R] when you try to login to the App Store, make sure
.SS macOS App Store
If you see \f[I]\[lq]Your device or computer could not be
verified\[rq]\f[R] when you try to login to the App Store, make sure
that your wired ethernet device is \f[CR]en0\f[R].
Use \f[CR]ifconfig\f[R] in a terminal to verify this.
.PP
If the wired ethernet device is not \f[CR]en0\f[R], then then go to
\f[I]System Preferences\f[R] \-> \f[I]Network\f[R], delete all the
\f[I]System Preferences\f[R] -> \f[I]Network\f[R], delete all the
network devices and apply the changes.
Next, open a terminal and run the following:
.IP
@ -619,62 +458,17 @@ sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
.EE
.PP
Now reboot, and the App Store should work.
.PP
There may be further advice and information about macOS guests in the
project \c
.UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests
wiki
.UE \c
\&.
.SS \c
.UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines
Creating Windows guests
.UE \c
\ 🪟
\f[CR]quickget\f[R] can download \c
.UR https://www.microsoft.com/software-download/windows10
\f[B]Windows 10\f[R]
.UE \c
\ and \c
.UR https://www.microsoft.com/software-download/windows11
\f[B]Windows 11\f[R]
.UE \c
\ automatically and create an optimised virtual machine configuration.
This configuration also includes the \c
.UR https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/
VirtIO drivers for Windows
.UE \c
\&.
.PP
\f[B]Windows 8.1\f[R] is also supported but doesn\[aq]t feature any
automated installation or driver optimisation.
.PP
\f[CR]quickget\f[R] can also download \c
.UR https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise
Windows 10 LTSC
.UE \c
\ and Windows Server \c
.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2
2012\-r2
.UE \c
, \c
.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016
2016
.UE \c
, \c
.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019
2019
.UE \c
, and \c
.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
2022
.UE \c
\&.
No automated installation is supported for these releases.
.SS Windows 10 & 11 Guests
\f[CR]quickget\f[R] can download
Windows10 (https://www.microsoft.com/software-download/windows10) and
Windows 11 (https://www.microsoft.com/software-download/windows11)
automatically and create an optimised virtual machine configuration.
This configuration also includes the VirtIO drivers for
Windows (https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/).
.IP
.EX
quickget windows 11
quickemu \-\-vm windows\-11.conf
quickemu --vm windows-11-22H2.conf
.EE
.IP \[bu] 2
Complete the installation as you normally would.
@ -690,21 +484,33 @@ Username: \f[CR]Quickemu\f[R]
Password: \f[CR]quickemu\f[R]
.RE
.PP
Further information is available from the project \c
.UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines
wiki
.UE \c
The default Windows 11 configuration looks like this:
.IP
.EX
guest_os=\[dq]windows\[dq]
disk_img=\[dq]windows-11/disk.qcow2\[dq]
iso=\[dq]windows-11/windows-11.iso\[dq]
fixed_iso=\[dq]windows-11/virtio-win.iso\[dq]
tpm=\[dq]on\[dq]
secureboot=\[dq]on\[dq]
.EE
.IP \[bu] 2
\f[CR]guest_os=\[dq]windows\[dq]\f[R] instructs \f[CR]quickemu\f[R] to
optimise for Windows.
.IP \[bu] 2
\f[CR]fixed_iso=\f[R] specifies the ISO image that provides VirtIO
drivers.
.IP \[bu] 2
\f[CR]tpm=\[dq]on\[dq]\f[R] instructs \f[CR]quickemu\f[R] to create a
software emulated TPM device using \f[CR]swtpm\f[R].
.SH AUTHORS
Written by Martin Wimpress.
.SH BUGS
Submit bug reports online at: \c
.UR https://github.com/quickemu-project/quickemu/issues
.UE \c
Submit bug reports online at:
<https://github.com/quickemu-project/quickemu/issues>
.SH SEE ALSO
Full sources at: \c
.UR https://github.com/quickemu-project/quickemu
.UE \c
Full sources at: <https://github.com/quickemu-project/quickemu>
.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: October 24, 2023
footer: quickget
header: Quickget User Manual
section: 1
@ -22,326 +22,227 @@ configuration for `quickemu` to use to build and run
# OPTIONS
**version \| -version \| --version**
: show version (from Quickemu)
**list \| list_csv \| list_json**
: provide a csv list of all supported guest OSes, versions and
variants.
**\[OS\] \[Release\] \[Edition\]**
: specify the OS and release (and optional edition) if insufficient
input is provided a list of missing options will be reported and the
script will exit. Editions may not apply and will be defaulted if
not provided.
**--download** <os> <release> \[edition\]
: Download image; no VM configuration
**--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
**--url** \[os\] \[release\] \[edition\]
: Show image URL(s)
**--check** \[os\] \[release\] \[edition\]
: Check image URL(s)
**--list**
: List all supported systems
**--list-csv**
: List everything in csv format
**--list-json**
: List everything in json format
**--version**
: Show version
**--help**
: Show this help message
# NOTES
## Creating Linux guests 🐧
### Ubuntu
## Ubuntu Guest
`quickget` will automatically download an Ubuntu release and create the
virtual machine configuration.
``` shell
``` bash
quickget ubuntu 22.04
quickemu --vm ubuntu-22.04.conf
```
- Complete the installation as normal.
- Post-install:
- Install the SPICE agent (`spice-vdagent`) in the guest to enable
copy/paste and USB redirection
- `sudo apt install spice-vdagent`
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
- `sudo apt install spice-webdavd`
- Complete the installation as normal.
- Post-install:
- Install the SPICE agent (`spice-vdagent`) in the guest to enable
copy/paste and USB redirection
- `sudo apt install spice-vdagent`
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
- `sudo apt install spice-webdavd`
### Ubuntu daily-live images
### Ubuntu devel (daily-live) images
`quickget` can also download/refresh daily-live images via `zsync` for
Ubuntu developers and testers.
`quickget` can also download/refresh devel images via `zsync` for Ubuntu
developers and testers.
``` shell
quickget ubuntu daily-live
quickemu --vm ubuntu-daily-live.conf
``` bash
quickget ubuntu devel
quickemu --vm ubuntu-devel.conf
```
You can run `quickget ubuntu daily-live` to refresh your daily
development image as often as you like, it will even automatically
switch to a new series.
You can run `quickget ubuntu devel` to refresh your daily development
image as often as you like, it will even automatically switch to a new
series.
### Ubuntu Flavours
All the official Ubuntu flavours are supported, just replace `ubuntu`
with your preferred flavour.
The project
[wiki](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines)
may have further information.
- `edubuntu` (Edubuntu)
- `kubuntu` (Kubuntu)
- `lubuntu` (Lubuntu)
- `ubuntu-budgie` (Ubuntu Budgie)
- `ubuntucinnamon` (Ubuntu Cinnamon)
- `ubuntukylin` (Ubuntu Kylin)
- `ubuntu-mate` (Ubuntu MATE)
- `ubuntu-server` (Ubuntu Server)
- `ubuntustudio` (Ubuntu Studio)
- `ubuntu` (Ubuntu)
- `ubuntu-unity` (Ubuntu Unity)
- `xubuntu` (Xubuntu)
- `edubuntu` (Edubuntu)
- `kubuntu` (Kubuntu)
- `lubuntu` (Lubuntu)
- `ubuntu-budgie` (Ubuntu Budgie)
- `ubuntucinnamon` (Ubuntu Cinnamon)
- `ubuntukylin` (Ubuntu Kylin)
- `ubuntu-mate` (Ubuntu MATE)
- `ubuntu-server` (Ubuntu Server)
- `ubuntustudio` (Ubuntu Studio)
- `ubuntu` (Ubuntu)
- `ubuntu-unity` (Ubuntu Unity)
- `xubuntu` (Xubuntu)
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
--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
--list-csv : List everything in csv format
--list-json : List everything in json format
```
Here are some typical uses
``` shell
# show an OS ISO download URL for {os} {release} [edition]
quickget --url fedora 38 Silverblue
# test if an OS ISO is available for {os} {release} [edition]
quickget --check nixos unstable plasma5
# open an OS distribution homepage in a browser
quickget --open-homepage ubuntu-mate
# Only download image file into current directory, without creating VM
quickget --download elementary 7.1
```
The `--url`, `--check`, and `--download` options are fully functional
for all operating systems, including Windows and macOS.
Further information is available from the project
[wiki](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features)
### Other Operating Systems
## Other Operating Systems
`quickget` also supports:
- `alma` (AlmaLinux)
- `alpine` (Alpine Linux)
- `android` (Android x86)
- `antix` (Antix)
- `archcraft` (Archcraft)
- `archlinux` (Arch Linux)
- `arcolinux` (Arco Linux)
- `artixlinux` (Artix Linux)
- `athenaos` (Athena OS)
- `batocera` (Batocera)
- `bazzite` (Bazzite)
- `biglinux` (BigLinux)
- `blendos` (BlendOS)
- `bodhi` (Bodhi)
- `bunsenlabs` (BunsenLabs)
- `cachyos` (CachyOS)
- `centos-stream` (CentOS Stream)
- `chimeralinux` (Chimera Linux)
- `crunchbang++` (Crunchbangplusplus)
- `debian` (Debian)
- `deepin` (Deepin)
- `devuan` (Devuan)
- `dragonflybsd` (DragonFlyBSD)
- `easyos` (EasyOS)
- `elementary` (elementary OS)
- `endeavouros` (EndeavourOS)
- `endless` (Endless OS)
- `fedora` (Fedora)
- `freebsd` (FreeBSD)
- `freedos` (FreeDOS)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)
- `gnomeos` (GNOME OS)
- `guix` (Guix)
- `haiku` (Haiku)
- `holoiso` (HoloISO)
- `kali` (Kali)
- `kdeneon` (KDE Neon)
- `kolibrios` (KolibriOS)
- `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition)
- `maboxlinux` (Mabox Linux)
- `mageia` (Mageia)
- `manjaro` (Manjaro)
- `mxlinux` (MX Linux)
- `netboot` (netboot.xyz)
- `netbsd` (NetBSD)
- `nitrux` (Nitrux)
- `nixos` (NixOS)
- `nwg-shell` (nwg-shell)
- `openbsd` (OpenBSD)
- `openindiana` (OpenIndiana)
- `opensuse` (openSUSE)
- `oraclelinux` (Oracle Linux)
- `parrotsec` (Parrot Security)
- `peppermint` (PeppermintOS)
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
- `primtux` (PrimTux)
- `proxmox-ve` (Proxmox VE)
- `pureos` (PureOS)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
- `rockylinux` (Rocky Linux)
- `siduction` (Siduction)
- `slackware` (Slackware)
- `slax` (Slax)
- `slint` (Slint)
- `slitaz` (SliTaz)
- `solus` (Solus)
- `sparkylinux` (SparkyLinux)
- `spirallinux` (SpiralLinux)
- `tails` (Tails)
- `tinycore` (Tiny Core Linux)
- `trisquel` (Trisquel-)
- `truenas-core` (TrueNAS Core)
- `truenas-scale` (TrueNAS Scale)
- `tuxedo-os` (Tuxedo OS)
- `vanillaos` (Vanilla OS)
- `void` (Void Linux)
- `vxlinux` (VX Linux)
- `zorin` (Zorin OS)
### [Custom Linux guests](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests)
- `alma` (Alma Linux)
- `alpine` (Alpine Linux)
- `android` (Android x86)
- `antix` (Antix)
- `archcraft` (Archcraft)
- `archlinux` (Arch Linux)
- `arcolinux` (Arco Linux)
- `batocera` (Batocera)
- `blendos` (BlendOS)
- `bodhi` (Bodhi)
- `bunsenlabs` (Bunsenlabs)
- `cachyos` (CachyOS)
- `centos-stream` (CentOS Stream)
- `debian` (Debian)
- `deepin` (Deepin)
- `devuan` (Devuan)
- `dragonflybsd` (DragonFlyBSD)
- `elementary` (elementary OS)
- `endeavouros` (EndeavourOS)
- `endless` (Endless OS)
- `fedora` (Fedora)
- `freebsd` (FreeBSD)
- `freedos` (FreeDOS)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)
- `haiku` (Haiku)
- `holoiso` (HoloISO)
- `kali` (Kali)
- `kdeneon` (KDE Neon)
- `kolibrios` (KolibriOS)
- `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition)
- `mageia` (Mageia)
- `manjaro` (Manjaro)
- `mxlinux` (MX Linux)
- `netboot` (netboot.xyz)
- `netbsd` (NetBSD)
- `nixos` (NixOS)
- `openbsd` (OpenBSD)
- `openindiana` (OpenIndiana)
- `opensuse` (openSUSE)
- `oraclelinux` (Oracle Linux)
- `peppermint` (PeppermintOS)
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
- `rockylinux` (Rocky Linux)
- `siduction` (Siduction)
- `slackware` (Slackware)
- `solus` (Solus)
- `spiral` (Spiral)
- `tails` (Tails)
- `tinycore` (Tiny Core Linux)
- `trisquel` (Trisquel)
- `truenas-core` (TrueNAS Core)
- `truenas-scale` (TrueNAS Scale)
- `vanillaos` (Vanilla OS)
- `void` (Void Linux)
- `vxlinux` (VX Linux)
- `xerolinux` (XeroLinux)
- `zorin` (Zorin OS)
Or you can download a Linux image and manually create a VM
configuration.
- Download a .iso image of a Linux distribution
- Create a VM configuration file; for example `debian-bullseye.conf`
- Download a .iso image of a Linux distribution
- Create a VM configuration file; for example `debian-bullseye.conf`
``` shell
``` bash
guest_os="linux"
disk_img="debian-bullseye/disk.qcow2"
iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
```
- Use `quickemu` to start the virtual machine:
- Use `quickemu` to start the virtual machine:
``` shell
``` bash
quickemu --vm debian-bullseye.conf
```
- Complete the installation as normal.
- Post-install:
- Install the SPICE agent (`spice-vdagent`) in the guest to enable
copy/paste and USB redirection.
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
- Complete the installation as normal.
- Post-install:
- Install the SPICE agent (`spice-vdagent`) in the guest to enable
copy/paste and USB redirection.
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
## Supporting old Linux distros
If you want to run an old Linux , from 2016 or earlier, change the
`guest_os` to `linux_old`. This will enable the `vmware-svga` graphics
driver which is better supported on older distros.
## [Creating macOS Guests](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests) 🍏
**Installing macOS in a VM can be a bit finicky, if you encounter
problems, [check the
Discussions](https://github.com/quickemu-project/quickemu/discussions)
for solutions or ask for help there** 🛟
## macOS Guest
`quickget` automatically downloads a macOS recovery image and creates a
virtual machine configuration.
``` shell
quickget macos big-sur
quickemu --vm macos-big-sur.conf
``` bash
quickget macos catalina
quickemu --vm macos-catalina.conf
```
macOS `mojave`, `catalina`, `big-sur`, `monterey`, `ventura` and
`sonoma` are supported.
macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
`ventura` are supported.
- Use cursor keys and enter key to select the **macOS Base System**
- From **macOS Utilities**
- Click **Disk Utility** and **Continue**
- Select `QEMU HARDDISK Media` (~103.08GB) from the list (on Big Sur
and above use `Apple Inc. VirtIO Block Device`) and click
**Erase**.
- Enter a `Name:` for the disk
- If you are installing macOS Mojave or later (Catalina, Big Sur,
Monterey, Ventura and Sonoma), choose any of the APFS options as
the filesystem. MacOS Extended may not work.
- Click **Erase**.
- Click **Done**.
- Close Disk Utility
- From **macOS Utilities**
- Click **Reinstall macOS** and **Continue**
- Complete the installation as you normally would.
- On the first reboot use cursor keys and enter key to select **macOS
Installer**
- On the subsequent reboots use cursor keys and enter key to select
the disk you named
- Once you have finished installing macOS you will be presented with an
the out-of-the-box first-start wizard to configure various options and
set up your username and password
- OPTIONAL: After you have concluded the out-of-the-box wizard, you may
want to enable the TRIM feature that the computer industry created for
SSD disks. This feature in our macOS installation will allow QuickEmu
to compact (shrink) your macOS disk image whenever you delete files
inside the Virtual Machine. Without this step your macOS disk image
will only ever get larger and will not shrink even when you delete
lots of data inside macOS.
- To enable TRIM, open the Terminal application and type the following
command followed by pressing <kbd>enter</kbd> to tell macos to use
the TRIM command on the hard disk when files are deleted:
- Use cursor keys and enter key to select the **macOS Base System**
- From **macOS Utilities**
- Click **Disk Utility** and **Continue**
- Select `QEMU HARDDISK Media` (\~103.08GB) from the list (on
Big Sur and above use `Apple Inc. VirtIO Block Device`) and
click **Erase**.
- Enter a `Name:` for the disk
- If you are installing macOS Mojave or later (Catalina, Big
Sur, Monterey and Ventura), choose any of the APFS options
as the filesystem. MacOS Extended may not work.
- Click **Erase**.
- Click **Done**.
- Close Disk Utility
- From **macOS Utilities**
- Click **Reinstall macOS** and **Continue**
- Complete the installation as you normally would.
- On the first reboot use cursor keys and enter key to select
**macOS Installer**
- On the subsequent reboots use cursor keys and enter key to
select the disk you named
- Once you have finished installing macOS you will be presented with
an the out-of-the-box first-start wizard to configure various
options and set up your username and password
- OPTIONAL: After you have concluded the out-of-the-box wizard, you
may want to enable the TRIM feature that the computer industry
created for SSD disks. This feature in our macOS installation will
allow QuickEmu to compact (shrink) your macOS disk image whenever
you delete files inside the Virtual Machine. Without this step your
macOS disk image will only ever get larger and will not shrink even
when you delete lots of data inside macOS.
- To enable TRIM, open the Terminal application and type the
following command followed by pressing
`<kbd>`{=html}enter`</kbd>`{=html} to tell macos to use the TRIM
command on the hard disk when files are deleted:
``` shell
``` bash
sudo trimforce enable
```
You will be prompted to enter your account's password to gain the
privilege needed. Once you've entered your password and pressed
<kbd>enter</kbd> the command will request confirmation in the form of
two questions that require you to type <kbd>y</kbd> (for a "yes"
response) followed by <kbd>enter</kbd> to confirm.
If you press <kbd>enter</kbd> without first typing <kbd>y</kbd> the
system will consider that a negative response as though you said "no":
`<kbd>`{=html}enter`</kbd>`{=html} the command will request confirmation
in the form of two questions that require you to type
`<kbd>`{=html}y`</kbd>`{=html} (for a "yes" response) followed by
`<kbd>`{=html}enter`</kbd>`{=html} to confirm. If you press
`<kbd>`{=html}enter`</kbd>`{=html} without first typing
`<kbd>`{=html}y`</kbd>`{=html} the system will consider that a negative
response as though you said "no":
``` plain
IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an "as is" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
@ -360,64 +261,64 @@ soon as the command completes.
The default macOS configuration looks like this:
``` shell
``` bash
guest_os="macos"
img="macos- big-sur/RecoveryImage.img"
disk_img="macos- big-sur/disk.qcow2"
macos_release=" big-sur"
img="macos-catalina/RecoveryImage.img"
disk_img="macos-catalina/disk.qcow2"
macos_release="catalina"
```
- `guest_os="macos"` instructs Quickemu to optimise for macOS.
- `macos_release=" big-sur"` instructs Quickemu to optimise for a
particular macOS release.
- For example VirtIO Network and Memory Ballooning are available in
Big Sur and newer, but not previous releases.
- And VirtIO Block Media (disks) are supported/stable in Catalina and
newer.
- `guest_os="macos"` instructs Quickemu to optimise for macOS.
- `macos_release="catalina"` instructs Quickemu to optimise for a
particular macOS release.
- For example VirtIO Network and Memory Ballooning are available
in Big Sur and newer, but not previous releases.
- And VirtIO Block Media (disks) are supported/stable in Catalina
and newer.
# macOS compatibility
### macOS compatibility
There are some considerations when running macOS via Quickemu.
- Supported macOS releases:
- Mojave
- Catalina
- Big Sur
- Monterey
- Ventura
- Sonoma
- `quickemu` will automatically download the required
[OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader and
OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM).
- Optimised by default, but no GPU acceleration is available.
- Host CPU vendor is detected and guest CPU is optimised accordingly.
- [VirtIO Block
Media](https://www.kraxel.org/blog/2019/06/macos-qemu-guest/) is
used for the system disk where supported.
- [VirtIO `usb-tablet`](http://philjordan.eu/osx-virt/) is used for
the mouse.
- VirtIO Network (`virtio-net`) is supported and enabled on macOS Big
Sur and newer, but earlier releases use `vmxnet3`.
- VirtIO Memory Ballooning is supported and enabled on macOS Big Sur
and newer but disabled for other support macOS releases.
- USB host and SPICE pass-through is:
- UHCI (USB 2.0) on macOS Catalina and earlier.
- XHCI (USB 3.0) on macOS Big Sur and newer.
- Display resolution can be changed via `quickemu` using `--width` and
`--height` command line arguments.
- **Full Duplex audio requires [VoodooHDA
OC](https://github.com/chris1111/VoodooHDA-OC) or pass-through a USB
audio-device to the macOS guest VM**.
- NOTE! [Gatekeeper](https://disable-gatekeeper.github.io/) and
- Supported macOS releases:
- High Sierra
- Mojave
- Catalina **(Recommended)**
- Big Sur
- Monterey
- Ventura
- `quickemu` will automatically download the required
[OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader
and OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM).
- Optimised by default, but no GPU acceleration is available.
- Host CPU vendor is detected and guest CPU is optimised
accordingly.
- [VirtIO Block
Media](https://www.kraxel.org/blog/2019/06/macos-qemu-guest/) is
used for the system disk where supported.
- [VirtIO `usb-tablet`](http://philjordan.eu/osx-virt/) is used
for the mouse.
- VirtIO Network (`virtio-net`) is supported and enabled on macOS
Big Sur and newer but previous releases use `vmxnet3`.
- VirtIO Memory Ballooning is supported and enabled on macOS Big
Sur and newer but disabled for other support macOS releases.
- USB host and SPICE pass-through is:
- UHCI (USB 2.0) on macOS Catalina and earlier.
- XHCI (USB 3.0) on macOS Big Sur and newer.
- Display resolution can only be changed via macOS System Preferences.
- **Full Duplex audio requires [VoodooHDA
OC](https://github.com/chris1111/VoodooHDA-OC) or pass-through a USB
audio-device to the macOS guest VM**.
- NOTE! [Gatekeeper](https://disable-gatekeeper.github.io/) and
[System Integrity Protection
(SIP)](https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection)
need to be disabled to install VoodooHDA OC
- File sharing between guest and host is available via
[virtio-9p](https://wiki.qemu.org/Documentation/9psetup) and [SPICE
webdavd](https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24).
- Copy/paste via SPICE agent is **not available on macOS**.
- File sharing between guest and host is available via
[virtio-9p](https://wiki.qemu.org/Documentation/9psetup) and [SPICE
webdavd](https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24).
- Copy/paste via SPICE agent is **not available on macOS**.
# macOS App Store
### macOS App Store
If you see *"Your device or computer could not be verified"* when you
try to login to the App Store, make sure that your wired ethernet device
@ -427,52 +328,48 @@ If the wired ethernet device is not `en0`, then then go to *System
Preferences* -\> *Network*, delete all the network devices and apply the
changes. Next, open a terminal and run the following:
``` shell
``` bash
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
```
Now reboot, and the App Store should work.
There may be further advice and information about macOS guests in the
project
[wiki](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests).
## Windows 10 & 11 Guests
## [Creating Windows guests](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) 🪟
`quickget` can download [**Windows
10**](https://www.microsoft.com/software-download/windows10) and
[**Windows 11**](https://www.microsoft.com/software-download/windows11)
`quickget` can download
[Windows10](https://www.microsoft.com/software-download/windows10) and
[Windows 11](https://www.microsoft.com/software-download/windows11)
automatically and create an optimised virtual machine configuration.
This configuration also includes the [VirtIO drivers for
Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/).
**Windows 8.1** is also supported but doesn't feature any automated
installation or driver optimisation.
`quickget` can also download [Windows 10
LTSC](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise)
and Windows Server
[2012-r2](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2),
[2016](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016),
[2019](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019),
and
[2022](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022).
No automated installation is supported for these releases.
``` shell
``` bash
quickget windows 11
quickemu --vm windows-11.conf
quickemu --vm windows-11-22H2.conf
```
- Complete the installation as you normally would.
- All relevant drivers and services should be installed automatically.
- A local administrator user account is automatically created, with
these credentials:
- Username: `Quickemu`
- Password: `quickemu`
- Complete the installation as you normally would.
- All relevant drivers and services should be installed automatically.
- A local administrator user account is automatically created, with
these credentials:
- Username: `Quickemu`
- Password: `quickemu`
Further information is available from the project
[wiki](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines)
The default Windows 11 configuration looks like this:
``` bash
guest_os="windows"
disk_img="windows-11/disk.qcow2"
iso="windows-11/windows-11.iso"
fixed_iso="windows-11/virtio-win.iso"
tpm="on"
secureboot="on"
```
- `guest_os="windows"` instructs `quickemu` to optimise for Windows.
- `fixed_iso=` specifies the ISO image that provides VirtIO drivers.
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
# AUTHORS
@ -487,4 +384,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

@ -1,40 +0,0 @@
{
"nodes": {
"flake-schemas": {
"locked": {
"lastModified": 1721999734,
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
"revCount": 75,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1756217674,
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"revCount": 808864,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808864%2Brev-4e7667a90c167f7a81d906e5a75cba4ad8bee620/0198eaa3-105a-74fa-a9b2-0a930acea8de/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
}
},
"root": {
"inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,42 +0,0 @@
{
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";
};
outputs = {
self,
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; };
});
in {
# Define schemas for the flake's outputs
schemas = flake-schemas.schemas;
# Define overlays for each supported system
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 { };
default = quickemu;
});
# Define devShells for each supported system
devShells = forEachSupportedSystem ({pkgs, system, ...}: {
default = pkgs.callPackage ./devshell.nix { };
});
};
}

518
macrecovery Executable file
View File

@ -0,0 +1,518 @@
#!/usr/bin/env python3
"""
Gather recovery information for Macs.
Copyright (c) 2019, vit9696
"""
from __future__ import print_function
import argparse
import binascii
import datetime
import hashlib
import json
import linecache
import os
import random
import struct
import sys
import textwrap
import time
try:
from urllib.request import Request,HTTPError,urlopen
from urllib.parse import urlencode,urlparse
except ImportError:
from urllib2 import Request,HTTPError,urlopen
from urllib import urlencode
from urlparse import urlparse
SELF_DIR = os.path.dirname(os.path.realpath(__file__))
RECENT_MAC = 'Mac-7BA5B2D9E42DDD94'
MLB_ZERO = '00000000000000000'
MLB_VALID = 'C02749200YGJ803AX'
MLB_PRODUCT = '00000000000J80300'
TYPE_SID = 16
TYPE_K = 64
TYPE_FG = 64
INFO_PRODUCT = 'AP'
INFO_IMAGE_LINK = 'AU'
INFO_IMAGE_HASH = 'AH'
INFO_IMAGE_SESS = 'AT'
INFO_SIGN_LINK = 'CU'
INFO_SIGN_HASH = 'CH'
INFO_SIGN_SESS = 'CT'
INFO_REQURED = [ INFO_PRODUCT, INFO_IMAGE_LINK, INFO_IMAGE_HASH, INFO_IMAGE_SESS,
INFO_SIGN_LINK, INFO_SIGN_HASH, INFO_SIGN_SESS ]
def run_query(url, headers, post=None, raw=False):
if post is not None:
data = '\n'.join([entry + '=' + post[entry] for entry in post])
if sys.version_info[0] >= 3:
data = data.encode('utf-8')
else:
data = None
req = Request(url=url, headers=headers, data=data)
try:
response = urlopen(req)
if raw: return response
return dict(response.info()), response.read()
except HTTPError as e:
print('ERROR: "{}" when connecting to {}'.format(e, url))
sys.exit(1)
def generate_id(type, id=None):
valid_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
if id is None:
return ''.join(random.choice(valid_chars) for i in range(type))
return id
def product_mlb(mlb):
return '00000000000' + mlb[11] + mlb[12] + mlb[13] + mlb[14] + '00'
def mlb_from_eeee(eeee):
if len(eeee) != 4:
print('ERROR: Invalid EEEE code length!')
sys.exit(1)
return '00000000000' + eeee + '00'
def int_from_unsigned_bytes(bytes, byteorder):
if byteorder == 'little': bytes = bytes[::-1]
encoded = binascii.hexlify(bytes)
return int(encoded, 16)
# zhangyoufu https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7#gistcomment-3061078 2021-10-08
Apple_EFI_ROM_public_key_1 = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF
ChunkListHeader = struct.Struct('<4sIBBBxQQQ')
assert ChunkListHeader.size == 0x24
Chunk = struct.Struct('<I32s')
assert Chunk.size == 0x24
def verify_chunklist(cnkpath):
with open(cnkpath, 'rb') as f:
hash_ctx = hashlib.sha256()
data = f.read(ChunkListHeader.size)
hash_ctx.update(data)
magic, header_size, file_version, chunk_method, signature_method, chunk_count, chunk_offset, signature_offset = ChunkListHeader.unpack(data)
assert magic == b'CNKL'
assert header_size == ChunkListHeader.size
assert file_version == 1
assert chunk_method == 1
assert signature_method in [1, 2]
assert chunk_count > 0
assert chunk_offset == 0x24
assert signature_offset == chunk_offset + Chunk.size * chunk_count
for i in range(chunk_count):
data = f.read(Chunk.size)
hash_ctx.update(data)
chunk_size, chunk_sha256 = Chunk.unpack(data)
yield chunk_size, chunk_sha256
digest = hash_ctx.digest()
if signature_method == 1:
data = f.read(256)
assert len(data) == 256
signature = int_from_unsigned_bytes(data, 'little')
plaintext = 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200000000000000000000000000000000000000000000000000000000000000000 | int_from_unsigned_bytes(digest, 'big')
assert pow(signature, 0x10001, Apple_EFI_ROM_public_key_1) == plaintext
elif signature_method == 2:
data = f.read(32)
assert data == digest
raise RuntimeError('Chunklist missing digital signature')
else:
raise NotImplementedError
assert f.read(1) == b''
def get_session(args):
headers = {
'Host' : 'osrecovery.apple.com',
'Connection': 'close',
'User-Agent': 'InternetRecovery/1.0',
}
headers, output = run_query('http://osrecovery.apple.com/', headers)
if args.verbose:
print('Session headers:')
for header in headers:
print('{}: {}'.format(header, headers[header]))
for header in headers:
if header.lower() == 'set-cookie':
cookies = headers[header].split('; ')
for cookie in cookies:
if cookie.startswith('session='):
return cookie
raise RuntimeError('No session in headers ' + str(headers))
def get_image_info(session, bid, mlb=MLB_ZERO, diag = False, os_type = 'default', cid=None):
headers = {
'Host' : 'osrecovery.apple.com',
'Connection' : 'close',
'User-Agent' : 'InternetRecovery/1.0',
'Cookie' : session,
'Content-Type': 'text/plain',
}
post = {
'cid': generate_id(TYPE_SID, cid),
'sn' : mlb,
'bid': bid,
'k' : generate_id(TYPE_K),
'fg' : generate_id(TYPE_FG)
}
if diag:
url = 'http://osrecovery.apple.com/InstallationPayload/Diagnostics'
else:
url = 'http://osrecovery.apple.com/InstallationPayload/RecoveryImage'
post['os'] = os_type
headers, output = run_query(url, headers, post)
if sys.version_info[0] >= 3:
output = output.decode('utf-8')
info = {}
for line in output.split('\n'):
try:
key, value = line.split(': ')
info[key] = value
except:
continue
for k in INFO_REQURED:
if k not in info:
raise RuntimeError('Missing key ' + k)
return info
def save_image(url, sess, filename='', dir=''):
purl = urlparse(url)
headers = {
'Host' : purl.hostname,
'Connection': 'close',
'User-Agent': 'InternetRecovery/1.0',
'Cookie' : '='.join(['AssetToken', sess])
}
if filename == '':
filename = os.path.basename(purl.path)
if filename.find('/') >= 0 or filename == '':
raise RuntimeError('Invalid save path ' + filename)
print('Saving ' + url + ' to ' + filename + '...')
with open (os.path.join(dir, filename), 'wb') as fh:
response = run_query(url, headers, raw=True)
size = 0
while True:
chunk = response.read(2**20)
if not chunk:
break
fh.write(chunk)
size += len(chunk)
print('\r{} MBs downloaded...'.format(size / (2**20)), end='')
sys.stdout.flush()
print('\rDownload complete!')
return os.path.join(dir, os.path.basename(filename))
def verify_image(dmgpath, cnkpath):
print('Verifying image with chunklist...')
with open (dmgpath, 'rb') as dmgf:
cnkcount = 0
for cnksize, cnkhash in verify_chunklist(cnkpath):
cnkcount += 1
print('\rChunk {} ({} bytes)'.format(cnkcount, cnksize), end='')
sys.stdout.flush()
cnk = dmgf.read(cnksize)
if len(cnk) != cnksize:
raise RuntimeError('Invalid chunk {} size: expected {}, read {}'.format(cnkcount, cnksize, len(cnk)))
if hashlib.sha256(cnk).digest() != cnkhash:
raise RuntimeError('Invalid chunk {}: hash mismatch'.format(cnkcount))
if dmgf.read(1) != b'':
raise RuntimeError('Invalid image: larger than chunklist')
print('\rImage verification complete!')
def action_download(args):
"""
Reference information for queries:
Recovery latest:
cid=3076CE439155BA14
sn=...
bid=Mac-E43C1C25D4880AD6
k=4BE523BB136EB12B1758C70DB43BDD485EBCB6A457854245F9E9FF0587FB790C
os=latest
fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
Recovery default:
cid=4A35CB95FF396EE7
sn=...
bid=Mac-E43C1C25D4880AD6
k=0A385E6FFC3DDD990A8A1F4EC8B98C92CA5E19C9FF1DD26508C54936D8523121
os=default
fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
Diagnostics:
cid=050C59B51497CEC8
sn=...
bid=Mac-E43C1C25D4880AD6
k=37D42A8282FE04A12A7D946304F403E56A2155B9622B385F3EB959A2FBAB8C93
fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
"""
session = get_session(args)
info = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=args.diagnostics, os_type=args.os_type)
if args.verbose:
print(info)
print('Downloading ' + info[INFO_PRODUCT] + '...')
dmgname = '' if args.basename == '' else args.basename + '.dmg'
dmgpath = save_image(info[INFO_IMAGE_LINK], info[INFO_IMAGE_SESS], dmgname, args.outdir)
cnkname = '' if args.basename == '' else args.basename + '.chunklist'
cnkpath = save_image(info[INFO_SIGN_LINK], info[INFO_SIGN_SESS], cnkname, args.outdir)
try:
verify_image(dmgpath, cnkpath)
return 0
except Exception as err:
if isinstance(err, AssertionError) and str(err)=='':
try:
tb = sys.exc_info()[2]
while tb.tb_next:
tb = tb.tb_next
err = linecache.getline(tb.tb_frame.f_code.co_filename, tb.tb_lineno, tb.tb_frame.f_globals).strip()
except:
err = "Invalid chunklist"
print('\rImage verification failed. ({})'.format(err))
return 1
def action_selfcheck(args):
"""
Sanity check server logic for recovery:
if not valid(bid):
return error()
ppp = get_ppp(sn)
if not valid(ppp):
return latest_recovery(bid = bid) # Returns newest for bid.
if valid(sn):
if os == 'default':
return default_recovery(sn = sn, ppp = ppp) # Returns oldest for sn.
else:
return latest_recovery(sn = sn, ppp = ppp) # Returns newest for sn.
return default_recovery(ppp = ppp) # Returns oldest.
"""
session = get_session(args)
valid_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
diag=False, os_type='default')
valid_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
diag=False, os_type='latest')
product_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
diag=False, os_type='default')
product_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
diag=False, os_type='latest')
generic_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='default')
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
if args.verbose:
print(valid_default)
print(valid_latest)
print(product_default)
print(product_latest)
print(generic_default)
print(generic_latest)
if valid_default[INFO_PRODUCT] == valid_latest[INFO_PRODUCT]:
# Valid MLB must give different default and latest if this is not a too new product.
print('ERROR: Cannot determine any previous product, got {}'.format(valid_default[INFO_PRODUCT]))
return 1
if product_default[INFO_PRODUCT] != product_latest[INFO_PRODUCT]:
# Product-only MLB must give the same value for default and latest.
print('ERROR: Latest and default do not match for product MLB, got {} and {}'.format(
product_default[INFO_PRODUCT], product_latest[INFO_PRODUCT]))
return 1
if generic_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
# Zero MLB always give the same value for default and latest.
print('ERROR: Generic MLB gives different product, got {} and {}'.format(
generic_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
return 1
if valid_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
# Valid MLB must always equal generic MLB.
print('ERROR: Cannot determine unified latest product, got {} and {}'.format(
valid_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
return 1
if product_default[INFO_PRODUCT] != valid_default[INFO_PRODUCT]:
# Product-only MLB can give the same value with valid default MLB.
# This is not an error for all models, but for our chosen code it is.
print('ERROR: Valid and product MLB give mismatch, got {} and {}'.format(
product_default[INFO_PRODUCT], valid_default[INFO_PRODUCT]))
return 1
print('SUCCESS: Found no discrepancies with MLB validation algorithm!')
return 0
def action_verify(args):
"""
Try to verify MLB serial number.
"""
session = get_session(args)
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
uvalid_default = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=False, os_type='default')
uvalid_latest = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=False, os_type='latest')
uproduct_default = get_image_info(session, bid=args.board_id, mlb=product_mlb(args.mlb),
diag=False, os_type='default')
if args.verbose:
print(generic_latest)
print(uvalid_default)
print(uvalid_latest)
print(uproduct_default)
# Verify our MLB number.
if uvalid_default[INFO_PRODUCT] != uvalid_latest[INFO_PRODUCT]:
if uvalid_latest[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
print('SUCCESS: {} MLB looks valid and supported!'.format(args.mlb))
else:
print('SUCCESS: {} MLB looks valid, but probably unsupported!'.format(args.mlb))
return 0
print('UNKNOWN: Run selfcheck, check your board-id, or try again later!')
# Here we have matching default and latest products. This can only be true for very
# new models. These models get either latest or special builds.
if uvalid_default[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
print('UNKNOWN: {} MLB can be valid if very new!'.format(args.mlb))
return 0
if uproduct_default[INFO_PRODUCT] != uvalid_default[INFO_PRODUCT]:
print('UNKNOWN: {} MLB looks invalid, other models use product {} instead of {}!'.format(
args.mlb, uproduct_default[INFO_PRODUCT], uvalid_default[INFO_PRODUCT]))
return 0
print('UNKNOWN: {} MLB can be valid if very new and using special builds!'.format(args.mlb))
return 0
def action_guess(args):
"""
Attempt to guess which model does this MLB belong.
"""
mlb = args.mlb
anon = mlb.startswith('000')
with open(args.board_db, 'r') as fh:
db = json.load(fh)
supported = {}
session = get_session(args)
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
for model in db:
try:
if anon:
# For anonymous lookup check when given model does not match latest.
model_latest = get_image_info(session, bid=model, mlb=MLB_ZERO,
diag=False, os_type='latest')
if model_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
if db[model] == 'current':
print('WARN: Skipped {} due to using latest product {} instead of {}'.format(
model, model_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
continue
user_default = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='default')
if user_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
supported[model] = [db[model], user_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]]
else:
# For normal lookup check when given model has mismatching normal and latest.
user_latest = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='latest')
user_default = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='default')
if user_latest[INFO_PRODUCT] != user_default[INFO_PRODUCT]:
supported[model] = [db[model], user_default[INFO_PRODUCT], user_latest[INFO_PRODUCT]]
except Exception as e:
print('WARN: Failed to check {}, exception: {}'.format(model, str(e)))
if len(supported) > 0:
print('SUCCESS: MLB {} looks supported for:'.format(mlb))
for model in supported:
print('- {}, up to {}, default: {}, latest: {}'.format(model, supported[model][0],
supported[model][1], supported[model][2]))
return 0
print('UNKNOWN: Failed to determine supported models for MLB {}!'.format(mlb))
def main():
parser = argparse.ArgumentParser(description='Gather recovery information for Macs')
parser.add_argument('action', choices = ['download', 'selfcheck', 'verify', 'guess'],
help='Action to perform: "download" - performs recovery downloading,'
' "selfcheck" checks whether MLB serial validation is possible, "verify" performs'
' MLB serial verification, "guess" tries to find suitable mac model for MLB.')
parser.add_argument('-o', '--outdir', type=str, default=os.getcwd(),
help='customise output directory for downloading, defaults to current directory')
parser.add_argument('-n', '--basename', type=str, default='',
help='customise base name for downloading, defaults to remote name')
parser.add_argument('-b', '--board-id', type=str, default=RECENT_MAC,
help='use specified board identifier for downloading, defaults to ' + RECENT_MAC)
parser.add_argument('-m', '--mlb', type=str, default=MLB_ZERO,
help='use specified logic board serial for downloading, defaults to ' + MLB_ZERO)
parser.add_argument('-e', '--code', type=str, default='',
help='generate product logic board serial with specified product EEEE code')
parser.add_argument('-os', '--os-type', type=str, default='default', choices = ['default', 'latest'],
help='use specified os type, defaults to default ' + MLB_ZERO)
parser.add_argument('-diag', '--diagnostics', action='store_true', help='download diagnostics image')
parser.add_argument('-v', '--verbose', action='store_true', help='print debug information')
parser.add_argument('-db', '--board-db', type=str, default=os.path.join(SELF_DIR, 'boards.json'),
help='use custom board list for checking, defaults to boards.json')
args = parser.parse_args()
if args.code != '':
args.mlb = mlb_from_eeee(args.code)
if len(args.mlb) != 17:
print('ERROR: Cannot use MLBs in non 17 character format!')
sys.exit(1)
if args.action == 'download':
return action_download(args)
elif args.action == 'selfcheck':
return action_selfcheck(args)
elif args.action == 'verify':
return action_verify(args)
elif args.action == 'guess':
return action_guess(args)
else:
assert(False)
if __name__ == '__main__':
sys.exit(main())

View File

@ -1,107 +0,0 @@
{ lib
, fetchFromGitHub
, installShellFiles
, makeWrapper
, stdenv
, testers
, cdrtools
, curl
, gawk
, glxinfo
, gnugrep
, gnused
, jq
, pciutils
, procps
, python3
, qemu_full
, samba
, socat
, spice-gtk
, swtpm
, unzip
, usbutils
, util-linux
, xdg-user-dirs
, xrandr
, zsync
, OVMF
, OVMFFull
, quickemu
}:
let
runtimePaths = [
cdrtools
curl
gawk
gnugrep
gnused
jq
pciutils
procps
python3
qemu_full
samba
socat
swtpm
unzip
util-linux
xrandr
zsync
OVMF
OVMFFull
] ++ lib.optionals stdenv.isLinux [
glxinfo
usbutils
xdg-user-dirs
];
versionMatches =
builtins.match ''
.*
readonly[[:blank:]]VERSION="([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)"
.*
'' (builtins.readFile ./quickemu);
in
stdenv.mkDerivation rec {
pname = "quickemu";
version = builtins.concatStringsSep "" versionMatches;
src = lib.cleanSource ./.;
postPatch = ''
sed -i \
-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,' \
quickemu
'';
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
runHook preInstall
installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.5
install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport
# 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
wrapProgram $out/bin/$f \
--prefix PATH : "${lib.makeBinPath runtimePaths}" \
--suffix PATH : "${lib.makeBinPath [ spice-gtk ]}"
done
runHook postInstall
'';
passthru.tests = testers.testVersion { package = quickemu; };
meta = {
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 ];
};
}

3585
quickemu

File diff suppressed because it is too large Load Diff

3566
quickget

File diff suppressed because it is too large Load Diff

View File

@ -1,121 +0,0 @@
#!/usr/bin/env bash
quick_report() {
local GPUS
local OS_KERNEL
local PRETTY_NAME
local QUICKEMU
local VERSION
OS_KERNEL=$(uname -s)
if [ "${OS_KERNEL}" == "Darwin" ]; then
# Get macOS product name and version using swvers
if [ -x "$(command -v sw_vers)" ]; then
PRETTY_NAME="$(sw_vers -productName) $(sw_vers -productVersion)"
else
PRETTY_NAME="macOS"
fi
elif [ -e /etc/os-release ]; then
PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)
else
PRETTY_NAME="Unknown OS"
fi
CWD="$(dirname "${0}")"
if [ -x "${CWD}/quickemu" ]; then
QUICKEMU="${CWD}/quickemu"
elif [ -x "$(command -v quickemu)" ]; then
QUICKEMU="$(command -v quickemu)"
fi
if [ -n "${QUICKEMU}" ]; then
VERSION=$(${QUICKEMU} --version)
echo \
"----------------------------------
Quickemu ${VERSION}
----------------------------------"
echo -e "Distro:\t${PRETTY_NAME}"
echo -e "Kernel:\t$(uname -s -r -m)"
if [ "${OS_KERNEL}" == "Darwin" ]; then
echo -e "Memory:\t$(($(sysctl -n hw.memsize) / (1048576*1024)))G"
else
# Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output.
echo -e "Memory:\t$(free --giga -h | tr ' ' '\n' | grep -m 1 "[0-9]" | cut -d'G' -f 1)G"
fi
# Break IFS on new line
IFS=$'\n'
if [ "${OS_KERNEL}" == "Darwin" ]; then
# Get GPU information using system_profiler
GPUS=$(system_profiler SPDisplaysDataType | grep "Chipset Model" | awk -F: '{print $2}' | sed 's/^ *//')
else
GPUS=$(lspci | grep -i vga | cut -d':' -f3)
fi
if [ "$(echo "${GPUS}" | wc -l)" -eq 1 ]; then
echo "GPU:"
else
echo "GPUs:"
fi
for GPU in ${GPUS}; do
echo " -${GPU}"
done
else
echo \
"----------------------------------
Quickemu missing!
----------------------------------"
exit 1
fi
if command -v curl &> /dev/null; then
VERSION=$(curl --version)
echo \
"----------------------------------
curl $(echo "${VERSION}" | head -n 1 | cut -d' ' -f2)
----------------------------------"
echo -e "Libraries:$(echo "${VERSION}" | head -n 1 | cut -d')' -f2-)"
echo -e "Protocols:$(echo "${VERSION}" | tail -n +3 | head -n 1 | cut -d':' -f2-)"
echo -e "Features: $(echo "${VERSION}" | tail -n +4 | head -n 1 | cut -d':' -f2-)"
else
echo \
"----------------------------------
curl missing
----------------------------------"
fi
local HOST_ARCH
HOST_ARCH=$(uname -m)
local QEMU_ARCH="${HOST_ARCH}"
if [ "${HOST_ARCH}" == "arm64" ]; then
QEMU_ARCH="aarch64"
fi
if command -v "qemu-system-${QEMU_ARCH}" &> /dev/null; then
VERSION=$("qemu-system-${QEMU_ARCH}" --version | head -n 1 | cut -d' ' -f4)
echo \
"----------------------------------
QEMU ${VERSION}
----------------------------------"
"qemu-system-${QEMU_ARCH}" -cpu help
else
echo \
"----------------------------------
QEMU missing
----------------------------------"
fi
echo \
"----------------------------------
CPU
----------------------------------"
if [ "${OS_KERNEL}" == "Darwin" ]; then
sysctl -n machdep.cpu.brand_string
else
lscpu
fi
}
clear
quick_report | tee quickreport.txt

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}")