forked from wubbl0rz/VmChamp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding docs, moving installation to docs
- Loading branch information
zwoefler
committed
Sep 4, 2024
1 parent
8237fa1
commit 33929b7
Showing
4 changed files
with
102 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Frequently Asked Questions | ||
|
||
|
||
### How to fix `libvirt: Domain error : invalid domain pointer in virDomainDestroy`? | ||
The `qemu-bridge-helper` must run with elevated privileges. | ||
To avoid using sudo, set the `setuid bit` on the file: | ||
|
||
```BASH | ||
sudo chmod u+s /usr/lib/qemu/qemu-bridge-helper | ||
``` | ||
|
||
**Explanation**: | ||
Setting the `setuid bit` on an executable runs the file with the permissions of the owner (root), rather than the user (you) who runs the executable. | ||
The `qemu-bridge-helper` must run with elevated privileges to configure network interfaces. | ||
This sets up a network bridge that connects the virtual machines to the physical network. | ||
|
||
### Where are the downloaded VM-Images stored? | ||
```BASH | ||
~/VmChamp/default/cache/ | ||
``` | ||
|
||
On first run, the folder `~/VmChamp/default` is created. | ||
|
||
### How does VmChamp create the SSH connection? | ||
On creation of the VM **every** `.pub` key inside your `~/.ssh` directory is added to the `authorized_keys` file in the VM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 🛠️ Install | ||
TESTED on: `Ubuntu 22.04`; `Debian 12` | ||
|
||
### 🔧 Prerequisites: | ||
- Linux machine support `virtualization with KVM` | ||
- `KVM`, `QEMU` and `libvirt` installed | ||
- Ensure a default network interface is defined in libvirt, typically named "default." | ||
|
||
|
||
### 🚀 INSTALLATION: | ||
1. Check if your cpu supports virtualization: | ||
```BASH | ||
grep -Ec '(vmc|svm)' /proc/cpuinfo | ||
# If the output is greater than 0 your CPU supports hardware virtualization. | ||
``` | ||
|
||
2. First, ensure your system is up to date and install the required dependencies: | ||
```BASH | ||
sudo apt update | ||
sudo apt install qemu-kvm libvirt-daemon-system | ||
``` | ||
|
||
3. Download latest VmChamp: | ||
```BASH | ||
wget -qO- https://api.github.com/repos/zwoefler/VmChamp/releases/latest | grep "browser_download_url" | cut -d '"' -f 4 | wget -i - -O vmchamp | ||
``` | ||
4. Install VmChamp | ||
```BASH | ||
# Make the file executable: | ||
chmod +x vmchamp | ||
|
||
# Move vmchamp to your PATH: | ||
# Move to /usr/local/bin that's in your PATH. | ||
# Or rootless install ~/.local/bin: | ||
mkdir -p ~/.local/bin | ||
mv vmchamp ~/.local/bin/ | ||
|
||
# Ensure ~/.local/bin is in your PATH by adding the following to your ~/.bashrc or ~/.zshrc: | ||
export PATH="$PATH:$HOME/.local/bin" | ||
``` | ||
|
||
5. Run VmChamp | ||
```BASH | ||
vmchamp # Displays help message | ||
``` | ||
|
||
### ISSUES WITH INSTALLATION: | ||
If your default interface is not started (https://github.com/wubbl0rz/VmChamp/issues/3) try: | ||
|
||
```BASH | ||
# use sudo if your user is not in the libvirt group | ||
virsh --connect qemu:///system net-start --network default | ||
virsh --connect qemu:///system net-autostart default | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# VmChamp Documentation | ||
|
||
Simple and fast creation of throwaway VMs on your local machine. Connect via SSH seconds. | ||
|
||
VmChamp allows users to quickly create virtual machines using a command-line interface. | ||
It supports various Linux distributions and utilizes `KVM` (Kernel-based Virtual Machine) for virtualization. | ||
|
||
## How It Works | ||
|
||
- **VM Creation:** Users initiate VMs and can customize the settings (OS, Memory, CPUs, etc.). | ||
- **Storage:** All VMs are stored at `~/VmChamp`, which is created upon first using the tool. | ||
|
||
|