Jim Lynch
2006-Nov-28 20:47 UTC
[Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
I''m trying to get xen working on a SuSE box running CentOS as a guest. I installed SuSE 10.1 and it also installed xen kernels which boot fine, other than they boot into non graphical mode. So I selected a couple of underused partitions and did a fresh install of CentOS 4.3. Then I downloaded xen-3.0.1-install-x86_64.tgz (this is an Intel 6300 duo core system) and did a make world and a make install. This was all while running the stock CentOS kernel. I ended up with this in /boot: config-2.6.16.29-xenU message.ja vmlinuz-2.6.9-34.ELsmp config-2.6.9-34.EL System.map-2.6.16.29-xenU vmlinuz-2.6-xenU config-2.6.9-34.ELsmp System.map-2.6.9-34.EL xen-3.0.3-0.gz grub System.map-2.6.9-34.ELsmp xen-3.0.gz initrd-2.6.9-34.EL.img vmlinux-syms-2.6.16.29-xenU xen-3.gz initrd-2.6.9-34.ELsmp.img vmlinuz-2.6.16.29-xenU xen.gz lost+found vmlinuz-2.6.16-xenU xen-syms-3.0.3-0 message vmlinuz-2.6.9-34.EL I obviously missed the step to create an initrd but that''s not my current problem. So I booted into the SuSE xen kernel and did a xm create -c myxen vmid=1 Using config file "myxen". Error: Kernel image does not exist: /boot/vmlinuz-2.6.16.29-xenU That didn''t work. It makes no sense that I would have to have a copy of that kernel locally does it? I thought that xen would look at the configuration, the /etc/fstab on the CentOS system and try to load the kernel from there. After all, that''s where install put it. So xm isn''t finding it. Why? Here''s the disk layout. fstab from the CentOS root. /dev/hda1 / ext3 defaults 1 1 /dev/hda7 /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda2 /home ext3 defaults 1 2 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 fdisk -l /hda /dev/hda3 swap swap defaults 0 0 Device Boot Start End Blocks Id System /dev/hda1 * 1 1275 10241406 c W95 FAT32 (LBA) /dev/hda2 1276 2581 10490445 83 Linux /dev/hda3 2582 2712 1052257+ 82 Linux swap / Solaris /dev/hda4 2713 14592 95426100 f W95 Ext''d (LBA) /dev/hda5 4019 9000 40017883+ 83 Linux /dev/hda6 9001 14592 44917708+ 83 Linux /dev/hda7 2713 2725 104359+ 83 Linux (This is CentOS boot) /dev/hda8 2726 4018 10385991 8e Linux LVM ls -lR /dev/VolGroup00/ /dev/VolGroup00/: total 0 lrwxrwxrwx 1 root root 31 2006-11-28 09:17 LogVol00 -> /dev/mapper/VolGroup00-LogVol00 (This is my CentOS root) lrwxrwxrwx 1 root root 31 2006-11-28 09:17 LogVol01 -> /dev/mapper/VolGroup00-LogVol01 (CentOS swap) lrwxrwxrwx 1 root root 31 2006-11-28 09:17 LogVol02 -> /dev/mapper/VolGroup00-LogVol02 (Centos home) Here is my myxm config file. # Kernel image file and (optional) ramdisk (initrd). kernel = "/boot/vmlinuz-2.6.16.29-xenU" ramdisk = "/boot/initrd-2.6.9-34.ELsmp.img" memory = 64 name = "ExampleDomain" vif = [ '''' ] disk = [ ''phy:VolGroup00-LogVol00,hda1,w'' ] disk = [ ''phy:VolGroup00-LogVol02,hda2,w'' ] disk = [ ''phy:hda7,hda7,w'' ] disk = [ ''phy:VolGroup00-LogVol01,hda3,w'' ] dhcp="dhcp" root = "/dev/hda1 ro" extra = "4" xm create -c myxen vmid=1 Using config file "myxen". Error: Kernel image does not exist: /boot/vmlinuz-2.6.16.29-xenU _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Michael Watters
2006-Nov-28 22:53 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
Jim Lynch wrote:> Error: Kernel image does not exist: /boot/vmlinuz-2.6.16.29-xenU > That didn''t work. It makes no sense that I would have to have a copy of > that kernel locally does it? I thought that xen would look at the > configuration, the /etc/fstab on the CentOS system and try to load the > kernel from there. After all, that''s where install put it. So xm isn''t > finding it. Why?That''s what I thought too but the kernel actually goes on the dom0 system, the kernel MODULES need to be copied to the guest. It makes sense if you think about it, xen can''t boot a kernel it can''t see. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jim Lynch
2006-Nov-29 01:08 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
Thanks, that got me further. Now I think I may be running into a problem with the initrd file. Should I have generated a special one when I generated the kernel? I''m crashing the guest:>From xend-debug.logNothing to flush. Traceback (most recent call last): File "/usr/lib/python2.4/SocketServer.py", line 463, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.4/SocketServer.py", line 254, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.4/SocketServer.py", line 521, in __init__ self.handle() File "/usr/lib/python2.4/BaseHTTPServer.py", line 316, in handle self.handle_one_request() File "/usr/lib/python2.4/BaseHTTPServer.py", line 310, in handle_one_request method() File "/usr/lib/python2.4/SimpleXMLRPCServer.py", line 441, in do_POST self.send_response(200) File "/usr/lib/python2.4/BaseHTTPServer.py", line 367, in send_response self.wfile.write("%s %d %s\r\n" % File "/usr/lib/python2.4/socket.py", line 256, in write self.flush() File "/usr/lib/python2.4/socket.py", line 243, in flush self._sock.sendall(buffer) error: (32, ''Broken pipe'') Heavily parsed xend.log [2006-11-28 19:53:26 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''ExampleDomain'', ''frontend'': ''/local/domain/2/device/vbd/771'', ''dev'': ''hda3'', ''state'': ''1'', ''params'': ''VolGroup00/LogVol01'', ''mode'': ''w'', ''frontend-id'': ''2'', ''type'': ''phy''} to /local/domain/0/backend/vbd/2/771. [2006-11-28 19:53:26 xend.XendDomainInfo] DEBUG (XendDomainInfo:675) Storing VM details: {''ssidref'': ''0'', ''uuid'': ''181bb390-efb4-255d-75d7-e35ad1f5c348'', ''on_reboot'': ''restart'', ''start_time'': ''1164761606.34'', ''on_poweroff'': ''destroy'', ''name'': ''ExampleDomain'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': ''64'', ''on_crash'': ''restart'', ''image'': "(linux (kernel /boot/vmlinuz-2.6.16.29-xenU) (ramdisk /boot/initrd-2.6.9-34.ELsmp.img) (ip :::::eth0:dhcp) (root ''/dev/hda1 ro'') (args 4))", ''maxmem'': ''64''} [2006-11-28 19:53:26 xend.XendDomainInfo] DEBUG (XendDomainInfo:700) Storing domain details: {''console/ring-ref'': ''41460'', ''console/port'': ''2'', ''name'': ''ExampleDomain'', ''console/limit'': ''1048576'', ''vm'': ''/vm/181bb390-efb4-255d-75d7-e35ad1f5c348'', ''domid'': ''2'', ''cpu/0/availability'': ''online'', ''memory/target'': ''65536'', ''store/ring-ref'': ''41461'', ''store/port'': ''1''} [2006-11-28 19:53:26 xend.XendDomainInfo] DEBUG (XendDomainInfo:881) XendDomainInfo.handleShutdownWatch [2006-11-28 19:53:26 xend.XendDomainInfo] WARNING (XendDomainInfo:823) Domain has crashed: name=ExampleDomain id=2. [2006-11-28 19:53:26 xend.XendDomainInfo] ERROR (XendDomainInfo:1496) VM ExampleDomain restarting too fast (0.487512 seconds since the last restart). Refusing to restart to avoid loops. Does this mean anything to anyone? THanks, Jim. Michael Watters wrote:> Jim Lynch wrote: >> Error: Kernel image does not exist: /boot/vmlinuz-2.6.16.29-xenU >> That didn''t work. It makes no sense that I would have to have a copy of >> that kernel locally does it? I thought that xen would look at the >> configuration, the /etc/fstab on the CentOS system and try to load the >> kernel from there. After all, that''s where install put it. So xm isn''t >> finding it. Why? > That''s what I thought too but the kernel actually goes on the dom0 > system, the kernel MODULES need to be copied to the guest. It makes > sense if you think about it, xen can''t boot a kernel it can''t see. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Henning Sprang
2006-Nov-29 01:35 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
On 11/29/06, Jim Lynch <jim@fayettedigital.com> wrote:> [...] > Does this mean anything to anyone?from your first mail: "I obviously missed the step to create an initrd but that''s not my current problem." So now, this is your current problem - your initrd doesn''t match the Kernel you are trying to run. create an initrd for your xen kernel with mkinitramfs or mkinitrd. Henning _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jerry Amundson
2006-Nov-29 01:45 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
On 11/28/06, Henning Sprang <henning_sprang@gmx.de> wrote:> On 11/29/06, Jim Lynch <jim@fayettedigital.com> wrote: > > [...] > > Does this mean anything to anyone? > > from your first mail: "I obviously missed the step to create an initrd > but that''s not my > current problem." > > So now, this is your current problem - your initrd doesn''t match the > Kernel you are trying to run. create an initrd for your xen kernel > with mkinitramfs or mkinitrd.This echoes my thoughts, also. In addition, you might think about giving the guest... 1. More RAM (though, with a correct initrd it should boot with 64 MB). 2. runlevel ("extra" param) of 3 - the sysv systems I''m used to she 4 as unused... jerry _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jim Lynch
2006-Nov-29 10:05 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
Jerry Amundson wrote:> On 11/28/06, Henning Sprang <henning_sprang@gmx.de> wrote: >> On 11/29/06, Jim Lynch <jim@fayettedigital.com> wrote: >> > [...] >> > Does this mean anything to anyone? >> >> from your first mail: "I obviously missed the step to create an initrd >> but that''s not my >> current problem." >> >> So now, this is your current problem - your initrd doesn''t match the >> Kernel you are trying to run. create an initrd for your xen kernel >> with mkinitramfs or mkinitrd. > > This echoes my thoughts, also. > > In addition, you might think about giving the guest... > 1. More RAM (though, with a correct initrd it should boot with 64 MB). > 2. runlevel ("extra" param) of 3 - the sysv systems I''m used to she 4 > as unused... > > jerry > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >Thanks, I have plenty of ram so I can spare more. This is a 2 Gib machine and domain0 is only using 256 Mib at this time. The reason those parameters are set that way is because that''s what the example had. I''ll take your advice, I''ve never seen anyone use level 4 but I thought possibly xen might be for some reason. Jim. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jim Lynch
2006-Nov-29 14:31 UTC
Re: [Xen-users] Trying to get CentOS guest running, but xm cant find the kernel image.
Jerry Amundson wrote:> On 11/28/06, Henning Sprang <henning_sprang@gmx.de> wrote: >> >> So now, this is your current problem - your initrd doesn''t match the >> Kernel you are trying to run. create an initrd for your xen kernel >> with mkinitramfs or mkinitrd. > > This echoes my thoughts, also. >OK thanks guys. I now have a initrd that was created successfully and from what I can tell was accepted, only because I can''t find a complaint in the logs. What was it that told you the initrd was the problem before? I''m pretty much at the same point I was before. I see Roland is suffering from the same problem. I''m wondering if these error messages are an indication of the problem? xenstore-read: couldn''t read path backend/vbd/7/771/node xenstore-read: couldn''t read path backend/vbd/8/771/node That''s from the xen-hotplug.log file. Or is this just a symptom of the crashed domain? I googled for the error but I didn''t find any solutions. Here is my config again, kernel = "/boot/vmlinuz-2.6.16.29-xenU" ramdisk = "/boot/initrd-2.6.16.29-xenU.img" memory = 256 name = "IServer" vif = [ '''' ] disk = [ ''phy:VolGroup00/LogVol00,hda1,w'' ] disk = [ ''phy:VolGroup00/LogVol02,hda2,w'' ] disk = [ ''phy:hda7,hda7,w'' ] disk = [ ''phy:VolGroup00/LogVol01,hda3,w'' ] dhcp="dhcp" root = "/dev/hda1 ro" extra = "3" Are there any debug flags or other ways I can get Xen to tell me more about it''s problem? xend.log from initialization to crash [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:180) XendDomainInfo.create([''vm'', [''name'', ''IServer''], [''memory'', 256], [''root'', ''/dev/hda1 ro''], [''vcpus'', 1], [''root'', ''/dev/hda1 ro''], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16.29-xenU''], [''ramdisk'', ''/boot/initrd-2.6.16.29-xenU.img''], [''ip'', '':::::eth0:dhcp''], [''root'', ''/dev/hda1 ro''], [''args'', ''3'']]], [''device'', [''vbd'', [''uname'', ''phy:VolGroup00/LogVol01''], [''dev'', ''hda3''], [''mode'', ''w'']]], [''device'', [''vif'']]]) [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:286) parseConfig: config is [''vm'', [''name'', ''IServer''], [''memory'', 256], [''root'', ''/dev/hda1 ro''], [''vcpus'', 1], [''root'', ''/dev/hda1 ro''], [''image'', [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16.29-xenU''], [''ramdisk'', ''/boot/initrd-2.6.16.29-xenU.img''], [''ip'', '':::::eth0:dhcp''], [''root'', ''/dev/hda1 ro''], [''args'', ''3'']]], [''device'', [''vbd'', [''uname'', ''phy:VolGroup00/LogVol01''], [''dev'', ''hda3''], [''mode'', ''w'']]], [''device'', [''vif'']]] [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:382) parseConfig: result is {''ssidref'': None, ''uuid'': None, ''on_crash'': None, ''on_reboot'': None, ''localtime'': None, ''image'': [''linux'', [''kernel'', ''/boot/vmlinuz-2.6.16.29-xenU''], [''ramdisk'', ''/boot/initrd-2.6.16.29-xenU.img''], [''ip'', '':::::eth0:dhcp''], [''root'', ''/dev/hda1 ro''], [''args'', ''3'']], ''on_poweroff'': None, ''cpus'': None, ''name'': ''IServer'', ''backend'': [], ''cpu'': None, ''vcpus'': 1, ''cpu_weight'': None, ''vcpu_avail'': None, ''memory'': 256, ''device'': [(''vbd'', [''vbd'', [''uname'', ''phy:VolGroup00/LogVol01''], [''dev'', ''hda3''], [''mode'', ''w'']]), (''vif'', [''vif''])], ''bootloader'': None, ''root'': ''/dev/hda1 ro'', ''bootentry'': None, ''maxmem'': None} [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:1189) XendDomainInfo.construct: None 0 [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:1221) XendDomainInfo.initDomain: 7 1.0 [2006-11-29 08:48:11 xend] DEBUG (balloon:136) Balloon: free 1764; need 257; done. [2006-11-29 08:48:11 xend] INFO (image:136) buildDomain os=linux dom=7 vcpus=1 [2006-11-29 08:48:11 xend] DEBUG (image:174) dom = 7 [2006-11-29 08:48:11 xend] DEBUG (image:175) image /boot/vmlinuz-2.6.16.29-xenU [2006-11-29 08:48:11 xend] DEBUG (image:176) store_evtchn = 1 [2006-11-29 08:48:11 xend] DEBUG (image:177) console_evtchn = 2 [2006-11-29 08:48:11 xend] DEBUG (image:178) cmdline = ip=:::::eth0:dhcp root=/dev/hda1 ro 3 [2006-11-29 08:48:11 xend] DEBUG (image:179) ramdisk /boot/initrd-2.6.16.29-xenU.img [2006-11-29 08:48:11 xend] DEBUG (image:180) vcpus = 1 [2006-11-29 08:48:11 xend] DEBUG (image:181) features [2006-11-29 08:48:11 xend] DEBUG (DevController:103) DevController: writing {''virtual-device'': ''771'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/7/771''} to /local/domain/7/device/vbd/771. [2006-11-29 08:48:11 xend] DEBUG (DevController:105) DevController: writing {''domain'': ''IServer'', ''frontend'': ''/local/domain/7/device/vbd/771'', ''dev'': ''hda3'', ''state'': ''1'', ''params'': ''VolGroup00/LogVol01'', ''mode'': ''w'', ''frontend-id'': ''7'', ''type'': ''phy''} to /local/domain/0/backend/vbd/7/771. [2006-11-29 08:48:11 xend] DEBUG (DevController:103) DevController: writing {''backend-id'': ''0'', ''mac'': ''00:16:3e:64:b8:1c'', ''handle'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vif/7/0''} to /local/domain/7/device/vif/0. [2006-11-29 08:48:11 xend] DEBUG (DevController:105) DevController: writing {''mac'': ''00:16:3e:64:b8:1c'', ''state'': ''1'', ''handle'': ''0'', ''script'': ''/etc/xen/scripts/vif-bridge'', ''frontend-id'': ''7'', ''domain'': ''IServer'', ''frontend'': ''/local/domain/7/device/vif/0''} to /local/domain/0/backend/vif/7/0. [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:675) Storing VM details: {''ssidref'': ''0'', ''uuid'': ''14d3f1f7-faf7-0178-d8f8-9d79fa893b64'', ''on_reboot'': ''restart'', ''start_time'': ''1164808091.29'', ''on_poweroff'': ''destroy'', ''name'': ''IServer'', ''vcpus'': ''1'', ''vcpu_avail'': ''1'', ''memory'': ''256'', ''on_crash'': ''restart'', ''image'': "(linux (kernel /boot/vmlinuz-2.6.16.29-xenU) (ramdisk /boot/initrd-2.6.16.29-xenU.img) (ip :::::eth0:dhcp) (root ''/dev/hda1 ro'') (args 3))", ''maxmem'': ''256''} [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:700) Storing domain details: {''console/ring-ref'': ''55794'', ''console/port'': ''2'', ''name'': ''IServer'', ''console/limit'': ''1048576'', ''vm'': ''/vm/14d3f1f7-faf7-0178-d8f8-9d79fa893b64'', ''domid'': ''7'', ''cpu/0/availability'': ''online'', ''memory/target'': ''262144'', ''store/ring-ref'': ''55795'', ''store/port'': ''1''} [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:881) XendDomainInfo.handleShutdownWatch [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices vif. [2006-11-29 08:48:11 xend] DEBUG (DevController:138) Waiting for 0. [2006-11-29 08:48:11 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/7/0/hotplug-status. [2006-11-29 08:48:11 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/7/0/hotplug-status. [2006-11-29 08:48:11 xend] DEBUG (DevController:417) hotplugStatusCallback 1. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices usb. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices vbd. [2006-11-29 08:48:11 xend] DEBUG (DevController:138) Waiting for 771. [2006-11-29 08:48:11 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vbd/7/771/hotplug-status. [2006-11-29 08:48:11 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vbd/7/771/hotplug-status. [2006-11-29 08:48:11 xend] DEBUG (DevController:417) hotplugStatusCallback 1. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices irq. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices pci. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices ioports. [2006-11-29 08:48:11 xend] DEBUG (DevController:132) Waiting for devices vtpm. [2006-11-29 08:48:11 xend] INFO (XendDomain:363) Domain IServer (7) unpaused. [2006-11-29 08:48:11 xend.XendDomainInfo] WARNING (XendDomainInfo:823) Domain has crashed: name=IServer id=7. [2006-11-29 08:48:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:1364) XendDomainInfo.destroyDomain(7) ~ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users