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
7 ----------------------------------------------------------------------
9 By Richard W.M. Jones <rjones@redhat.com>
11 Bugs, feedback etc: http://www.redhat.com/mailman/listinfo/virt-tools-list
13 (Note: Bugs in KVM or the kernel should be reported to the qemu-devel
14 or Linux kernel mailing lists respectively)
18 ----------------------------------------------------------------------
20 Gnu General Public License, version 2 or above. See 'COPYING'.
24 ----------------------------------------------------------------------
27 https://github.com/libguestfs/supermin
28 Note: older versions of supermin will not work
32 - recent qemu and kernel
36 - getopt(1) utility (from util-linux)
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
43 Compiling the disk image
44 ----------------------------------------------------------------------
46 To build the disk image, do:
52 Assuming that works you will end up with 4 files:
54 - 'supernested-<VERSION>-<DISTRO>.qcow2'
61 - 'run-supernested.sh'
63 You need all 4 files for the next step.
66 Running the disk image
67 ----------------------------------------------------------------------
69 !NOTE FIRST! If nested KVM is broken, it can *frequently* cause your
70 host machine to crash, reboot, catch fire, etc. You need to run this
71 on baremetal, on a machine which is KVM-capable, a modern CPU, with
72 lots of free memory, and nothing much else running.
74 You need to have the kernel KVM module (eg. kvm_amd or kvm_intel)
75 loaded, with the nested=1 flag. The nested flag defaults to true for
76 AMD in recent kernels, but not for Intel. To force this, do:
78 mkdir -p /etc/modprobe.d
79 echo "options kvm_intel nested=1" > /etc/modprobe.d/kvm.conf
81 To see if nested is enabled, use:
83 cat /sys/modules/kvm_(intel|amd)/parameters/nested
85 /dev/kvm needs to be accessible. On some distros you may need to add
86 your user to a special 'kvm' group.
88 You *don't* need to run this command as root. Running it as root may
89 give different results. Consult a qemu/KVM expert.
91 Have a look at the 'run-supernested.sh' script. You may want to edit
92 things like the name of the qemu binary.