Skip to content
Newer
Older
100644 75 lines (44 sloc) 2.59 KB
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
1 # CloudBioLinux and Linux KVM
2
3 This document gives some additional information on using BioLinux on Linux KVM.
4
5 In conjunction with the BioLinux fabric environment, any KMV VM can be
6 bootstrapped.
7
8 # Install KVM
9
10 There are many web resources for installing KVM. On Debian derived systems:
11
12 apt-get install kvm libvirt-bin virtinst bridge-utils \
13 qemu-kvm virt-manager libvirt-bin
14
15 and add your user to the kvm group. E.g.
16
17 adduser user kvm
18
19 # Create a bare VM
20
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
21 Download a live installation image file. For example from
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
22
23 http://cdimage.debian.org/cdimage/release/current-live/i386/usb-hdd/debian-live-$(VER)-i386-standard.img
24
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
25 Next reserve space on your disk partition (note, do not use qemu on an ext4 partition)
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
26
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
27 qemu-img create hda.img -opreallocation=metadata -ocluster_size=2M -f qcow2 4G
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
28
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
29 (settings suggested by [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Technical_Notes/virt.html][redhat]) and fire up the VM
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
30
31 kvm debian-live-$(VER)-i386-standard.img -hda hda.img -curses -no-reboot -serial pty
32
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
33 The CloudBioLinux integration test system does something similar, starting from
34 the smaller net install of Debian Linux:
35
36 wget http://cdimage.debian.org/debian-cd/6.0.3/amd64/iso-cd/debian-6.0.3-amd64-netinst.iso
37 qemu-system-x86_64 -cdrom debian-6.0.3-amd64-netinst.iso -hda hda.img
38
39 hit ESC and type 'install fb=false'. This will fire up the installer. With the
e64bd15 @pjotrp Documentation edits
pjotrp authored
40 base install, boot the new system
41
b292659 @pjotrp test: invoke fab
pjotrp authored
42 qemu-system-x86_64 -enable-kvm -redir tcp:2222::22 -hda hda.img
e64bd15 @pjotrp Documentation edits
pjotrp authored
43
44 and set up ssh on the VM
45
46 apt-get install openssh-server
47
48 so this works
49
b292659 @pjotrp test: invoke fab
pjotrp authored
50 ssh -p 2222 biolinux@localhost
e64bd15 @pjotrp Documentation edits
pjotrp authored
51
52 so it can be used on a user without a password (preferably using a key with
53 empty password). Also give that use 'sudo bash'. This ssh and sudo
54 configuration is described in ./doc/private_cloud.md.
8cb04b8 @pjotrp BioLinux on KVM
pjotrp authored
55
c46bfc6 @pjotrp Doc: KVM
pjotrp authored
56 From that point onwards you can install CloudBioLinux using the fabric file.
57
58 This is also the image the test system fingerprints for further test installs.
59
60 You can try the ./test/test_biolinux script to test drive the VM. test_biolinux
61 will install a CloudBioLinux flavor, and check whether the installation is
927adcd @pjotrp Test: docs
pjotrp authored
62 complete. Essentially with a running instance
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
63
927adcd @pjotrp Test: docs
pjotrp authored
64 ./test/test_biolinux -p 2222 -u biolinux 127.0.0.1
65
66 (note the use of 127.0.0.1 over localhost - this is because of a bug
67 in fabric).
a856468 @pjotrp Documenting KVM with CloudBioLinux
pjotrp authored
68
e64bd15 @pjotrp Documentation edits
pjotrp authored
69 # KVM tips
70
71 KVM is powerful. Performance-wise it pays to install on a raw (LVM) partition,
72 get bridging sorted, and make sure hardware acceleration is in place.
73 Interesting goodies are the monitor (Crtl-Alt-2), virtsh, etc. See also
74 [http://www.linux-kvm.org/page/FAQ][kvm tips].
Something went wrong with that request. Please try again.