aboutsummaryrefslogtreecommitdiff
path: root/README
blob: d1064f243fe2a611bc29ff610b62a9ed6771e729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
KVM-Manager

Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: 2009-10-08 11:22:14-0400

This is a small set of scripts to make it relatively easy to manage a
stable of kvm instances in a fairly secure and isolated fashion.

The basic model is to use runit to supervise each KVM instance, with a
single, non-privileged user account for each instance.

Dependencies:

 runit : for system supervision
 uml-utilities : for tunctl for the tun/tap interface
 kvm : for the virtual machine emulator
 screen : for the detached, logged serial console

Recommendations:

 openssh-server : i've been using ssh to access the vm's serial console

Before you begin, you may want to prepare your system by doing the following:

* Copy di-maker, kvm-manager, and kvm-creator into /usr/local/sbin
* Make the directory /usr/local/share/ISOs
* Create a serial console enabled debian installer.
	* cd /usr/local/share/ISOs
	* di-maker > d-i.iso

A typical workflow to start an installer is:

kvm-creator create $GUESTNAME $VG [$DISKSIZE [$RAM [$TAP [$MAC] ] ] ]
# set up boot media for the host ("put the installer CD in the drive"):
ln -s /usr/local/share/ISOs/d-i.iso /home/$GUESTNAME/vms/$GUESTNAME/cd.iso
# set up access to the account:
mkdir -p /home/$GUESTNAME/.ssh
cat ~/.ssh/authorized_keys >> /home/$GUESTNAME/.ssh/authorized_keys
# start up the host
update-service --add /etc/sv/kvm/$GUESTNAME


To access the guest's serial console, do:

   ssh -t $GUESTNAME@host.machine screen -x $GUESTNAME


trouble getting a serial console-enabled debian
installer ISO?  try using the di-maker script.

All patches, fixes, suggestions welcome!