Kvm on sles
SUSE Linux Enterprise Server
We tested the instructions using SUSE Linux Enterprise Server Service Pack 2.
We use the term Host Machine to refer to machines where Virtual Machines will be running. We use the term Management Machine to refer to the machine where Convirt will run to manage all the Host Machines. In the simplest case of just one computer, the Management Machine is also the Host Machine.
Setup the Management Machine
Install dependent packages on the machine to run Convirt
Download and unpack convirt
Setup KVM on the Host Machines (SLES)
Ensure sshd (SSH Daemon) is running, unless the Host Machine is the localhost.
sudo rc-update add sshd default
Reboot is necessary to reload the new kernel.
- sudo /sbin/modprobe kvm
- sudo /sbin/modprobe kvm-intel
Verify KVM Setup
To make sure you are using the right KVM
sudo kvm | head -n1
Should see something like QEMU PC emulator ... (kvm-7x)
sudo lsmod | grep kvm sudo modinfo kvm
Should also show kvm-7x.
Test KVM Setup by create a disk image
kvm-img create -f qcow2 vdisk.qcow2 10G
Run KVM manually. Note: -net nic -net user may be necessary for network access
sudo kvm -hda vdisk.qcow2 -m 1024 -cdrom path-to-an-iso-file -net nic -net user
Convirt uses /dev/cdrom by default. Gentoo uses /dev/cdrom1 etc by default. Link your cdrom device, e.g. /dev/cdrom1 to /dev/cdrom
sudo ln -s /dev/cdrom1 /dev/cdrom
Troubleshoort KVM Setup Issues
If you see
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support
That means either
- KVM was not compiled as modules
- KVM was not loaded into the kernel via modprobe kvm and modprobe kvm-intel
- Didn't run kvm as root, or as a user who has read/write access to /dev/kvm
Start Convirt on the Management Machine
cd convirt-0.9.5 sudo ./Convirt # managing localhost and remote hosts via SSH, or ./Convirt # managing remote host via SSH.