Glen Eustace
2008-May-11 02:52 UTC
[Xen-users] xm create error - Unable to allocate memory
I have had reasonable success with para-virtualised domUs and so tried my first fully virtualised domU today. I am hoping to migrate a Win2k3 server into my Xen environment. I am not getting very far as I get the following when trying to create the DomU. I have tied various values for ''memory'' but none make any difference. The server is running Linux version 2.6.21.7-3.fc8xen on a 64-bit host. Any help would be much appreciated. xm create /etc/xen/agree-20 Using config file "/etc/xen/agree-20". Error: (12, ''Cannot allocate memory'') The config file is; name = "agree-20" device_model = "/usr/lib64/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" builder = "hvm" memory = 512 vcpus = 1 bootloader = "/usr/bin/pygrub" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" sdl = 0 vnc = 1 vncunused = 1 disk = [ "tap:aio:/var/lib/VirtualMachines/agree-20.img,hda,w" ] vif = [ ''type=ioemu, bridge=xenbr0'' ] apic=1 acpi=1 pae=1 serial = "pty" # enable serial console [agree-26]xen: xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1372 4 r----- 2503.3 agree-11 13 512 2 -b---- 1938.8 agree-12 18 128 1 -b---- 253.7 agree-15 10 1024 2 -b---- 812.6 agree-29 17 128 1 -b---- 413.0 agree-3 16 128 1 -b---- 223.9 agree-30 15 256 1 -b---- 289.6 agree-31 14 256 1 -b---- 721.0 agree-32 12 128 1 -b---- 457.1 -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Glen and Rosanne Eustace GodZone Internet Services, a division of AGRE Enterprises Ltd. P.O. Box 8020, Palmerston North, New Zealand 4446. Ph: +64 6 357 8168, Fax +64 6 357 8165, Mob: +64 21 424 015 http://www.godzone.net.nz "A Ministry specialising in providing low-cost Internet Services to NZ Christian Churches, Ministries and Organisations." _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-11 03:06 UTC
Re: [Xen-users] xm create error - Unable to allocate memory
Hi Glen, On Sat, May 10, 2008 at 10:52 PM, Glen Eustace <geustace@godzone.net.nz> wrote:> I have had reasonable success with para-virtualised domUs and so tried my > first fully virtualised domU today. I am hoping to migrate a Win2k3 server > into my Xen environment. > > I am not getting very far as I get the following when trying to create the > DomU. I have tied various values for ''memory'' but none make any difference. > The server is running Linux version 2.6.21.7-3.fc8xen on a 64-bit host. Any > help would be much appreciated. > > xm create /etc/xen/agree-20 > Using config file "/etc/xen/agree-20". > Error: (12, ''Cannot allocate memory'') >Did you notice the cannot allocate memory error? do you have enough free memory? Also some suggestions inline below.> > The config file is; > name = "agree-20" > device_model = "/usr/lib64/xen/bin/qemu-dm"change this kernel= line to: bootloader=/usr/lib64/xen/boot/hvmloade I put lib64, it might just be lib, but since you said you are running 64bit that would probably be the way to go. kernel = "/usr/lib/xen/boot/hvmloader">> builder = "hvm" > memory = 512 > vcpus = 1remove this bootloader line> bootloader = "/usr/bin/pygrub"> > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > sdl = 0 > vnc = 1 > vncunused = 1 > disk = [ "tap:aio:/var/lib/VirtualMachines/agree-20.img,hda,w" ] > vif = [ ''type=ioemu, bridge=xenbr0'' ]why do you have both of these?> > apic=1 > acpi=1I would consider disabling them (comment them with # if things don''t work, you can always add them in later) I would also consider not have these last two unless you need them too. I don''t have a lot of experience with windows, especially 2k3, but the suggestions above should at least get you farther and then the windows guest users can help even more if needed or you could search: xen.markmail.org for more suggestions as well.> > pae=1 > serial = "pty" # enable serial console > > [agree-26]xen: xm list > Name ID Mem VCPUs State Time(s) > Domain-0 0 1372 4 r----- 2503.3 > agree-11 13 512 2 -b---- 1938.8 > agree-12 18 128 1 -b---- 253.7 > agree-15 10 1024 2 -b---- 812.6 > agree-29 17 128 1 -b---- 413.0 > agree-3 16 128 1 -b---- 223.9 > agree-30 15 256 1 -b---- 289.6 > agree-31 14 256 1 -b---- 721.0 > agree-32 12 128 1 -b---- 457.1 > >Try running xm top to see if you have enough RAM to add another one, you could consider giving some guests less RAM if you don''t have enough. Regards, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Glen Eustace
2008-May-11 06:22 UTC
Re: [Xen-users] xm create error - Unable to allocate memory
> xm create /etc/xen/agree-20 > Using config file "/etc/xen/agree-20". > Error: (12, ''Cannot allocate memory'') > > > Did you notice the cannot allocate memory error? do you have enough free > memory?Yep, that is the whole point :-) There is lots of memory available and I only get this when attempting to start the fully virtualised domU. Starting a para-virtualised domU works fine,> kernel = "/usr/lib/xen/boot/hvmloader"This seems to be the culprit. Commenting it out and the domU now starts, but I am now going to have to work out why I can''t get a console :-) But progress at last _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stein, Tim
2008-May-11 07:28 UTC
Re: [Xen-users] xm create error - Unable to allocate memory
Am Sonntag, 11. Mai 2008 schrieb Glen Eustace:> This seems to be the culprit. Commenting it out and the domU now > starts, but I am now going to have to work out why I can''t get a console''xm console'' doesn''t work for Windows because there is no console offered by this OS. You''ve to use VNC. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-11 23:26 UTC
Re: [Xen-users] xm create error - Unable to allocate memory
On Sun, May 11, 2008 at 3:28 AM, Stein, Tim <Tim.O.Stein@mnd.fh-friedberg.de> wrote:> Am Sonntag, 11. Mai 2008 schrieb Glen Eustace: > > > This seems to be the culprit. Commenting it out and the domU now > > starts, but I am now going to have to work out why I can''t get a console > > ''xm console'' doesn''t work for Windows because there is no console offered > by > this OS. You''ve to use VNC. >An alternative to VNC is to use sdl, just set sdl=1 in your config (instead of vnc=1). Cheers, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Glen Eustace
2008-May-11 23:51 UTC
[Xen-users] Re: xm create error - Unable to allocate memory
> An alternative to VNC is to use sdl, just set sdl=1 in your config (instead > of vnc=1).The Xen host has no graphical capability, i.e. no monitor and X not installed. I have been trying to get VNC going. It is kind of weird. If I include a ''boot ='' in the config file, I can''t get a connection, virt-viewer displays ''unable to find vnc graphics for agree-20'' If I take the boot parameter out, I can connect but the BIOS tries to load from the HD which hasn''t even been formatted yet. PS: It would seem that the memory allocation issue, was more to do with not having a vfb defined. as I have now had to put the kernel parameter back in. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-12 00:03 UTC
Re: [Xen-users] Re: xm create error - Unable to allocate memory
On Sun, May 11, 2008 at 7:51 PM, Glen Eustace <geustace@godzone.net.nz> wrote:> An alternative to VNC is to use sdl, just set sdl=1 in your config > > (instead > > of vnc=1). > > > > The Xen host has no graphical capability, i.e. no monitor and X not > installed. >So vnc is probably your best choice until you can get in and configure remote desktop.> > I have been trying to get VNC going. It is kind of weird. If I include a > ''boot ='' in the config file, I can''t get a connection, virt-viewer displays > ''unable to find vnc graphics for agree-20'' >are you referring to the bootloader = ...pygrub line? If so, then pygub might actually be able to run in an ncurses (i.e. console) environment but you won''t be able to use it to boot windows yet probably. You will want to use the vnc=1 line You will also need to configure vnc in the /etc/xen/xend-config.sxp file. add a vnc-listen line: (vnc-listen ''0.0.0.0'') make sure also that you have a vncpasswd line (vncpasswd '''') Then, after booting the windows guest you should be able to connect to it by using a vncviewer to the IP of the dom0.> If I take the boot parameter out, I can connect but the BIOS tries to load > from the HD which hasn''t even been formatted yet. > > PS: It would seem that the memory allocation issue, was more to do with > not having a vfb defined. as I have now had to put the kernel parameter > back in. >which vfb line are you referring to? Cheers, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-May-12 01:44 UTC
Re: [Xen-users] Re: xm create error - Unable to allocate memory
On Sun, May 11, 2008 at 9:31 PM, Glen Eustace <geustace@godzone.net.nz> wrote:> What I currently have is below, if I comment out the ''boot ='', the vnc > listener starts, if I have it in it doesn''t. But to install windows, I need > to boot off of the CD. >check the /var/log/xen/qemu* log that is created with the boot= and the without the boot= case I think you might be able to get rid of the stdvga line and also the vncunused line. You should also be able to get rid of the vfb= line. Try changing the boot= line to boot="d" alternatively, boot="cd" Cheers, Todd> > > name = "agree-20" > device_model = "/usr/lib64/xen/bin/qemu-dm" > kernel = "/usr/lib/xen/boot/hvmloader" > builder = "hvm" > memory = 512 > vcpus = 1 > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > sdl = 0 > vnc = 1 > vncunused = 1 > disk = [ > "tap:aio:/var/lib/VirtualMachines/agree-20.img,hda,w","phy:/dev/sr0,hdc:cdrom,r" > ] > boot = [ ''d'' ] > vif = [ ''type=ioemu, bridge=xenbr0'' ] > apic=0 > acpi=0 > pae=0 > stdvga = 1 > vfb = [ ''type=vnc'' ] > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users