Initial commit.
[supernested.git] / README
1 Supernested is a test of nested KVM.  It is able to run KVM, nested to
2 any depth, limited only by available memory, bugs in KVM, and your
3 patience.
4
5
6 Author
7 ----------------------------------------------------------------------
8
9 By Richard W.M. Jones <rjones@redhat.com>
10
11 Bugs, feedback etc: http://www.redhat.com/mailman/listinfo/virt-tools-list
12
13 (Note: Bugs in KVM or the kernel should be reported to the qemu-devel
14 or Linux kernel mailing lists respectively)
15
16
17 License
18 ----------------------------------------------------------------------
19
20 Gnu General Public License, version 2 or above.  See 'COPYING'.
21
22
23 Requirements
24 ----------------------------------------------------------------------
25
26  - supermin version 5
27    https://github.com/libguestfs/supermin
28    Note: older versions of supermin will not work
29
30  - guestfish
31
32  - recent qemu and kernel
33
34  - qemu-img
35
36  - getopt(1) utility (from util-linux)
37
38  - Only tested on Fedora, but it should work on other Linux distros
39    *provided* they have supermin 5 support.  Patches to fix that are
40    welcome.
41
42
43 Compiling the disk image
44 ----------------------------------------------------------------------
45
46 To build the disk image, do:
47
48   ./configure
49   make
50
51 Assuming that works you will end up with 4 files:
52
53  - 'supernested-<VERSION>-<DISTRO>.qcow2'
54    The disk image.
55
56  - 'kernel'
57
58  - 'initrd'
59
60  - 'run-supernested.sh'
61
62 You need all 4 files for the next step.
63
64
65 Running the disk image
66 ----------------------------------------------------------------------
67
68 !NOTE FIRST!  If nested KVM is broken, it can *frequently* cause your
69 host machine to crash, reboot, catch fire, etc.  You need to run this
70 on baremetal, on a machine which is KVM-capable, a modern CPU, with
71 lots of free memory, and nothing much else running.
72
73 You need to have the kernel KVM module (eg. kvm_amd or kvm_intel)
74 loaded, with the nested flag set.  The nested flag defaults to true in
75 recent kernels.  /dev/kvm needs to be accessible.  On some distros
76 you may need to add your user to a special 'kvm' group.
77
78 You *don't* need to run this command as root.  Running it as root may
79 give different results.  Consult a qemu/KVM expert.
80
81 Have a look at the 'run-supernested.sh' script.  You may want to edit
82 things like the name of the qemu binary.
83
84   ./run-supernested.sh