New, much improved version available. This pretty much a total rewrite
and lots of planned functions/commands are still missing but give it a
try.

New features
- Support for multiple hard disks (see /etc/kvmctl/cfg/example.cfg)
- Support for multiple NICs (see /etc/kvmctl/cfg/example.cfg)
- Soundhw support (currently hard coded to es1370)
- Check VM settings with 'kvmctl vmname details' ('kvmctl list' for overview)

Plans:
- Handle CPU affinity, nice and ionice levels better so that root can
control them in vm.conf (only root can set negative nice level
- Add monitor commands (change CD, manage USB devices etc)
- Automatically restart VM after crash (configurable)



-------------------
Installation instructions that work on debian. Other distributions
should work with minor changes.


1. Install KVM

2. Download and untar kvmctl package
        - cd / ; tar xzvf kvmctl-<version>.tar.gz

3. Install needed utilities
        - sudo (sudo)
        - brctl (bridge-utils)
        - socat (socat)
        - tunctl (uml-utilities)
        - ionice (util-linux)
        - nice (coreutils)
        - taskset (util-linux)
        - Your prefered text editor. Define in /etc/kvmctl/global.conf

4. Create group kvm and add users who should be able to control VMs
        - usermod  -a -G kvm <username>

5. Set /dev/kvm permissions
        - /etc/udev/rules.d/91-permissions.rules -> KERNEL=="kvm",
     GROUP="kvm"


6. Create group kvm (use gid if possible 117)
        Following files/directories must be owned by group kvm
                /var/run/kvmctl (must be writable)
                /var/log/kvmctl (must be writable)
                /usr/local/bin/kvmctl (executable)
                /etc/qemu-ifup (executable)
                /etc/qemu-ifdown (executable)
                /etc/kvmctl (readable)
                /etc/kvmctl/cfg (writable)
                /etc/kvmctl/startup (writable)
        

7. Set up sudo
        - install sudo
        - edit /etc/sudoers
                Cmnd_Alias      
KVM=/sbin/ifconfig,/usr/sbin/brctl,/usr/sbin/tunctl
                %kvm     ALL=NOPASSWD: KVM


8. Use /etc/kvmctl/cfg/example.cfg as a template for new VMs

9. Set up network interfaces (bridges).
        /etc/network/interfaces

        auto eth0
                iface eth0 inet manual

        auto br0
        iface br0 inet static
                address 192.168.0.1
                network 192.168.0.0
                netmask 255.255.255.0
                broadcast 192.168.0.255
                gateway 192.168.0.1
                bridge_ports eth0
                bridge_fd 9
                bridge_hello 2
                bridge_maxage 10
                bridge_stp off


        auto vbr0
        iface vbr0 inet static
                address 192.168.1.1
                netmask 255.255.255.0
                bridge_ports none
                bridge_fd 9
                bridge_hello 2
                bridge_maxage 12
                bridge_stp off

        auto vbr1
        iface vbr1 inet static
                ...
                ...


10. Make /etc/init.d/kvm run automatically
        update-rc.d  kvm defaults (as root)

-------------------


Download link http://81.209.59.200/kvmctl-0.2.0.tar.gz
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to