[CentOS-virt] Is kvm ready for prime time?

Fri Jun 11 14:20:40 UTC 2010
Arun Khan <knura9 at gmail.com>

On Fri, Jun 11, 2010 at 4:17 PM, Lars Hecking
<lhecking at users.sourceforge.net> wrote:
>
>
>  On reboot I get
>
> |  Booting 'CentOS (2.6.18-194.3.1.el5)'
> |
> |root (hd0,0)
> | Filesystem type is ext2fs, partition type 0x83
> |kernel /boot/vmlinuz-2.6.18-194.3.1.el5 ro root=LABEL=/
> |   [Linux-bzImage, setup=0x1e00, size=0x1db35c]
> |initrd /boot/initrd-2.6.18-194.3.1.el5.img
> |   [Linux-initrd @ 0x1fd53000, 0x28c180 bytes]
>
>  then an unprintable character (y with two dots), and then nothing until
>
> | Escape character is ^]
> |
> | CentOS release 5.5 (Final)
> | Kernel 2.6.18-194.3.1.el5 on an x86_64
> |
> | test login: root

To determine where the problem is I would suggest start with the
basics KVM utilities and then graduate to using wrapper tools like
'virt-install'   I was in a similar trap a few months ago when I began
to learn how to use KVM.

Example

(a) create your disk image file with qemu-img
(b) create a bridge (br0)
(c) create a tap interface  (tap0)
(d) bind eth0 and tap0 to br0
(e) start up kvm from command line like shown below (it is for
openSUSE, the utility name could be different in CentOS)

qemu-kvm -enable-kvm -daemonize
-vga std \
-m 256 \
-hda $KVM_DIR/vdisks/debian.vdd \
-net nic,model=rtl8139,macaddr=${nic_mac_addr0} \
-net tap,ifname=tap0,script=no,downscript=no
#-boot d \
#-cdrom /media/Transcend1TB/ISO/debian/debian-testing-amd64-DVD-1.iso

where KVM_DIR is $HOME/KVM and ${nic_mac_addr0} is an unique MAC
address.  The last two lines have been commented out after installing
Debian, to install OS from ISO uncomment the lines.  Some of the
options may vary on CentOS  - I have not delved with KVM on CentOS as
host.

HTH
-- Arun Khan