From d6d1e689dd20167b605b84bb07203534ff4152e7 Mon Sep 17 00:00:00 2001 From: neingeist Date: Wed, 23 Mar 2011 14:35:23 +0100 Subject: [PATCH] use markdown in readme --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bfa021b..edfdc6c 100644 --- a/README.md +++ b/README.md @@ -5,34 +5,40 @@ their libvirt VM(s) through SSH. Currently supported is starting/stopping VMs, serial console and listing all VMs to get their status. Authorization is done using SSH public keys. -Configuration: +Configuration +============= 1. Create a user "vmadmin". 2. Give that user sudo permissions for calling virsh, so she may control (all) VMs: - Defaults:vmadmin !requiretty - vmadmin ALL = (root) NOPASSWD: /usr/bin/virsh +
+  Defaults:vmadmin !requiretty
+  vmadmin ALL = (root) NOPASSWD: /usr/bin/virsh
+  
3. For every one of your users, create a line in vmadmin's .ssh/authorized_keys using their SSH public keys: - command="/usr/local/bin/virssh myfancyvm",permitopen="localhost:5915",no-X11-forwarding,no-agent-forwarding ssh-rsa AAAAB...== myfancyuser@hjome +
command="/usr/local/bin/virssh myfancyvm",permitopen="localhost:5915",no-X11-forwarding,no-agent-forwarding ssh-rsa AAAAB...== myfancyuser@hjome
Instead of specifying only one VM "myfancyvm", you may also specify multiple VMs by regex, for example "(myfancyvm|myothervm)". -Usage: +Usage +===== The user may now control her VM using the following commands: +
     ssh -t vmadmin@vmserver sudo virsh list
     ssh -t vmadmin@vmserver sudo virsh console myfancyvm
     ssh -t vmadmin@vmserver sudo virsh destroy myfancyvm
     ssh -t vmadmin@vmserver sudo virsh shutdown myfancyvm
     ssh -t vmadmin@vmserver sudo virsh start myfancyvm
     ssh -t vmadmin@vmserver sudo virsh start myfancyvm --console
+  
If you use a "permitopen" directive, that user may also use the console command to keep an SSH tunnel open to use VNC.