* 2.6.21.1 and kvm-21 just plain stopped...
@ 2007-04-30 16:45 David Brown
[not found] ` <9c21eeae0704300945p26b434c3k9af09f7c452d9cc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: David Brown @ 2007-04-30 16:45 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Yeah, for some reason part way through the boot up of a guest OS it
just stops booting, there isn't any sort of defined place where it
stops either. However, the guest OS does always get to the initrd (but
that maybe because the kernel is so simple). Sometimes it will get all
the way to the root hard drive and init but it usually doesn't get
further than running udev and then it just stops.
I'm running 2.6.21.1 vanilla using the kvm-21 (that includes kernel
modules), the guest OS is debian unstable running their version of
2.6.18.
This seems like some sort of timer issue. The tickless code and high
resolution timer code don't seem to make any difference, I tested with
both. Also, I didn't experience this issue with 2.6.20 using kvm-21.
Any help would be appreciated.
- David Brown
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <9c21eeae0704300945p26b434c3k9af09f7c452d9cc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <9c21eeae0704300945p26b434c3k9af09f7c452d9cc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2007-04-30 18:12 ` Avi Kivity [not found] ` <463631A4.5070704-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Avi Kivity @ 2007-04-30 18:12 UTC (permalink / raw) To: David Brown; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f David Brown wrote: > Yeah, for some reason part way through the boot up of a guest OS it > just stops booting, there isn't any sort of defined place where it > stops either. However, the guest OS does always get to the initrd (but > that maybe because the kernel is so simple). Sometimes it will get all > the way to the root hard drive and init but it usually doesn't get > further than running udev and then it just stops. > > I'm running 2.6.21.1 vanilla using the kvm-21 (that includes kernel > modules), the guest OS is debian unstable running their version of > 2.6.18. > > This seems like some sort of timer issue. The tickless code and high > resolution timer code don't seem to make any difference, I tested with > both. Also, I didn't experience this issue with 2.6.20 using kvm-21. > > Any help would be appreciated. Host cpu type, host bitness, guest bitness, and qemu command line please. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <463631A4.5070704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <463631A4.5070704-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-04-30 18:45 ` David Brown [not found] ` <9c21eeae0704301145w5051a40fgc87e3f1377ebfbba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: David Brown @ 2007-04-30 18:45 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f > Host cpu type, host bitness, guest bitness, and qemu command line please. > Oh sorry, forgot about that stuff. root@dmlb2010-lappy:~# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 14 model name : Genuine Intel(R) CPU U2500 @ 1.20GHz stepping : 8 cpu MHz : 1200.000 cache size : 2048 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr bogomips : 2396.92 clflush size : 64 processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 14 model name : Genuine Intel(R) CPU U2500 @ 1.20GHz stepping : 8 cpu MHz : 1200.000 cache size : 2048 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr bogomips : 2394.67 clflush size : 64 root@dmlb2010-lappy:~# uname -a Linux dmlb2010-lappy 2.6.20.10 #1 SMP Mon Apr 30 03:17:41 PDT 2007 i686 GNU/Linux root@dmlb2010-lappy:~# And the guest OS is also an i686, and this is the little script I use to start the debian guest. root@dmlb2010-lappy:~# cat /root/bin/start-debian #!/bin/bash KVER="2.6.18-4-686" INITRD_BASE="initrd" INITRD_APPEND=".img" APPEND="ro root=/dev/hda1" DEV=mapper/VolGroup00-debian BOOT=mapper/VolGroup00-debian--boot qemu -kernel "/root/boot/vmlinuz-${KVER}" \ -initrd "/root/boot/${INITRD_BASE}${INITRD_APPEND}-${KVER}" \ -append "${APPEND}" \ -m 512 --no-rtc \ \ -usb \ -soundhw es1370 \ -net nic,vlan0,macaddr=52:54:56:34:12:00 \ -net tap,vlan=0,ifname=tap0 \ -hdb "/dev/$BOOT" \ /dev/$DEV root@dmlb2010-lappy:~# ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <9c21eeae0704301145w5051a40fgc87e3f1377ebfbba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <9c21eeae0704301145w5051a40fgc87e3f1377ebfbba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2007-05-01 6:18 ` Avi Kivity [not found] ` <4636DBA8.8050906-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2007-05-01 16:20 ` Daniel P. Berrange 1 sibling, 1 reply; 8+ messages in thread From: Avi Kivity @ 2007-05-01 6:18 UTC (permalink / raw) To: David Brown; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f David Brown wrote: >> Host cpu type, host bitness, guest bitness, and qemu command line >> please. >> > > Oh sorry, forgot about that stuff. > > model name : Genuine Intel(R) CPU U2500 @ 1.20GHz > Ugh, a Core-not-2. I'll see if I can find one here. > > qemu -kernel "/root/boot/vmlinuz-${KVER}" \ > -initrd "/root/boot/${INITRD_BASE}${INITRD_APPEND}-${KVER}" \ > -append "${APPEND}" \ > -m 512 --no-rtc \ > \ > -usb \ > -soundhw es1370 \ > -net nic,vlan0,macaddr=52:54:56:34:12:00 \ > -net tap,vlan=0,ifname=tap0 \ > -hdb "/dev/$BOOT" \ > /dev/$DEV > root@dmlb2010-lappy:~# Hey, this isn't Xen, you can boot from a kernel contained in the disk image. Does the problem occur with -no-kvm? -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <4636DBA8.8050906-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <4636DBA8.8050906-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-05-01 16:05 ` David Brown [not found] ` <9c21eeae0705010905t3646f104ge934e472ecc0d49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: David Brown @ 2007-05-01 16:05 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f > > qemu -kernel "/root/boot/vmlinuz-${KVER}" \ > > -initrd "/root/boot/${INITRD_BASE}${INITRD_APPEND}-${KVER}" \ > > -append "${APPEND}" \ > > -m 512 --no-rtc \ > > \ > > -usb \ > > -soundhw es1370 \ > > -net nic,vlan0,macaddr=52:54:56:34:12:00 \ > > -net tap,vlan=0,ifname=tap0 \ > > -hdb "/dev/$BOOT" \ > > /dev/$DEV > > root@dmlb2010-lappy:~# > > Hey, this isn't Xen, you can boot from a kernel contained in the disk image. > > Does the problem occur with -no-kvm? But.. but Xen is the one true master of virtualization technology, anyone who comes after must blindly follow or perish in the fires of their own creation!! </sarcasm> But, anyway... So I should be installing boot loaders to the guest OS's? hmmm I'll have to figure out how to do that since I don't think I installed grub. Also, are their any other Xenism's that I have to purge before continuing? Also, I'm kinda afraid to try this with --no-kvm from what I understand that will drastically reduce the performance of the guest and host OS, is that true? Thanks, - David Brown ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <9c21eeae0705010905t3646f104ge934e472ecc0d49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <9c21eeae0705010905t3646f104ge934e472ecc0d49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2007-05-01 16:13 ` Avi Kivity 0 siblings, 0 replies; 8+ messages in thread From: Avi Kivity @ 2007-05-01 16:13 UTC (permalink / raw) To: David Brown; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f David Brown wrote: >> > qemu -kernel "/root/boot/vmlinuz-${KVER}" \ >> > -initrd "/root/boot/${INITRD_BASE}${INITRD_APPEND}-${KVER}" \ >> > -append "${APPEND}" \ >> > -m 512 --no-rtc \ >> > \ >> > -usb \ >> > -soundhw es1370 \ >> > -net nic,vlan0,macaddr=52:54:56:34:12:00 \ >> > -net tap,vlan=0,ifname=tap0 \ >> > -hdb "/dev/$BOOT" \ >> > /dev/$DEV >> > root@dmlb2010-lappy:~# >> >> Hey, this isn't Xen, you can boot from a kernel contained in the disk >> image. >> >> Does the problem occur with -no-kvm? > > But.. but Xen is the one true master of virtualization technology, > anyone who comes after must blindly follow or perish in the fires of > their own creation!! </sarcasm> > > But, anyway... So I should be installing boot loaders to the guest > OS's? hmmm I'll have to figure out how to do that since I don't think > I installed grub. Also, are their any other Xenism's that I have to > purge before continuing? You don't have to purge anything. If you have an existing Xen guest, you can work with it as is; no need to install grub if you dont want to. For new installs, of course it is easier to fire up the native installer which does everything for you. Things like updating the guest kernel and initrd are usually much easier if the kernel is contained within the guest disk image. Similarly, copying an image or backing it up is simpler if you don't have to worry about the kernel. > > Also, I'm kinda afraid to try this with --no-kvm from what I > understand that will drastically reduce the performance of the guest > and host OS, is that true? Guest performance will be lower, but just for the test. The -no-kvm option is very useful in determining whether the problem is in the kernel or userspace. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <9c21eeae0704301145w5051a40fgc87e3f1377ebfbba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2007-05-01 6:18 ` Avi Kivity @ 2007-05-01 16:20 ` Daniel P. Berrange [not found] ` <20070501162028.GC3995-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 1 sibling, 1 reply; 8+ messages in thread From: Daniel P. Berrange @ 2007-05-01 16:20 UTC (permalink / raw) To: David Brown; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 1462 bytes --] On Mon, Apr 30, 2007 at 11:45:36AM -0700, David Brown wrote: > > Host cpu type, host bitness, guest bitness, and qemu command line please. > > > > root@dmlb2010-lappy:~# cat /root/bin/start-debian > #!/bin/bash > > KVER="2.6.18-4-686" > INITRD_BASE="initrd" > INITRD_APPEND=".img" > APPEND="ro root=/dev/hda1" > DEV=mapper/VolGroup00-debian > BOOT=mapper/VolGroup00-debian--boot > > qemu -kernel "/root/boot/vmlinuz-${KVER}" \ > -initrd "/root/boot/${INITRD_BASE}${INITRD_APPEND}-${KVER}" \ > -append "${APPEND}" \ > -m 512 --no-rtc \ > \ > -usb \ > -soundhw es1370 \ > -net nic,vlan0,macaddr=52:54:56:34:12:00 \ > -net tap,vlan=0,ifname=tap0 \ > -hdb "/dev/$BOOT" \ > /dev/$DEV > root@dmlb2010-lappy:~# How big is your initrd image ? There was a QEMU bug which causes the end of the initrd to be overwritten by the kernel if the initd was larger than 1 MB IIRC. Upstream QEMU CVS has the patch, but the current KVM SVN repo does not seem to have it. I'm attaching the patch we applied to KVM-19's copy of QEMU in Fedora to fix, although it doesn't apply cleanly to current KVM dev. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| [-- Attachment #2: kvm-19-initrd.patch --] [-- Type: text/plain, Size: 2923 bytes --] Index: hw/pc.c =================================================================== RCS file: /sources/qemu/qemu/hw/pc.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -p -r1.71 -r1.72 --- hw/pc.c 5 Mar 2007 19:44:02 -0000 1.71 +++ hw/pc.c 31 Mar 2007 19:41:22 -0000 1.72 @@ -32,9 +32,11 @@ #define LINUX_BOOT_FILENAME "linux_boot.bin" #define KERNEL_LOAD_ADDR 0x00100000 -#define INITRD_LOAD_ADDR 0x00600000 +#define MAX_INITRD_LOAD_ADDR 0x38000000 #define KERNEL_PARAMS_ADDR 0x00090000 #define KERNEL_CMDLINE_ADDR 0x00099000 +/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */ +#define ACPI_DATA_SIZE 0x10000 static fdctrl_t *floppy_controller; static RTCState *rtc_state; @@ -452,6 +454,7 @@ static void pc_init1(int ram_size, int v char buf[1024]; int ret, linux_boot, initrd_size, i; ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset; + ram_addr_t initrd_offset; int bios_size, isa_bios_size, vga_bios_size; PCIBus *pci_bus; int piix3_devfn = -1; @@ -599,8 +602,28 @@ static void pc_init1(int ram_size, int v /* load initrd */ initrd_size = 0; + initrd_offset = 0; if (initrd_filename) { - initrd_size = load_image(initrd_filename, phys_ram_base + INITRD_LOAD_ADDR); + initrd_size = get_image_size (initrd_filename); + if (initrd_size > 0) { + initrd_offset = (ram_size - initrd_size) & TARGET_PAGE_MASK; + /* Leave space for BIOS ACPI tables. */ + initrd_offset -= ACPI_DATA_SIZE; + /* Avoid the last 64k to avoid 2.2.x kernel bugs. */ + initrd_offset -= 0x10000; + if (initrd_offset > MAX_INITRD_LOAD_ADDR) + initrd_offset = MAX_INITRD_LOAD_ADDR; + + if (initrd_size > ram_size + || initrd_offset < KERNEL_LOAD_ADDR + ret) { + fprintf(stderr, + "qemu: memory too small for initial ram disk '%s'\n", + initrd_filename); + exit(1); + } + initrd_size = load_image(initrd_filename, + phys_ram_base + initrd_offset); + } if (initrd_size < 0) { fprintf(stderr, "qemu: could not load initial ram disk '%s'\n", initrd_filename); @@ -608,7 +631,7 @@ static void pc_init1(int ram_size, int v } } if (initrd_size > 0) { - stl_raw(phys_ram_base + KERNEL_PARAMS_ADDR + 0x218, INITRD_LOAD_ADDR); + stl_raw(phys_ram_base + KERNEL_PARAMS_ADDR + 0x218, initrd_offset); stl_raw(phys_ram_base + KERNEL_PARAMS_ADDR + 0x21c, initrd_size); } pstrcpy(phys_ram_base + KERNEL_CMDLINE_ADDR, 4096, [-- Attachment #3: Type: text/plain, Size: 286 bytes --] ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ [-- Attachment #4: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20070501162028.GC3995-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: 2.6.21.1 and kvm-21 just plain stopped... [not found] ` <20070501162028.GC3995-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2007-05-02 0:57 ` David Brown 0 siblings, 0 replies; 8+ messages in thread From: David Brown @ 2007-05-02 0:57 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f > How big is your initrd image ? There was a QEMU bug which causes the > end of the initrd to be overwritten by the kernel if the initd was > larger than 1 MB IIRC. Upstream QEMU CVS has the patch, but the current > KVM SVN repo does not seem to have it. I'm attaching the patch we applied > to KVM-19's copy of QEMU in Fedora to fix, although it doesn't apply cleanly > to current KVM dev. > This might have been the issue, since I started to switch over to using the boot loader in the image to load the kernel and initrd things are working and this problem doesn't appear to be an issue with either tickless or non-tickless 2.6.21 kernels. Thanks, - David Brown P.S. Sorry for getting back to this so late, recompiling your entire kernel because you changed the tickless stuff does take some time... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-05-02 0:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 16:45 2.6.21.1 and kvm-21 just plain stopped David Brown
[not found] ` <9c21eeae0704300945p26b434c3k9af09f7c452d9cc4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-04-30 18:12 ` Avi Kivity
[not found] ` <463631A4.5070704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-30 18:45 ` David Brown
[not found] ` <9c21eeae0704301145w5051a40fgc87e3f1377ebfbba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-01 6:18 ` Avi Kivity
[not found] ` <4636DBA8.8050906-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-01 16:05 ` David Brown
[not found] ` <9c21eeae0705010905t3646f104ge934e472ecc0d49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-01 16:13 ` Avi Kivity
2007-05-01 16:20 ` Daniel P. Berrange
[not found] ` <20070501162028.GC3995-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-05-02 0:57 ` David Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox