Henning Sprang
2006-Apr-08 22:50 UTC
[Fedora-xen] problems with using xen-get.org images in fc5
Hi, apart from the FC5 xen install script, I just tried to use the fedory 5 Image from xen-get.org on a fedora5 host system. xend is started (the fc5 install script which takes so long runs at the same time). I adjusted the locations of my disk files from the template config that came with the cen-get image to match my kernel and disk image file locations. When trying to start the vm, I get the error: "Error: Error creating domain: Kernel image does not exist: /boot/vmlinuz-2.6.16-1.2080_FC5xenU" But the file is definitely at exactly this location - I just asked a colleague for help but he also couldN#t see any error. I saw that the xen config file generated by the fedora5 install script for fc5 domU (/usr/sbin/xenguest-install.py) seems to create a very different looking config file than the ones I ever saw in any howto or documentation, so I suspect fc5 added some patches to the xen start scripts and I must make my config file "somehow" else, but I don''t see how. Is it impossible to use a "standard" xen config file in fc5 with the fc5 provided xen packages? Henning
Henning Sprang
2006-Apr-09 01:15 UTC
Re: [Fedora-xen] problems with using xen-get.org images in fc5
Hi, Henning Sprang wrote:> [...] > When trying to start the vm, I get the error: > "Error: Error creating domain: Kernel image does not exist: > /boot/vmlinuz-2.6.16-1.2080_FC5xenU"I further investigated that. Fedora seems to require to explicitly set the bootloader to pygrub in the domU config. When doing so, I get the error: [root@localhost ~]# xm create -c basic-debian Using config file "/etc/xen/basic-debian". Traceback (most recent call last): File "/usr/bin/pygrub", line 256, in ? cf = get_config(file, isconfig) File "/usr/bin/pygrub", line 119, in get_config fs = fstype.open_fs(fn, offset) File "/usr/lib/python2.4/site-packages/grub/fsys/ext2/__init__.py", line 35, in open_fs return Ext2Fs(fn, offset = offset) ValueError: unable to open file Error: Boot loader didn''t return any data! Which seems to be further described here: http://lists.xensource.com/archives/html/xen-users/2006-03/msg00721.html But I cannot find a solution. Does that mean I cannot use xen images created in block devices the "normal" way all howto''s about xen describe? What Do I have to do to create a xen domU manually, or use a xen disk image created on another machine/distribution on Fedora? Why is Fedora not able to recognize the kernel variable in the config file correctly as it is usually done on other distributions? Henning
Henning Sprang
2006-Apr-09 10:51 UTC
Re: [Fedora-xen] problems with using xen-get.org images in fc5
Ted Kaczmarek wrote:> > Paste your domU config and an ls of /boot, that should help."broken" domU config: #kernel = "/boot/vmlinuz-2.6-xenU" kernel = "/boot/vmlinuz-2.6.16-1.2080_FC5xenU" ramdisk= "/boot/initrd-1.6.16-1.2080_FC5xenU.img" memory = 128 name = "fedora.fc5" #nics = 1 vif = [ '''' ] dhcp = "dhcp" disk = [''file:/var/xen/xen-get-fedora/fedora.fc5.img,sda1,w'', ''file:/var/xen/xen-get-fedora/fedora.swap,sda2,w''] root = "/dev/sda1 ro" #bootloader="/usr/bin/pygrub" like this, I get: Using config file "/etc/xen/xen-get-fedora". Error: Error creating domain: Kernel image does not exist: /boot/vmlinuz-2.6.16-1.2080_FC5xenU [root@localhost ~]# ls -l /boot/ total 12741 -rw-r--r-- 1 root root 63847 Mar 14 22:19 config-2.6.15-1.2054_FC5smp -rw-r--r-- 1 root root 59663 Mar 28 11:27 config-2.6.16-1.2080_FC5xen0 -rw-r--r-- 1 root root 28213 Mar 28 11:38 config-2.6.16-1.2080_FC5xenU drwxr-xr-x 2 root root 1024 Apr 8 14:42 grub -rw-r--r-- 1 root root 1788626 Apr 8 11:40 initrd-2.6.15-1.2054_FC5smp.img -rw-r--r-- 1 root root 1790016 Apr 8 12:26 initrd-2.6.16-1.2080_FC5xen0.img -rw-r--r-- 1 root root 1601032 Apr 8 12:26 initrd-2.6.16-1.2080_FC5xenU.img drwx------ 2 root root 12288 Apr 8 13:35 lost+found -rw-r--r-- 1 root root 831559 Mar 14 22:19 System.map-2.6.15-1.2054_FC5smp -rw-r--r-- 1 root root 814854 Mar 28 11:27 System.map-2.6.16-1.2080_FC5xen0 -rw-r--r-- 1 root root 637766 Mar 28 11:38 System.map-2.6.16-1.2080_FC5xenU -rw-r--r-- 1 root root 1564844 Mar 14 22:19 vmlinuz-2.6.15-1.2054_FC5smp -rw-r--r-- 1 root root 1529298 Mar 28 11:27 vmlinuz-2.6.16-1.2080_FC5xen0 -rw-r--r-- 1 root root 1232494 Mar 28 11:38 vmlinuz-2.6.16-1.2080_FC5xenU -rw-r--r-- 1 root root 265927 Mar 28 10:35 xen.gz-2.6.16-1.2080_FC5 -rwxr-xr-x 1 root root 734680 Mar 28 12:04 xen-syms-2.6.16-1.2080_FC5 When I remove the comment before the bootloader line, I get: Using config file "/etc/xen/xen-get-fedora". Traceback (most recent call last): File "/usr/bin/pygrub", line 256, in ? cf = get_config(file, isconfig) File "/usr/bin/pygrub", line 119, in get_config fs = fstype.open_fs(fn, offset) File "/usr/lib/python2.4/site-packages/grub/fsys/ext2/__init__.py", line 35, in open_fs return Ext2Fs(fn, offset = offset) ValueError: unable to open file Error: Boot loader didn''t return any data! The working config generated by the fedora5 script described in the wiki looks like: # Automatically generated xen config file name = "fedora-simple" memory = "256" disk = [ ''file:/var/xen/fedora-simple,xvda,w'' ] vif = [ ''mac=00:16:3e:16:03:83'' ] bootloader="/usr/bin/pygrub" on_reboot = ''restart'' on_crash = ''restart''> > > I have no problems with any of the images from jailtime.org > or any of the ones I spun using rpm. These are the same images that I had > running on Xen since pre 3.0 from hg checkouts sometime in November of > last year.I''ll see if I can try the same with a jailtime image instead. This can take a while because the hardware I had for testing will not be available much longer. Henning
Ted Kaczmarek
2006-Apr-09 23:50 UTC
Re: [Fedora-xen] problems with using xen-get.org images in fc5
On Apr 9, 2006, at 6:51 AM, Henning Sprang wrote:> Ted Kaczmarek wrote: >> Paste your domU config and an ls of /boot, that should help. > > "broken" domU config: > > #kernel = "/boot/vmlinuz-2.6-xenU" > kernel = "/boot/vmlinuz-2.6.16-1.2080_FC5xenU" > ramdisk= "/boot/initrd-1.6.16-1.2080_FC5xenU.img" > memory = 128 > name = "fedora.fc5" > #nics = 1 > vif = [ '''' ] > dhcp = "dhcp" > disk = [''file:/var/xen/xen-get-fedora/fedora.fc5.img,sda1,w'', > ''file:/var/xen/xen-get-fedora/fedora.swap,sda2,w''] > root = "/dev/sda1 ro" > > #bootloader="/usr/bin/pygrub" > > > like this, I get: > > Using config file "/etc/xen/xen-get-fedora". > Error: Error creating domain: Kernel image does not exist: /boot/ > vmlinuz-2.6.16-1.2080_FC5xenUDomU booted right up for me, I pasted my domU config. I am passing selinux=0 to kernel on boot, otherwise I had all kinds of bad behavior. # Kernel image file. kernel = "/boot/vmlinuz-2.6.16-1.2080_FC5xenU" # Initial memory allocation (in megabytes) for the new domain. memory = 256 # A name for your domain. All domains must have different names. name = "idom11" #----------------------------------------------------------------------- ----- # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. #disk = [ ''phy:VolGroup01/debian,sdb1,w'' ] disk = [''file:/media/hdb1/jailtime/fedora.fc5.img,sda1,w'', ''file:/ media/hdb1/jailtime/fedora.swap,sda2,w''] #----------------------------------------------------------------------- ----- # Set the kernel command line for the new domain. # You only need to define the IP parameters and hostname if the domain''s # IP config doesn''t, e.g. in ifcfg-eth0 or via DHCP. # You can use ''extra'' to set the runlevel and custom environment # variables used by custom rc scripts (e.g. VMID=, usr= ). # Set root device. root = "/dev/sda1" # Sets runlevel 4. #extra = "r0 3 vdso=0" extra = "ro selinux=0 3" # Which CPU to start domain on? #cpu = 1 # leave to Xen to pick # Number of Virtual CPUS to use, default is 1 vcpus = 2 vif = ['''' ,''''] # Set if you want dhcp to allocate the IP address. ip=''off'' on_poweroff = ''destroy'' on_reboot = ''restart'' #on_crash = ''restart'' on_crash = ''destroy'' Regards, Ted