Hi all,
I've started playing with kvm on CentOS 5.5, with not much success so far. In a nutshell, I have the same problem as http://lists.centos.org/pipermail/centos-virt/2010-April/001854.html
I followed the RHEL5 virtualization guide to set up a bridge interface br0, and then used virt-install (rather than virt-manager - I like automation) to set up the vm. It hangs at some point. The command line is slightly modified from the one I was using with xen. Running it with -d shows that the correct hypervisor is used and the network install source is found. Otherwise, I'm fresh out of ideas.
# lsmod|grep kvm kvm_intel 86920 0 kvm 226208 2 ksm,kvm_intel # uname -a Linux x3250 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux # virt-install -r 512 -n test -f /dev/vol0/lvol4 --nographics --os-type=linux --os-variant=rhel5.4 --accelerate -w bridge:br0 -l http://centos/centos/x86_64 -x ks=http://centos/centos/kickstart/ks.test.cfg -m 00:16:3e:30:4d:80
Starting install... Retrieving file .treeinfo... | 417 B 00:00 Retrieving file vmlinuz... | 1.9 MB 00:00 Retrieving file initrd.img... | 7.7 MB 00:00 Creating domain... | 0 B 00:00 Connected to domain test Escape character is ^]
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
On 06/09/10 15:31, Lars Hecking wrote:
Hi all,
I've started playing with kvm on CentOS 5.5, with not much success so far. In a nutshell, I have the same problem as http://lists.centos.org/pipermail/centos-virt/2010-April/001854.html
I followed the RHEL5 virtualization guide to set up a bridge interface br0, and then used virt-install (rather than virt-manager - I like automation) to set up the vm. It hangs at some point. The command line is slightly modified from the one I was using with xen. Running it with -d shows that the correct hypervisor is used and the network install source is found. Otherwise, I'm fresh out of ideas.
# lsmod|grep kvm kvm_intel 86920 0 kvm 226208 2 ksm,kvm_intel # uname -a Linux x3250 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux # virt-install -r 512 -n test -f /dev/vol0/lvol4 --nographics --os-type=linux --os-variant=rhel5.4 --accelerate -w bridge:br0 -l http://centos/centos/x86_64 -x ks=http://centos/centos/kickstart/ks.test.cfg -m 00:16:3e:30:4d:80
Starting install... Retrieving file .treeinfo... | 417 B 00:00 Retrieving file vmlinuz... | 1.9 MB 00:00 Retrieving file initrd.img... | 7.7 MB 00:00 Creating domain... | 0 B 00:00 Connected to domain test Escape character is ^]
Try setting up vnc and use a vnc viewer to administer the guest.
IIRC you're connected to the serial console of the guest, so if your software isn't setup to use the serial port nothing will happen (or output only garbage).
Glenn
Try setting up vnc and use a vnc viewer to administer the guest.
That worked. Thanks!
Unfortunately, it seems the interface bridging doesn't seem to work, the vm says "no network link detected on eth0". This is the ifconfig on the host:
br0 Link encap:Ethernet HWaddr 00:14:5E:6B:B9:BE inet addr:10.2.3.4 Bcast:10.2.3.255 Mask:255.255.255.0 inet6 addr: fe80::214:5eff:fe6b:b9be/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95936 errors:0 dropped:0 overruns:0 frame:0 TX packets:19855 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:50289551 (47.9 MiB) TX bytes:32322314 (30.8 MiB)
eth0 Link encap:Ethernet HWaddr 00:14:5E:6B:B9:BE inet6 addr: fe80::214:5eff:fe6b:b9be/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:104793 errors:0 dropped:0 overruns:0 frame:0 TX packets:38325 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:52621784 (50.1 MiB) TX bytes:33702340 (32.1 MiB) Interrupt:169 Memory:d0200000-d0210000
IIRC you're connected to the serial console of the guest, so if your software isn't setup to use the serial port nothing will happen (or output only garbage).
I see. Will look at this at a later point.
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
On Wed, Jun 9, 2010 at 9:47 AM, Lars Hecking lhecking@users.sourceforge.net wrote:
Unfortunately, it seems the interface bridging doesn't seem to work, the vm says "no network link detected on eth0". This is the ifconfig on the host:
You may want to follow the instructions here:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Virtualiz...
Akemi
You may want to follow the instructions here:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Virtualiz...
I did - just completely ignored the iptables bits as my LAN boxes normally don't have a firewall. Turns out this one did :-O
On to autostarting vms and console access ...
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
IIRC you're connected to the serial console of the guest, so if your software isn't setup to use the serial port nothing will happen (or output only garbage).
I found instructions here
http://blog.zelut.org/2010/05/05/configure-serial-console-access-on-centos-5...
and it kinda works - I can see the start of the boot process, and once finished, I can login via serial console, but do not see the boot output. Still, better than nothing.
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
Hi, Order of console kernel arguments matters, as far as I know, output goes to the last console.
console=tty0 console=ttyS0,115200n8 -> boot output to ttyS0
console=ttyS0,115200n8 console=tty0 -> boot output to tty0
Maybe this could be the reason why do not see output ?
Markus Falb writes:
Hi, Order of console kernel arguments matters, as far as I know, output goes to the last console.
console=tty0 console=ttyS0,115200n8 -> boot output to ttyS0
console=ttyS0,115200n8 console=tty0 -> boot output to tty0
Maybe this could be the reason why do not see output ?
Not sure. I don't have a tty0 console, or any ttyN for that matter; only ttyS0 is enabled in inittab. How would I access tty0 on a headless install, if it existed?
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
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
On Fri, Jun 11, 2010 at 4:17 PM, Lars Hecking lhecking@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
On Wed, Jun 9, 2010 at 7:01 PM, Lars Hecking lhecking@users.sourceforge.net wrote:
I've started playing with kvm on CentOS 5.5, with not much success so far. In a nutshell, I have the same problem as http://lists.centos.org/pipermail/centos-virt/2010-April/001854.html
I have not yet deployed any KVM on CentOS as host OS. However, I have a few production KVM guest OS installs (CentOS 5.3) deployed on openSUSE 11.2 as host; I am running DNS/DHCP and openLDAP running on the guests.
My KVM guests are deployed in small IT shops with 100 nodes max. where there is no full time IT support. So I have sort of put together my own KVM management system (I am not using libvirtd and associated tool set). The guest KVMs are started/shutdown during host OS system boot/shutdwon via my own /etc/init.d/kvminit script.
So far no issues with service availability.
-- Arun Khan