Dear All, I am running a clean installation of xen 4.1 in ubuntu 12.04. I was able to run Xen Dom 0 succesfully but once I tryed to configure a VM I encounter problems. I am doing a VM installation on LVM. I had been able to install the OS in the VM partition but once I am tryng to start the VM start the problems. I am new in Xen I am not sure how to follow. I think the problem is on the booting of the VM as there were know issues with pygrub and grub which I was able to solve. Once I do @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 I am getting the booting screen from grub but after it crashes and give the following output. @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 Using <class ''grub.GrubConf. Grub2ConfigFile''> to parse /grub/grub.cfg WARNING:root:Unknown directive load_video WARNING:root:Unknown directive terminal_output WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive export WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive gfxmode WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive linux16 WARNING:root:Unknown image directive linux16 WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive source linux (kernel /var/run/xend/boot/boot_kernel.oWMMn4)(ramdisk /var/run/xend/boot/boot_ramdisk.OrM_CD)(args "root=/dev/mapper/nagios01-root ro console=hvc0 quiet splash $vt_handoff ") Below you will find all the details of the installation. Please feel free to ask any question or data to further troubleshoot and solve this problem. Thanks, Christian ---------------------------------------------------------------------------------------------------- @server02:/var/lib/xen/images/ubuntu-netboot$ uname -a Linux server02 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux server02:/etc/network$ sudo fdisk -l Disk /dev/sda: 73.4 GB, 73407820800 bytes 255 heads, 63 sectors/track, 8924 cylinders, total 143374650 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000e93e4 Device Boot Start End Blocks Id System /dev/sda1 * 2048 1953791 975872 83 Linux /dev/sda2 60549118 143374335 41412609 5 Extended /dev/sda3 1953792 60547071 29296640 83 Linux /dev/sda5 126599168 143374335 8387584 82 Linux swap / Solaris /dev/sda6 60549120 126599167 33025024 8e Linux LVM Partition table entries are not in disk order Disk /dev/sdb: 73.4 GB, 73407820800 bytes 255 heads, 63 sectors/track, 8924 cylinders, total 143374650 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00061542 Device Boot Start End Blocks Id System /dev/sdb1 2048 143374335 71686144 8e Linux LVM @server02:/etc/network$ sudo pvdisplay --- Physical volume --- PV Name /dev/sda6 VG Name VolGroup00 PV Size 31.50 GiB / not usable 3.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 8062 Free PE 8062 Allocated PE 0 PV UUID KSHrVG-OEkR-Y8eT-Rcsj-sxSJ-WiDQ-Orp9v9 --- Physical volume --- PV Name /dev/sdb1 VG Name VolGroup00 PV Size 68.37 GiB / not usable 2.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 17501 Free PE 17501 Allocated PE 0 PV UUID wYhGAU-QT0k-oxS0-yBGx-JVnd-8NXk-GpX7xw server02:/etc/network$ sudo vgdisplay VolGroup00 --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 99.86 GiB PE Size 4.00 MiB Total PE 25563 Alloc PE / Size 0 / 0 Free PE / Size 25563 / 99.86 GiB VG UUID wtznZA-CuAW-eE6n-ZLcG-5Sn5-m2Gy-1NVENF @server02:~$ sudo xm list Name ID Mem VCPUs State Time(s) Domain-0 0 7455 2 r----- 244.4 @server02:/var/lib/xen/images/ubuntu-netboot$ ls initrd.gz vmlinuz Set up the initial guest configuration: /etc/xen/ubuntu.cfg me = "VM01" memory = 512 disk = [''phy:/dev/VolGroup00/VM01,xvda,w''] vif = ['' ''] kernel = "/var/lib/xen/images/ubuntu-netboot/vmlinuz" ramdisk = "/var/lib/xen/images/ubuntu-netboot/initrd.gz" extra = "debian-installer/exit/always_halt=true -- console=hvc0" Start the VM and connect to console (-c): @server02:/$sudo xm create /etc/xen/VM01.cfg -c In the installation process I choose to create Full LVM partition plus grub installation Install the Ubuntu as VM Set up the initial guest configuration and update it: /etc/xen/ubuntu.cfg me = "VM01" memory = 512 disk = [''phy:/dev/VolGroup00/VM01,xvda,w''] vif = ['' ''] bootloader = "/usr/bin/pygrub" kernel = "/var/lib/xen/images/ubuntu-netboot/vmlinuz" ramdisk = "/var/lib/xen/images/ubuntu-netboot/initrd.gz" extra = "debian-installer/exit/always_halt=true -- console=hvc0" @server02:/etc/xen$ sudo xm create /etc/xen/VM01.cfg -c Using config file "/etc/xen/VM01.cfg". Error: Boot loader didn''t return any data! christian@server02:/etc/xen$ sudo fdisk -l /dev/VolGroup00/VM01 Disk /dev/VolGroup00/VM01: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00033568 Device Boot Start End Blocks Id System /dev/VolGroup00/VM01p1 2048 499711 248832 83 Linux /dev/VolGroup00/VM01p2 501758 20969471 10233857 5 Extended /dev/VolGroup00/VM01p5 501760 20969471 10233856 8e Linux LVM The important things are: - Sector size -> 512 - Start of the partition slice -> 2048 Now fire up an calculator and multiply these number to get the correct offset: 512 * 2048 = 1048576 With this value you can already mount the partition. christian@server02:/etc/xen$ sudo mount -o offset=1048576 /dev/VolGroup00/VM01 /xen - Open the grub.cfg file (/grub/grub.cfg) in your favorite editor. - Change msdos infos to a normal grub entry - replace hd0,msdos1 -> hd0,0 Trying to create VM @server02:/var/log/xen$ sudo xm create /etc/xen/VM01.cfg Using config file "/etc/xen/VM01.cfg". Error: Boot loader didn''t return any data! log [2012-11-28 11:28:28 1272] DEBUG (XendDomainInfo:3071) XendDomainInfo.destroy: domid=5 [2012-11-28 11:28:28 1272] DEBUG (XendDomainInfo:2406) No device model [2012-11-28 11:28:28 1272] DEBUG (XendDomainInfo:2408) Releasing devices [2012-11-28 11:28:28 1272] ERROR (XendDomainInfo:108) Domain construction failed Traceback (most recent call last): File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 106, in create vm.start() File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start XendTask.log_progress(31, 60, self._initDomain) File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress retval = func(*args, **kwds) File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2838, in _initDomain self._configureBootloader() File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 3285, in _configureBootloader bootloader_args, kernel, ramdisk, args) File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendBootloader.py", line 215, in bootloader raise VmError, msg VmError: Boot loader didn''t return any data! @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 Using <class ''grub.GrubConf.Grub2ConfigFile''> to parse /grub/grub.cfg WARNING:root:Unknown directive load_video WARNING:root:Unknown directive terminal_output WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive export WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive gfxmode WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive linux16 WARNING:root:Unknown image directive linux16 WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive source linux (kernel /var/run/xend/boot/boot_kernel.oWMMn4)(ramdisk /var/run/xend/boot/boot_ramdisk.OrM_CD)(args "root=/dev/mapper/nagios01-root ro console=hvc0 quiet splash $vt_handoff ") _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2012-Nov-28 18:50 UTC
Re: WARNING:root:Unknown image directive recordfail
Hello. A quick googling for "pygrub WARNING:root:Unknown directive" suggests that pygrub is confused by Grub2 config file format, particularly submenus. Have you already checked that? http://www.magicspace.eu/linux/fix-pygrub-booting-of-debian-squeeze/ http://www.virtualzone.de/2012/06/ubuntu-vm-not-starting-on-xenserver.html Additionally, I would like to make two observation on the configuration you posted. If you use "bootloader = /usr/bin/pygrub", it''s better to comment out "kernel" and "ramdisk" directives. The .cfg file parser will surely find it''s way, but it might be confusing to human eyes and easer to make mistakes. Maybe you wish to reconsider your disk partitioning schema. Since you are already use LVM, there shall be no need for extended partition. A usable setup is to put /boot on a partition, and send everything else to LVM, which is great for making changes and doing snapshot-based backups. Of course it''s not mandatory, just a more flexible way to do things. Definitely this has nothing to do with the initial problem you are facing. Greetings. -- Alexandre Kouznetsov
Christian Mayorga
2012-Nov-29 10:52 UTC
Re: WARNING:root:Unknown image directive recordfail
http://www.magicspace.eu/linux/fix-pygrub-booting-of-debian-squeeze/ --> I already change this one and I got the following output from pygrub: @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 Using <class ''grub.GrubConf. Grub2ConfigFile''> to parse /grub/grub.cfg WARNING:root:Unknown directive load_video WARNING:root:Unknown directive terminal_output WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive export WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive gfxmode WARNING:root:Unknown image directive recordfail WARNING:root:Unknown image directive linux16 WARNING:root:Unknown image directive linux16 WARNING:root:Unknown directive else WARNING:root:Unknown directive else WARNING:root:Unknown directive source linux (kernel /var/run/xend/boot/boot_kernel.oWMMn4)(ramdisk /var/run/xend/boot/boot_ramdisk.OrM_CD)(args "root=/dev/mapper/nagios01-root ro console=hvc0 quiet splash $vt_handoff ") http://www.virtualzone.de/2012/06/ubuntu-vm-not-starting-on-xenserver.html--> in my xen installation I dont have the command referenced in the blog: xe-edit-bootloader -n your_vm_name -p 1 Additionally, I would like to make two observation on the configuration you posted. If you use "bootloader = /usr/bin/pygrub", it''s better to comment out "kernel" and "ramdisk" directives. The .cfg file parser will surely find it''s way, but it might be confusing to human eyes and easer to make mistakes. --> what do you mean with "The .cfg file parser will surely find it''s way"? Can you please explain? Maybe you wish to reconsider your disk partitioning schema. Since you are already use LVM, there shall be no need for extended partition. A usable setup is to put /boot on a partition, and send everything else to LVM, which is great for making changes and doing snapshot-based backups. Of course it''s not mandatory, just a more flexible way to do things. Definitely this has nothing to do with the initial problem you are facing. --> Agree, this is the first time I am using Xen and the virtualization world is new for me, This is a test environment and I wanted to have asap the VM running, thats why I used the LVM default option on the installation menu. But I will follow your recommendation in further installations. Regards, Christian On Wed, Nov 28, 2012 at 7:50 PM, Alexandre Kouznetsov <alk@ondore.com>wrote:> Hello. > > A quick googling for "pygrub WARNING:root:Unknown directive" suggests that > pygrub is confused by Grub2 config file format, particularly submenus. Have > you already checked that? > > http://www.magicspace.eu/**linux/fix-pygrub-booting-of-**debian-squeeze/<http://www.magicspace.eu/linux/fix-pygrub-booting-of-debian-squeeze/> > http://www.virtualzone.de/**2012/06/ubuntu-vm-not-** > starting-on-xenserver.html<http://www.virtualzone.de/2012/06/ubuntu-vm-not-starting-on-xenserver.html> > > Additionally, I would like to make two observation on the configuration > you posted. > > If you use "bootloader = /usr/bin/pygrub", it''s better to comment out > "kernel" and "ramdisk" directives. The .cfg file parser will surely find > it''s way, but it might be confusing to human eyes and easer to make > mistakes. > > Maybe you wish to reconsider your disk partitioning schema. Since you are > already use LVM, there shall be no need for extended partition. A usable > setup is to put /boot on a partition, and send everything else to LVM, > which is great for making changes and doing snapshot-based backups. Of > course it''s not mandatory, just a more flexible way to do things. > Definitely this has nothing to do with the initial problem you are facing. > > Greetings. > > -- > Alexandre Kouznetsov > > > ______________________________**_________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2012-Nov-29 18:39 UTC
Re: WARNING:root:Unknown image directive recordfail
Hello, Christian. Please consider to quote original message in a more conventional way. I almost missed yous answers. El 29/11/12 04:52, Christian Mayorga escribió:>> http://www.magicspace.eu/linux/fix-pygrub-booting-of-debian-squeeze/ > I already change this one and I got the following output from pygrub: > @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 > Using <class ''grub.GrubConf. > Grub2ConfigFile''> to parse /grub/grub.cfg > WARNING:root:Unknown directive load_video > [...]Than that is not the cause, although the symptom is similar.>> http://www.virtualzone.de/2012/06/ubuntu-vm-not-starting-on-xenserver.html > in my xen installation I dont have the command referenced in the blog: > > xe-edit-bootloader -n your_vm_name -p 1xe-edit-bootloader must be some wrapper, not installed on your system. In Dom0, mount the logical volume where your DomU''s "/" resides, inspect your grub.cfg file contents. Follow the recommendation and remove or comment out any "submenu" section you find. Do a backup of grub.cfg file before that, for reference.>> If you use "bootloader = /usr/bin/pygrub", it''s better to comment out >> "kernel" and "ramdisk" directives. The .cfg file parser will surely find >> it''s way, but it might be confusing to human eyes and easer to make >> mistakes. > what do you mean with "The .cfg file parser will surely > find it''s way"? Can you please explain?Xen has 2 ways (at least 2, relevant now) to load your DomU''s kernel and initrd. One is using the directives "kernel" and "ramdisk". The other is using "bootloader = /usr/bin/pygrub". Both ways are mutually exclusive: they never used both, if one is used the other one is ommited. Your config file specifies both ways, which can be confusing. The Xen control system parse that config file when the DomU is started. It seems that the parser is smart enough to take into account only one way to load the kernel: if "bootloader" is specified, than "kernel" and "ramdisk" are omitted. But, it''s a good idea to comment out this unused directives. Even if they are overridden anyway, the humans who read the configs are easily confused by this kind of things, better avoid them. Greetings. -- Alexandre Kouznetsov
Christian Mayorga
2012-Nov-30 17:25 UTC
Re: WARNING:root:Unknown image directive recordfail
Hi Alexander, Thanks a lot for your help it let me to find out the problem and it was basicly the .cfg file and exactly what you said: "Xen has 2 ways (at least 2, relevant now) to load your DomU''s kernel and initrd. One is using the directives "kernel" and "ramdisk". The other is using "bootloader = /usr/bin/pygrub". Both ways are mutually exclusive: they never used both, if one is used the other one is ommited." I think that "kernel" and "ramdisk" are mutually exclusive with "bootloader" After make the change in the .cfg file the VM started without problem. I hope this helps for other people going thru the same problem. Cheers, Christian On Thu, Nov 29, 2012 at 7:39 PM, Alexandre Kouznetsov <alk@ondore.com>wrote:> Hello, Christian. > > Please consider to quote original message in a more conventional way. I > almost missed yous answers. > > > El 29/11/12 04:52, Christian Mayorga escribió: > >> http://www.magicspace.eu/**linux/fix-pygrub-booting-of-**debian-squeeze/<http://www.magicspace.eu/linux/fix-pygrub-booting-of-debian-squeeze/> >>> >> I already change this one and I got the following output from pygrub: >> @server02:/$ sudo /usr/bin/pygrub /dev/VolGroup00/VM01 >> Using <class ''grub.GrubConf. >> Grub2ConfigFile''> to parse /grub/grub.cfg >> WARNING:root:Unknown directive load_video >> [...] >> > Than that is not the cause, although the symptom is similar. > > http://www.virtualzone.de/**2012/06/ubuntu-vm-not-** >>> starting-on-xenserver.html<http://www.virtualzone.de/2012/06/ubuntu-vm-not-starting-on-xenserver.html> >>> >> in my xen installation I dont have the command referenced in the blog: >> >> xe-edit-bootloader -n your_vm_name -p 1 >> > xe-edit-bootloader must be some wrapper, not installed on your system. > > In Dom0, mount the logical volume where your DomU''s "/" resides, inspect > your grub.cfg file contents. Follow the recommendation and remove or > comment out any "submenu" section you find. Do a backup of grub.cfg file > before that, for reference. > > > If you use "bootloader = /usr/bin/pygrub", it''s better to comment out >>> "kernel" and "ramdisk" directives. The .cfg file parser will surely find >>> it''s way, but it might be confusing to human eyes and easer to make >>> mistakes. >>> >> what do you mean with "The .cfg file parser will surely >> >> find it''s way"? Can you please explain? >> > Xen has 2 ways (at least 2, relevant now) to load your DomU''s kernel and > initrd. One is using the directives "kernel" and "ramdisk". The other is > using "bootloader = /usr/bin/pygrub". Both ways are mutually exclusive: > they never used both, if one is used the other one is ommited. > > Your config file specifies both ways, which can be confusing. The Xen > control system parse that config file when the DomU is started. It seems > that the parser is smart enough to take into account only one way to load > the kernel: if "bootloader" is specified, than "kernel" and "ramdisk" are > omitted. > > But, it''s a good idea to comment out this unused directives. Even if they > are overridden anyway, the humans who read the configs are easily confused > by this kind of things, better avoid them. > > > Greetings. > > -- > Alexandre Kouznetsov > > > ______________________________**_________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users