wiki:experiences:igraltist:kvm
=>  Releases

Current version
Git/Latestdiff: 1.5.6

Latest Snapshots
Produced after each commit or rebase to new upstream version

GIT
RSBAC source code on Gitgub, can be unstable sometimes

=>  Events

No events planned

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:experiences:igraltist:kvm [2010/11/10 14:31] – (old revision restored) 127.0.0.1wiki:experiences:igraltist:kvm [2012/05/13 05:53] (current) – (old revision restored) 127.0.0.1
Line 1: Line 1:
-[[wiki:experiences/igraltist|Back to igraltist's experiences]]\\+[[wiki:experiences/igraltist#kvm_on_rsbac|Back to igraltist's experiences/KVM on RSBAC]]\\
 ====== Howto setup a kvm user on gentoo ====== ====== Howto setup a kvm user on gentoo ======
  
Line 18: Line 18:
  
 Other packages should be installed on default installation. Other packages should be installed on default installation.
 +
  
  
Line 124: Line 125:
 KERNEL=="kvm", MODE="0660", GROUP="kvm" KERNEL=="kvm", MODE="0660", GROUP="kvm"
 </code> </code>
 +
 +
  
  
Line 161: Line 164:
 </code> </code>
  
-  * create a test file.+  * create a test file
 <code bash> <code bash>
-su - kvm -c "qemu-img create /var/lib/kvm/tester.img 1MB" +su - kvm -c "qemu-img create /var/lib/kvm/test.img 1MB" 
 Formatting '/var/lib/kvm/tester.img', fmt=raw size=1048576  Formatting '/var/lib/kvm/tester.img', fmt=raw size=1048576 
 </code> </code>
Line 173: Line 176:
 drwxrwx---  2 root kvm     4096 10. Nov 15:27 . drwxrwx---  2 root kvm     4096 10. Nov 15:27 .
 drwxr-xr-x 22 root root    4096 10. Nov 15:25 .. drwxr-xr-x 22 root root    4096 10. Nov 15:25 ..
--rw-r--r--  1 kvm  kvm  1048576 10. Nov 15:27 tester.img+-rw-r--r--  1 kvm  kvm  1048576 10. Nov 15:27 test.img
 </code> </code>
 +
  
  
Line 182: Line 186:
 ===== Network ===== ===== Network =====
  
-This site will descibe on some example howto setup the [[wiki:experiences/igraltist/kvm-network|Network]].+This site will describe on some example howto setup the [[wiki:experiences/igraltist/kvm-network|Network]]. 
 + 
  
  
Line 193: Line 199:
  
 ===== kvm-admin ===== ===== kvm-admin =====
-All preparation is done. 
-\\ 
-I have wrote a script to easy managing kvm-guests. 
-\\ 
-This script is in beta stage. 
-\\ 
-!offline change to mercurial 
-#It can be find here http://svn.kasten-edv.de/viewvc/kvm-admin/trunk/. 
-\\ 
-For using it, iam doing this: 
-  * create a dir for storing and check it out via svn 
-<code bash> 
-$mkdir ~/kvm 
-$cd ~/kvm 
-</code> 
-<code bash> 
-!offline change to mercurial 
-svn checkout http://svn.kasten-edv.de/svn/kvm-admin/trunk/ .</code> 
-  * copy it to '/etc' - Directory 
-<code bash> 
-$cd .. 
-$su 
-#cp -a kvm /etc 
-#chmod 750 /etc/kvm 
-#chgrp kvm /etc/kvm 
-</code> 
  
-===== example kvm-guest-config ===== +I use my own scripts to manage the kvm guest's.
-If all done then add or if it already there in '/etc/kvm/guestconfig/' a file example.\\ +
-Open it and add this: +
-<code python> +
-################################################################################# +
-#   the config/default.cfg and path_config.cfg has the predefined variables # +
-################################################################################# +
-#verbose = enabled # give an output what is set, not work in moment +
-test-only = enabled # does not execute it but show it +
-name = example # the name for ifname when used the tap option and ifname is not set+
  
-#hda = /vmserver/qemu.img +It can be found here http://hg.kasten-edv.de/kvm-tools/
-cdrom = /usr/src/ISOS/debian-40r3-i386-netinst.iso+
  
  
-## if use the virtio drive the if = virtio must set 
-#file = file:/dev/sda1, if:virtio, boot:on 
-file = file:/vmserver/qemu.img, if:scsi, boot:on 
-#file = file:/vmserver/qemu_1.img, if:ide, index:0, media:disk 
-#file = file:/vmserver/cd.iso, if:ide, index:1, media:cdrom 
  
-script = kvm-dmz-ifup    # default qemu-ifup + 
-mem 265                # default 128 MB => size in MB + 
-vnc = 4                  # would be on to connect to your vnc host:4 than for use + 
- # vnc-max-client is set to 998 + 
-#vlan = 1                  default 0, vlan-max is set to 254 + 
-#mac = 00:00:00:00:00:01 # +===== Example configuration ===== 
-#nic-model = virtio        ne2k_pci is default, with wrong driver wich qemu not supported  + 
-                          the kvm-manager will show wich avaible +All guest configuration files located in '/etc/kvm/domains/'.\\ 
-net-tap = enabled            use net option -tap + 
-net-user = disabled if tun-tap setup fail it will user -net user as defaul + 
-                   -user is not actived in the moment +  * example for a guest which on a headless machine, so vnc is using for installation 
-boot = d                  default is c first drive "file" oder "hda" + 
-usb enabled                # turn on usb support +<code python> 
-usbdevice = tablet        is good if you used vnc with dektop on guest +############################ 
-nographic = disabled #  +sample option for a disk 
-pid = enabled       #  +############################ 
-ifname iface_test      it is the name for the tap,ifname ; +drive = file=/dev/mapper/VG-example,if=virtio,index=0,media=disk,boot=off,cache=none 
- # is not set the name will be used +sample option for a cdrom, can also be a second disk 
- and if name not set the filename +drive file=/path/to/my_cd_img.iso,if=virtio,index=1,media=cdrom,boot=on 
- from the guest-config will be used  + 
-language = en-us          default is de +#######################
-smp = 2                  default is no smp enabled +# settings for network 
-localtime = enabled          # default is False +#######################
-daemonize = enabled          default is enabled +net nic 
-no-fd-bootchk = enabled      # default is disabled +use tap device for briding 
-keymaps = enabled          default is disabledit need the path set in  +net = tap,bridge=br0 
- config/path_config.cfg for keymaps + 
-no-acpi disabled            # default is disabled +############################################################################ 
-std-vga = enabled # default is enabled+use monitor option other the default unix socket or override the default # 
 +############################################################################ 
 +example for overridding the default 
 +monitor = unix,path_to_your_own_socketfile,server,nowait 
 +use tcp socket, every guest have to use a different port 
 +monitor tcp,localhost,4444,server,nowait 
 </code> </code>
  
  
  
-===== test example config ===== + 
-Now is time to test it. + 
-  * #cd /etc/kvm + 
-  * #ln -s kvm-admin.py  /bin/kvm-admin+ 
 + 
 + 
 +===== Test example config ===== 
 + 
 +Befor start check the [[wiki:experiences/igraltist/kvm-network|Network]]. 
  
 <code python> <code python>
-#kvm-admin start example +kvm-admin example show 
-uid=1003(kvm) gid=1003(kvm) Gruppen=1003(kvm),6(disk),85(usb) +This string would executed
-[Errno 2] No such file or directory: '/vmserver/qemu.img' +/usr/bin/kvm -uuid 0bcd5138-41bf-a5c0-0627-4e0b65d3871f -monitor tcp,localhost,4444,server,nowait -rtc clock=host,base=utc -runas kvm -M pc -drive file=/dev/mapper/VG-example,if=virtio,index=0,media=disk,boot=off,cache=none -drive file=/path/to/my_cd_img.iso,if=virtio,index=1,media=cdrom,boot=on -daemonize -net nic -net tap,ifname=example,script=/etc/kvm/scripts/kvm-ifup,downscript=/etc/kvm/scripts/kvm-ifdown -cpu core2duo -pidfile /var/run/kvm/example.pid -name example,process=example
-Setting up tun-tap-device, done .... +
-The follow command would be executing:  +
-['/usr/local/kvm/72/bin/qemu-system-x86_64''-cdrom''/usr/src/ISOS/debian-40r3-i386-netinst.iso''-net''nic,vlan=0,macaddr=A9:B9:C9:D9:E9:F0,model=rtl8139', '-net', 'tap,vlan=0,ifname=iface_test,script=/etc/kvm/scripts/kvm-dmz-ifup''-vnc', ':4', '-m', '265', '-boot', 'd', '-k', 'en-us', '-pidfile', '/var/run/kvm/example.pid', '-smp', '2', '-L', '/usr/local/kvm/72/share/qemu', '-usb', '-usbdevice', 'tablet', '-name''example', '-no-fd-bootchk', '-daemonize', '-std-vga', '-localtime']+
 </code> </code>
-[[wiki:experiences/igraltist/kvm#Howto setup a kvm user on gentoo|Top]]+[[wiki:experiences/igraltist/kvm#|Top]]
//
wiki/experiences/igraltist/kvm.1289399482.txt.gz · Last modified: 2010/11/10 14:31 by 127.0.0.1

wiki/experiences/igraltist/kvm.1289399482.txt.gz · Last modified: 2010/11/10 14:31 by 127.0.0.1
This website is kindly hosted by m-privacy