From f192e0a536e13e85b01215f631b380fe1b99df61 Mon Sep 17 00:00:00 2001 From: char <32784284+hack-char@users.noreply.github.com> Date: Sun, 20 May 2018 12:47:48 -0700 Subject: [PATCH] Update README.md --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7fe0bad..ca239d2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -=========== Qemu Script =========== -'v3' -'2018-05-12' +**v3** +*2018-05-12* Makes using qemu easier. Single BASH script to manage VMs. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 - +```