Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hack-char authored May 20, 2018
1 parent 20da4f3 commit f192e0a
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
===========
Qemu Script
===========

'v3'
'2018-05-12'
**v3**
*2018-05-12*

Makes using qemu easier.
Single BASH script to manage VMs.
Expand All @@ -12,13 +11,13 @@ Commands: up, down, info, reset, ctrl-alt-del, etc
Features Supported:

* NO ADDITIONAL BINARY FILES OR LIBRARIES
** Doesn't need libvirt, just base qemu
* Doesn't need libvirt, just base qemu
* Integrated nftables firewall
* Optionally masquerade VMs to outside network
* Multiple configurations for same underlying disk image
* Headless operation on a server (vnc option)
* Integrated with 'pass' password manager
** Allow sending local saved password to VM as if typed
* Allow sending local saved password to VM as if typed
* Various special key strokes
* Power down and reset (acpi) VMs

Expand All @@ -34,7 +33,7 @@ universal configuration file
qs.conf: /home/$USER/.qs/qs.conf
per user configuration file

sudoers.qs.conf: /etc/sudoers.d/qs
sudoers_qs: /etc/sudoers.d/qs
SUDO permissions for qemu group
Users using this should be part of qemu group
Needed to dynamically configure networking and VFIO forwarding
Expand All @@ -50,14 +49,18 @@ Firewall blacklist and NAT log
add/remove IP to my_ip set in nftables firewall

COMMAND EXAMPLES:
```
qs up example
qs down 1
qs info
qs reset 1
qs ctrl-alt-del 1
```

1 would be the IDX reported by info

reset and down send ACPI commands to VM (require acpid for linux)

ctrl-alt-del send keystroke ctrl-alt-del to VM IDX 1

Intended for use on Debian system and only tested on Debian
Expand All @@ -66,10 +69,10 @@ Use elsewhere at your own risk!
VM subnet set to 10.0.0.0/24 (look inside qs and nftables.conf)
Bridge set to 10.0.0.1 (br0)

'' USE CASE 1) Make a new Debian VM ''
** USE CASE 1) Make a new Debian VM **

* Create configuration file

```
mkdir -p ~/.qs
cat > ~/.qs/deb.conf << END_TEXT
VM deb
Expand All @@ -78,21 +81,27 @@ VM deb
mem 2
cpu 1
END_TEXT
```

* Create new qcow2 disk

```
qemu-img create -f qcow2 ${HOME}/deb.qcow2 2G
```

* Install

Download ISO for example ${HOME}/debian.iso

```
sudo qs up deb bootonce ${HOME}/debian.iso
```

Follow standard Debian installation

* Use it!

```
sudo qs up deb
sudo qs info

```

0 comments on commit f192e0a

Please sign in to comment.