Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a fresh Ubuntu 12.04.1 amd64 server install following this guide

I have used LVM option used all disk and make 2 LV

/dev/mapper/vg-root / (80GB)
vg-swap swap (4GB)

now i install xen with apt-get install xen-hypervisor-4.1-amd64 and config /etc/default/grub like the guide and add

GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=768M"

later all this i exec update-grub and reboot. but when i try to boot with Xen 4.1-amd64 always i get a kernel panic with the message

Domain-0 allocation is too small for kernel image

my questions are:

  • this error is about what?
  • where i can grow this allocation for avoid this error?

grub.cfg

menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
        insmod part_gpt
        insmod ext2
        set root='(hd0,gpt2)'
        search --no-floppy --fs-uuid --set=root 3541e241-7f39-4ebe-8d99-c5306294c266
        echo    'Loading Xen 4.1-amd64 ...'
        multiboot       /xen-4.1-amd64.gz placeholder  dom0_mem=768M
        echo    'Loading Linux 3.2.0-29-generic ...'
        module  /vmlinuz-3.2.0-29-generic placeholder root=/dev/mapper/backup--xen-root ro rootdelay=180
        echo    'Loading initial ramdisk ...'
        module  /initrd.img-3.2.0-29-generic
}

Note: I've followed this guide too

share|improve this question
    
What options are being passed to the kernel & zen by grub? –  Matt Oct 30 '12 at 2:56
    
i've added grub.cfg generated by update-grubcommand –  rkmax Oct 30 '12 at 3:20
add comment

3 Answers

I am working on the same problem. Haven't found a solution... yet. Things worth trying:

  • Try using dom0_mem=min:8192M,max:8192M to set the exact amount of memory
  • Try using dom0_max_vcpus=2 to set the number of cpu's
share|improve this answer
    
This doesn't answer the question or add any value. What is the purpose of posting our config file? –  chutz Oct 30 '12 at 14:58
    
I removed the config which was trying to show other possible solutions to try (they didn't happen to work for me but might work for rkmax). Simplified it to the relevant section of the config. –  bryfry Oct 31 '12 at 13:44
    
Note, if you have more than 8 CPU's (hyperthread counts for 1), for instance with 2 quadcore cpu's, ubuntu 12.04 LTS xen will hang at boot. –  Glenn Plas Mar 29 '13 at 15:17
    
@GlennPlas any solution to work around that limitation or is that just a known bug? –  bryfry Mar 30 '13 at 2:54
    
I don't think it's a bug, there is really no reason to hand out 16 CPu's to dom0. With 2 VCPU's you can serve about 70 vm's. When it froze on me , I immediately thought about the (new) cpu's. I did read somewhere in advance. The solution is simple, i've put it below already: "dom0_mem=1G,max:1G dom0_max_vcpus=2 dom0_vcpus_pin=1". And then it was all fine –  Glenn Plas Apr 1 '13 at 15:30
add comment

I know the xen docs state it should be possible to use megabytes but did you try giving the dom0 mem as kilobytes?

submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 2f49dfec-199f-427a-a6e3-64cf39a94c05
        echo    'Loading Xen 4.1-amd64 ...'
        multiboot       /boot/xen-4.1-amd64.gz placeholder  dom0_mem=2097152 dom0_max_vcpus=2 dom0_vcpus_pin=0,1
        echo    'Loading Linux 3.2.0-29-generic ...'
        module  /boot/vmlinuz-3.2.0-29-generic placeholder root=UUID=2f49dfec-199f-427a-a6e3-64cf39a94c05 ro  
        echo    'Loading initial ramdisk ...'
        module  /boot/initrd.img-3.2.0-29-generic
}

This works for me under Ubuntu 12.04.

share|improve this answer
    
I'll try it and comment after –  rkmax Oct 30 '12 at 14:47
    
I tried it and still the same error, I've changed the value from 786m to 768634 still not working –  rkmax Oct 30 '12 at 15:25
    
So I see one main difference between both "not-running" setups and mine running: you are using gpt partitions - is it an option to try it with traditional msdos-style partition table? –  tim Oct 31 '12 at 15:27
    
yes but check this example are using gpt partitions –  rkmax Oct 31 '12 at 17:04
    
They're using xen-4.2 as far as I see. –  tim Nov 1 '12 at 8:13
show 1 more comment

For me this works:

GRUB_DEFAULT="Xen 4.1-amd64"
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="apparmor=0"
GRUB_CMDLINE_XEN="dom0_mem=1G,max:1G dom0_max_vcpus=2 dom0_vcpus_pin=1"

That is from /etc/default/grub

You will have to run update-grub after that.

For a good guide on setting up xen with xcp, check this one. That one helped me a lot to understand things. The guide you use is using XM, which is deprecated soon. xcp-xapi is the way to go.

How much ram do you have in total? There is usually no real need to allocate a lot to dom0. Starting from 70 guest I would consider 2 CPU's and more RAM but from what I read, running it on 2 is overkill for my situation, but pinning them and dedicating 1G to dom0, it's working better than before really (for me).

But there are things that went different for me consistently on different physical machines, like the bridge vs openswitch stuff. I discovered that whatever you entered, openswitch options was saved to the config. So I recommend manually creating the bridges since the script don't get it right always , especially with 1 NIC. I removed openswitch and used bridging, that is very stable. When xcp-xapi sees you have a bridge already present it will not touch it.

I also didn't have to do the "vncterm keymaps" fix. And I used the official repo's , not PPA's.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.